On Thu, Oct 13, 2016 at 12:00:42PM +0200, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderum...@odiso.com>
> ---
>  PVE/QemuServer.pm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 05edd7a..ec8df94 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5933,8 +5933,11 @@ sub clone_disk {
>       if (!$running || $snapname) {
>           qemu_img_convert($drive->{file}, $newvolid, $size, $snapname, 
> $sparseinit);
>       } else {
> -         #qemu 2.6
> -         die "drive-mirror is not working currently when iothread is 
> enabled" if $drive->{iothread};
> +
> +         my $kvmver = kvm_user_version();
> +         if (!qemu_machine_feature_enabled (undef, $kvmver, 2, 7)) {

Considering this is in the path where $running is true, I think this
should include the get_current_qemu_machine() parameter?

> +             die "drive-mirror with iothread only works since qemu 2.7" if 
> $drive->{iothread};
> +         }
>  
>           qemu_drive_mirror($vmid, $drivename, $newvolid, $newvmid, 
> $sparseinit);
>       }
> -- 
> 2.1.4

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to