X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FQemuMigrate.pm;h=4e6a7f0d0761df5f88ea3a840c46a1ac8ccb19fa;hb=4bdd20ab14465987f936b38b711ef791872dbda8;hp=471d5a158d9b34759f259f4a4dbfbbcd10317382;hpb=2e7fee87dfbba29926bf7f2ef3dd0d3c2025eca7;p=qemu-server.git diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 471d5a1..4e6a7f0 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -442,6 +442,7 @@ sub sync_disks { my $logfunc = sub { my ($msg) = @_; $self->log('info', $msg); }; $rep_volumes = PVE::Replication::run_replication( 'PVE::QemuConfig', $jobcfg, $start_time, $start_time, $logfunc); + $self->{replicated_volumes} = $rep_volumes; } foreach my $volid (keys %$local_volumes) { @@ -916,7 +917,7 @@ sub phase3_cleanup { } # transfer replication state before move config - $self->transfer_replication_state(); + $self->transfer_replication_state() if $self->{replicated_volumes}; # move config to remote node my $conffile = PVE::QemuConfig->config_file($vmid); @@ -925,7 +926,7 @@ sub phase3_cleanup { die "Failed to move config to node '$self->{node}' - rename failed: $!\n" if !rename($conffile, $newconffile); - $self->switch_replication_job_target(); + $self->switch_replication_job_target() if $self->{replicated_volumes}; if ($self->{livemigration}) { if ($self->{storage_migration}) {