esxi: improve scsihw detection

we should actually keep the scsihw even with eg. linux VMs as they
might not have virtio/... in their initrd and then fail to boot

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2024-03-08 10:52:33 +01:00
committed by Thomas Lamprecht
parent 728c08b2f0
commit a3271a47ca

View File

@ -968,8 +968,12 @@ sub get_create_args {
# my $fullpath = "$mntdir/$path";
# return if !-e $fullpath;
if ($devtype && $devtype =~ /^lsi/i) {
$set_scsihw->('lsi');
if ($devtype) {
if ($devtype =~ /^lsi/i) {
$set_scsihw->('lsi');
} elsif ($devtype eq 'pvscsi') {
$set_scsihw->('pvscsi'); # same name in pve
}
}
my $count = $counts{$bus}++;