[pve-devel] [PATCH 17/19] phase3_cleanup : don't write config in current cluster

Alexandre Derumier aderumier at odiso.com
Wed Feb 22 14:33:41 CET 2017


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuMigrate.pm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 64f3565..8779b00 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -955,10 +955,14 @@ sub phase3_cleanup {
 	    eval { PVE::QemuMigrate::cleanup_remotedisks($self) };
 	    die "Failed to completed storage migration\n";
 	} else {
-	    foreach my $target_drive (keys %{$self->{target_drive}}) {
-		my $drive = PVE::QemuServer::parse_drive($target_drive, $self->{target_drive}->{$target_drive}->{volid});
-		$conf->{$target_drive} = PVE::QemuServer::print_drive($vmid, $drive);
-		PVE::QemuConfig->write_config($vmid, $conf);
+
+	    if (!$self->{opts}->{externalcluster}) {
+
+		foreach my $target_drive (keys %{$self->{target_drive}}) {
+		    my $drive = PVE::QemuServer::parse_drive($target_drive, $self->{target_drive}->{$target_drive}->{volid});
+		    $conf->{$target_drive} = PVE::QemuServer::print_drive($vmid, $drive);
+		    PVE::QemuConfig->write_config($vmid, $conf);
+		}
 	    }
 	}
     }
-- 
2.1.4




More information about the pve-devel mailing list