From 9b49ba658f57b222afd25e030d0bb3e387f9d197 Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Mon, 24 Apr 2017 17:15:42 +0200 Subject: [PATCH] Destroy all remote and local replication datasets when a VM will destroyed. --- PVE/API2/Qemu.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 4737500e..3fb1ab24 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -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);