[pve-devel] [PATCH 1/5] move config file in phase3, when live migration is finished
Alexandre Derumier
aderumier at odiso.com
Mon Aug 13 16:41:11 CEST 2012
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/QemuMigrate.pm | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 1a35004..18b7fee 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -267,12 +267,6 @@ sub phase1 {
sync_disks($self, $vmid);
- # move config to remote node
- my $conffile = PVE::QemuServer::config_file($vmid);
- my $newconffile = PVE::QemuServer::config_file($vmid, $self->{node});
-
- die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
- if !rename($conffile, $newconffile);
};
sub phase1_cleanup {
@@ -396,6 +390,13 @@ sub phase3_cleanup {
my $conf = $self->{vmconf};
+ # move config to remote node
+ my $conffile = PVE::QemuServer::config_file($vmid);
+ my $newconffile = PVE::QemuServer::config_file($vmid, $self->{node});
+
+ die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
+ if !rename($conffile, $newconffile);
+
# always stop local VM
eval { PVE::QemuServer::vm_stop($self->{storecfg}, $vmid, 1, 1); };
if (my $err = $@) {
--
1.7.2.5
More information about the pve-devel
mailing list