]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/API2/Qemu.pm
VM protection mode added
[qemu-server.git] / PVE / API2 / Qemu.pm
index 20d73f748275d0487e9106f4b53ca097820580ab..1687a07a31ca3141566b98f42897b777061ff159 100644 (file)
@@ -1142,6 +1142,9 @@ __PACKAGE__->register_method({
 
        my $storecfg = PVE::Storage::config();
 
+       die  "can't remove VM $vmid - protection mode enabled\n"
+           if ($conf->{protection} == 1);
+
        die "unable to remove VM $vmid - used in HA resources\n"
            if PVE::HA::Config::vm_is_ha_managed($vmid);