[pve-devel] [PATCH v2 qemu-server 2/2] VM protection mode

Alen Grizonic a.grizonic at proxmox.com
Fri Sep 18 11:34:08 CEST 2015


[PATCH v2] changes:

- changed call also for remove VM
---
 PVE/API2/Qemu.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 8eea6e9..780a8fb 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1163,8 +1163,7 @@ __PACKAGE__->register_method({
 
 	my $storecfg = PVE::Storage::config();
 
-	die  "can't remove VM $vmid - protection mode enabled\n"
-	    if $conf->{protection};
+	&$check_protection($conf, "can't remove VM $vmid");
 
 	die "unable to remove VM $vmid - used in HA resources\n"
 	    if PVE::HA::Config::vm_is_ha_managed($vmid);
-- 
2.1.4





More information about the pve-devel mailing list