mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-28 18:02:07 +00:00
move config file in phase3, when live migration is finished
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
7f4a5b5a6e
commit
b8d208023b
@ -267,12 +267,6 @@ sub phase1 {
|
||||
|
||||
sync_disks($self, $vmid);
|
||||
|
||||
# move config to remote node
|
||||
my $conffile = PVE::QemuServer::config_file($vmid);
|
||||
my $newconffile = PVE::QemuServer::config_file($vmid, $self->{node});
|
||||
|
||||
die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
|
||||
if !rename($conffile, $newconffile);
|
||||
};
|
||||
|
||||
sub phase1_cleanup {
|
||||
@ -396,6 +390,13 @@ sub phase3_cleanup {
|
||||
|
||||
my $conf = $self->{vmconf};
|
||||
|
||||
# move config to remote node
|
||||
my $conffile = PVE::QemuServer::config_file($vmid);
|
||||
my $newconffile = PVE::QemuServer::config_file($vmid, $self->{node});
|
||||
|
||||
die "Failed to move config to node '$self->{node}' - rename failed: $!\n"
|
||||
if !rename($conffile, $newconffile);
|
||||
|
||||
# always stop local VM
|
||||
eval { PVE::QemuServer::vm_stop($self->{storecfg}, $vmid, 1, 1); };
|
||||
if (my $err = $@) {
|
||||
|
Loading…
Reference in New Issue
Block a user