[pve-devel] [PATCH storage 2/2] esxi: only add scsihw if it's defined

Dominik Csapak d.csapak at proxmox.com
Tue Mar 19 14:00:28 CET 2024


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 at proxmox.com>
---
 src/PVE/Storage/ESXiPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index e448760..b36cea8 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -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";
 
-- 
2.39.2





More information about the pve-devel mailing list