[pve-devel] [PATCH v3 qemu-server 2/5] use new move_config_to_node method

Fabian Ebner f.ebner at proxmox.com
Tue Dec 1 13:06:59 CET 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Required dependency on libpve-guest-common-perl >=3.1-3

Changes from v2:
    * rebase

 PVE/QemuMigrate.pm | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 83ba5e2..a8f6644 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -1194,14 +1194,7 @@ sub phase3_cleanup {
 
     # transfer replication state before move config
     $self->transfer_replication_state() if $self->{is_replicated};
-
-    # 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->{is_replicated};
 
     if ($self->{livemigration}) {
-- 
2.20.1






More information about the pve-devel mailing list