]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuServer.pm
migrate: keep VM paused after migration if it was before
[qemu-server.git] / PVE / QemuServer.pm
index eb2db42a127b338a1e24f5f79477adb6adcf8e72..0be6be909ae21336252cdcdae6839a5147f6e638 100644 (file)
@@ -6670,7 +6670,6 @@ sub restore_proxmox_backup_archive {
        my $index = PVE::Tools::file_get_contents($index_fn);
        $index = decode_json($index);
 
-       # print Dumper($index);
        foreach my $info (@{$index->{files}}) {
            if ($info->{filename} =~ m/^(drive-\S+).img.fidx$/) {
                my $devname = $1;
@@ -7708,7 +7707,12 @@ sub clone_disk {
                my $bs = 1024*1024;
 
                my $cmd = ['qemu-img', 'dd', '-n', '-O', $dst_format];
-               push $cmd->@*, '-l', $snapname if $src_format eq 'qcow2' && $snapname;
+
+               if ($src_format eq 'qcow2' && $snapname) {
+                   die "cannot clone qcow2 EFI disk snapshot - requires QEMU >= 6.2\n"
+                       if !min_version(kvm_user_version(), 6, 2);
+                   push $cmd->@*, '-l', $snapname;
+               }
                push $cmd->@*, "bs=$bs", "osize=$size", "if=$src_path", "of=$dst_path";
                run_command($cmd);
            } else {