[pve-devel] [PATCH qemu-server] qemu_img_convert : use "-l snapshot.name" instead -s for internal snapshot
    Alexandre Derumier 
    aderumier at odiso.com
       
    Sun Oct  7 19:15:22 CEST 2018
    
    
  
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index fe27005..541d7b0 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6286,7 +6286,7 @@ sub qemu_img_convert {
 
 	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;
-- 
2.11.0
    
    
More information about the pve-devel
mailing list