]> git.proxmox.com Git - qemu-server.git/commitdiff
use new move_config_to_node method
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 1 Dec 2020 12:06:59 +0000 (13:06 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Dec 2020 14:21:37 +0000 (15:21 +0100)
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuMigrate.pm

index 83ba5e2a319e45e548097cdf510c5f9e128ee25f..a8f66448407ec7f5aca02ed45199a253b6bf1269 100644 (file)
@@ -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}) {