]> git.proxmox.com Git - qemu-server.git/commitdiff
qemu_img_convert : use "-l snapshot.name" instead -s for internal snapshot
authorAlexandre Derumier <aderumier@odiso.com>
Sun, 7 Oct 2018 17:15:22 +0000 (19:15 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 8 Oct 2018 11:16:12 +0000 (13:16 +0200)
qemu-img convert -s has been removed in qemu 3.0
https://git.qemu.org/?p=qemu.git;a=commit;h=46e8d272baa0608adcfdbd8bc1d2312bea06da40

we should use qemu-img convert -l snapshot.name=<snapname>,
introduced in qemu 2.0 in 2013
http://patchwork.ozlabs.org/patch/296457/

PVE/QemuServer.pm

index fe2700506187b983c666c62b8b4599516a6180ed..541d7b099ed3cdea1c7de82aae785d999ea4523c 100644 (file)
@@ -6286,7 +6286,7 @@ sub qemu_img_convert {
 
        my $cmd = [];
        push @$cmd, '/usr/bin/qemu-img', 'convert', '-p', '-n';
 
        my $cmd = [];
        push @$cmd, '/usr/bin/qemu-img', 'convert', '-p', '-n';
-       push @$cmd, '-s', $snapname if($snapname && $src_format eq "qcow2");
+       push @$cmd, '-l', "snapshot.name=$snapname" if($snapname && $src_format eq "qcow2");
        push @$cmd, '-t', 'none' if $dst_scfg->{type} eq 'zfspool';
        push @$cmd, '-T', 'none' if $src_scfg->{type} eq 'zfspool';
        push @$cmd, '-f', $src_format, '-O', $dst_format, $src_path;
        push @$cmd, '-t', 'none' if $dst_scfg->{type} eq 'zfspool';
        push @$cmd, '-T', 'none' if $src_scfg->{type} eq 'zfspool';
        push @$cmd, '-f', $src_format, '-O', $dst_format, $src_path;