]> git.proxmox.com Git - qemu-server.git/commitdiff
VM protection mode
authorAlen Grizonic <a.grizonic@proxmox.com>
Fri, 18 Sep 2015 09:34:08 +0000 (11:34 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 21 Sep 2015 04:36:01 +0000 (06:36 +0200)
[PATCH v2] changes:

- changed call also for remove VM

PVE/API2/Qemu.pm

index 5c72e6a05f8560ce5aff501bbc8509051ea6bf6d..295e98612eaffc7895384f46dfc6a044111ca3a3 100644 (file)
@@ -1162,8 +1162,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);