]> git.proxmox.com Git - pve-container.git/blobdiff - src/PVE/LXC/Migrate.pm
fix bug #750: deactivate volumes to be sure there are no volumes active on the source...
[pve-container.git] / src / PVE / LXC / Migrate.pm
index 1a51829c4228c89be1b100e51be9449c0c2eb86f..58e4ea22ba4eb79b9775a0ef3f14a828ce021b9d 100644 (file)
@@ -113,6 +113,10 @@ sub phase1 {
 
     PVE::LXC::umount_all($vmid, $self->{storecfg}, $conf);
 
+    #to be sure there are no active volumes
+    my $vollist = PVE::LXC::get_vm_volumes($conf);
+    PVE::Storage::deactivate_volumes($self->{storecfg}, $vollist);
+
     # move config
     die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
        if !rename($conffile, $newconffile);