fix #2408, #2355, #2380: use scsi-hd backend for iSCSI as well

As mentioned in #2408, live-migrating a VM between storages that use
different scsi backends (scsi-hd, scsi-generic, scsi-block) breaks.

To fix, from QEMU 4.1 machine types onward (to not break current
behaviour any more), only use scsi-hd, as in recent versions, there is
almost no difference between the two anyway.

scsi-block (which potentially also breaks) requires a flag to be
manually set on the disk, so we can assume the user knows what they're
doing.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Suggested-by: Daniel Berteaud <daniel@firewall-services.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Stefan Reiter 2019-10-22 17:25:48 +02:00 committed by Thomas Lamprecht
parent 317c55c2d1
commit d1cbb1a93b

View File

@ -1898,7 +1898,8 @@ sub print_drivedevice_full {
$path = PVE::Storage::path($storecfg, $drive->{file});
}
if($path =~ m/^iscsi\:\/\//){
if($path =~ m/^iscsi\:\/\// &&
!qemu_machine_feature_enabled($machine_type, undef, 4, 1)) {
$devicetype = 'generic';
}
}