[pve-devel] [PATCH] fix bug #750: deactivate volumes to be sure there are no volumes active on the source node

Wolfgang Link w.link at proxmox.com
Fri Oct 9 14:13:53 CEST 2015


---
 src/PVE/LXC/Migrate.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index 1a51829..58e4ea2 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -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);
-- 
2.1.4





More information about the pve-devel mailing list