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

Fabian Ebner f.ebner at proxmox.com
Thu Aug 20 11:11:40 CEST 2020


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

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 11fec4b..8ce265a 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -1181,14 +1181,7 @@ sub phase3_cleanup {
 
     # transfer replication state before move 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