]> git.proxmox.com Git - pve-storage.git/commitdiff
esxi: only add scsihw if it's defined
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 19 Mar 2024 13:00:28 +0000 (14:00 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Mar 2024 17:09:42 +0000 (18:09 +0100)
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>
src/PVE/Storage/ESXiPlugin.pm

index e4487602d108389aa6f70a7d00fd36525ed4a209..b36cea85e3caf74c6de44b09c11281f013416b33 100644 (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";