[pve-devel] applied: [PATCH qemu-server] fix #2408: use scsi-hd backend for iSCSI as well

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Oct 23 11:40:36 CEST 2019


On 10/22/19 5:25 PM, Stefan Reiter wrote:
> 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 at proxmox.com>
> ---
> 
> See also recent discussion on the mailing list:
> https://pve.proxmox.com/pipermail/pve-devel/2019-September/039189.html
> 
> @Daniel Berteaud: You also mentioned using scsi-hd fixes #2335 (which you
> already have submitted a patch for previously) and #2380. Is this correct?
> Just for reference, so we can keep them in sync on the bugtracker.
> 
> 
>  PVE/QemuServer.pm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 6d6e663..c5f46ef 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -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)) {

applied, with followup fixing indentation, white space for if and
added a comment, thanks!

>  		$devicetype = 'generic';
>  	    }
>  	}
> 





More information about the pve-devel mailing list