]> git.proxmox.com Git - pve-container.git/commitdiff
use new move_config_to_node method
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 1 Dec 2020 12:06:58 +0000 (13:06 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Dec 2020 15:18:56 +0000 (16:18 +0100)
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/LXC/Migrate.pm

index 7c3536f863c3369fe9a159421810285d0cfa4bc8..cb1ea7a2192591ed45ac855316617c793f69ee01 100644 (file)
@@ -301,9 +301,6 @@ sub phase1 {
        }
     }
 
-    my $conffile = PVE::LXC::Config->config_file($vmid);
-    my $newconffile = PVE::LXC::Config->config_file($vmid, $self->{node});
-
     if ($self->{running}) {
        die "implement me";
     }
@@ -318,15 +315,10 @@ sub phase1 {
     my $vollist = PVE::LXC::Config->get_vm_volumes($conf);
     PVE::Storage::deactivate_volumes($self->{storecfg}, $vollist);
 
-   # transfer replication state before move config
+    # transfer replication state before moving config
     $self->transfer_replication_state() if $rep_volumes;
-
-    # move config
-    die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
-       if !rename($conffile, $newconffile);
-
+    PVE::LXC::Config->move_config_to_node($vmid, $self->{node});
     $self->{conf_migrated} = 1;
-
     $self->switch_replication_job_target() if $rep_volumes;
 }