Destroy all remote and local replication datasets when a VM will destroyed.

This commit is contained in:
Wolfgang Link 2017-04-24 17:15:42 +02:00 committed by Wolfgang Bumiller
parent 63d02c7074
commit 9b49ba658f

View File

@ -1319,6 +1319,9 @@ __PACKAGE__->register_method({
syslog('info', "destroy VM $vmid: $upid\n"); syslog('info', "destroy VM $vmid: $upid\n");
# return without error if vm has no replica job
PVE::ReplicationTools::destroy_replica($vmid);
PVE::QemuServer::vm_destroy($storecfg, $vmid, $skiplock); PVE::QemuServer::vm_destroy($storecfg, $vmid, $skiplock);
PVE::AccessControl::remove_vm_access($vmid); PVE::AccessControl::remove_vm_access($vmid);