[pve-devel] [RFC qemu-server 3/4] migrate: cleanup nbd source disks earlier
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Apr 19 15:19:49 CEST 2017
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
PVE/QemuMigrate.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index b513a67..04118bd 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -885,6 +885,11 @@ sub phase3_cleanup {
if ($self->{livemigration}) {
if ($self->{storage_migration}) {
+ # remove drives referencing the nbd server from source
+ # otherwise vm_stop might hang later on
+ foreach my $drive (keys %{$self->{target_drive}}){
+ PVE::QemuServer::vm_mon_cmd_nocheck($vmid, "device_del", id => $drive);
+ }
# stop nbd server on remote vm - requirement for resume since 2.9
my $cmd = [@{$self->{rem_ssh}}, 'qm', 'nbdstop', $vmid];
--
2.1.4
More information about the pve-devel
mailing list