[pve-devel] [PATCH qemu-server 3/3] Use new move_config_to_node method

Fabian Ebner f.ebner at proxmox.com
Wed Jul 1 13:39:07 CEST 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/QemuMigrate.pm | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 96de0db..cd4a005 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -1179,16 +1179,9 @@ sub phase3_cleanup {
 	PVE::QemuConfig->write_config($vmid, $conf);
     }
 
-    # transfer replication state before move config
+    # transfer replication state before moving config
     $self->transfer_replication_state() if $self->{replicated_volumes};
-
-    # move config to remote node
-    my $conffile = PVE::QemuConfig->config_file($vmid);
-    my $newconffile = PVE::QemuConfig->config_file($vmid, $self->{node});
-
-    die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
-        if !rename($conffile, $newconffile);
-
+    PVE::QemuConfig->move_config_to_node($vmid, $self->{node});
     $self->switch_replication_job_target() if $self->{replicated_volumes};
 
     if ($self->{livemigration}) {
-- 
2.20.1





More information about the pve-devel mailing list