[pve-devel] [PATCH v2] HA resources check before destroying vm

Alen Grizonic a.grizonic at proxmox.com
Fri Aug 28 15:56:54 CEST 2015


[PATCH v2] error message changed
---
 PVE/API2/Qemu.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 513b224..73a1572 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1142,6 +1142,9 @@ __PACKAGE__->register_method({
 
 	my $storecfg = PVE::Storage::config();
 
+	if (PVE::HA::Config::vm_is_ha_managed($vmid)) {
+	    die "unable to remove VM $vmid - used in HA resources\n";}
+
 	my $realcmd = sub {
 	    my $upid = shift;
 
-- 
2.1.4





More information about the pve-devel mailing list