Remove guest states to ensure no old states are exists

This commit is contained in:
Wolfgang Link 2017-06-27 15:12:03 +02:00 committed by Dietmar Maurer
parent 9b1396edd2
commit 223e032b74

View File

@ -526,6 +526,9 @@ __PACKAGE__->register_method({
PVE::AccessControl::add_vm_to_pool($vmid, $pool) if $pool;
};
# ensure no old replication state are exists
PVE::ReplicationState::delete_guest_states($vmid);
return $rpcenv->fork_worker('qmrestore', $vmid, $authuser, $realcmd);
};
@ -534,6 +537,9 @@ __PACKAGE__->register_method({
# test after locking
PVE::Cluster::check_vmid_unused($vmid);
# ensure no old replication state are exists
PVE::ReplicationState::delete_guest_states($vmid);
my $realcmd = sub {
my $vollist = [];