--- Begin Message ---
for external snapshot, we simply use snap volname as src.
don't use internal snapshot option in the command line.

Signed-off-by: Alexandre Derumier <alexandre.derum...@groupe-cyllene.com>
---
 PVE/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 12d60cad..5cce7094 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -7906,11 +7906,11 @@ sub qemu_img_convert {
     my $dst_format = checked_volume_format($storecfg, $dst_volid);
     my $dst_path = PVE::Storage::path($storecfg, $dst_volid);
     my $dst_is_iscsi = ($dst_path =~ m|^iscsi://|);
+    my $snapshot_type = PVE::Storage::volume_has_feature($storecfg, 
'snapshot', $src_volid);
 
     my $cmd = [];
     push @$cmd, '/usr/bin/qemu-img', 'convert', '-p', '-n';
-    push @$cmd, '-l', "snapshot.name=$snapname"
-       if $snapname && $src_format && $src_format eq "qcow2";
+    push @$cmd, '-l', "snapshot.name=$snapname" if $snapname && $snapshot_type 
== 2;
     push @$cmd, '-t', 'none' if $dst_scfg->{type} eq 'zfspool';
     push @$cmd, '-T', $cachemode if defined($cachemode);
     push @$cmd, '-r', "${bwlimit}K" if defined($bwlimit);
-- 
2.39.5



--- End Message ---
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to