[pve-devel] [RFC v2 qemu-server 5/5] deactivate volumes after storage_migrate

Fabian Ebner f.ebner at proxmox.com
Fri Nov 6 15:30:59 CET 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

same comment as for the corresponding LXC patch

 PVE/QemuMigrate.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index f2c2b07..10cf31a 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -569,6 +569,11 @@ sub sync_disks {
 
 		$self->{volume_map}->{$volid} = $new_volid;
 		$self->log('info', "volume '$volid' is '$new_volid' on the target\n");
+
+		eval { PVE::Storage::deactivate_volumes($storecfg, [$volid]); };
+		if (my $err = $@) {
+		    $self->log('warn', $err);
+		}
 	    }
 	}
     };
-- 
2.20.1






More information about the pve-devel mailing list