]> git.proxmox.com Git - qemu-server.git/commitdiff
Destroy all remote and local replication datasets when a VM will destroyed.
authorWolfgang Link <w.link@proxmox.com>
Mon, 24 Apr 2017 15:15:42 +0000 (17:15 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 28 Apr 2017 08:11:33 +0000 (10:11 +0200)
PVE/API2/Qemu.pm

index 4737500ede2a5af27002b8916346de09a287b5c6..3fb1ab245d44f0c193ce06703836ae289f27b8f8 100644 (file)
@@ -1319,6 +1319,9 @@ __PACKAGE__->register_method({
 
            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::AccessControl::remove_vm_access($vmid);