]> git.proxmox.com Git - qemu-server.git/commitdiff
Fix test_volid call for vmstate and fix check for snapshots on migration
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 16 Apr 2020 12:54:42 +0000 (14:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Apr 2020 10:14:40 +0000 (12:14 +0200)
by excluding vmstate. It is referenced by snapshots, but
is not a volume containing a snapshot.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuMigrate.pm
PVE/QemuServer.pm

index d90b709f2f0e63fc9c3874d2793547f143b55b4c..b5b2ae30f2678542dfca6989517be97719defdb9 100644 (file)
@@ -404,6 +404,8 @@ sub sync_disks {
            die "owned by other VM (owner = VM $owner)\n"
                if !$owner || ($owner != $vmid);
 
+           return if $attr->{is_vmstate};
+
            if (defined($snaprefs)) {
                $local_volumes->{$volid}->{snapshots} = 1;
 
index 23621e5da26dd1c8e4032825e1f1fa13987f3aac..0a403a4b675ca6707cdb125872f4020834495372 100644 (file)
@@ -4331,7 +4331,7 @@ sub foreach_volid {
 
     foreach my $snapname (keys %{$conf->{snapshots}}) {
        my $snap = $conf->{snapshots}->{$snapname};
-       $test_volid->($snap->{vmstate}, 0, 1, $snapname);
+       $test_volid->($snap->{vmstate}, 0, 1, 0, $snapname);
        $volhash->{$snap->{vmstate}}->{is_vmstate} = 1 if $snap->{vmstate};
        PVE::QemuConfig->foreach_volume($snap, sub {
            my ($ds, $drive) = @_;