Signed-off-by: Alexandre Derumier <aderum...@odiso.com> --- PVE/QemuMigrate.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index ff942bb..7c610b7 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -593,6 +593,8 @@ sub phase2_cleanup { } } + unlock_vm($self, $vmid); + my $nodename = PVE::INotify::nodename(); my $cmd = [@{$self->{rem_ssh}}, 'qm', 'stop', $vmid, '--skiplock', '--migratedfrom', $nodename]; @@ -1142,4 +1144,15 @@ sub cancel_migrate { $self->log('info', "migrate_cancel error: $@") if $@; } +sub unlock_vm { + my ($self, $vmid) = @_; + + my $conf = $self->{vmconf}; + delete $conf->{lock}; + eval { PVE::QemuConfig->write_config($vmid, $conf) }; + if (my $err = $@) { + $self->log('err', $err); + } +} + 1; -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel