esxi: only add scsihw if it's defined

otherwise we get `scsihw: null` from the api, which is not a valid
value, so just omit it.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak
2024-03-19 14:00:28 +01:00
committed by Thomas Lamprecht
parent 0f940f10fc
commit c9bece6986

View File

@ -1073,7 +1073,7 @@ sub get_create_args {
$warn->('ovmf-with-lsi-unsupported', key => 'scsihw', value => "$scsihw");
}
}
$create_args->{scsihw} = $scsihw;
$create_args->{scsihw} = $scsihw if defined($scsihw);
$create_args->{boot} = "order=$boot_order";