mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-14 05:47:43 +00:00
VM protection mode added
used to prevent an unintended virtual machine remove operation v3 changes: - changed man page message - removed protection parameter (where not needed)
This commit is contained in:
parent
1dbd6d30e0
commit
cb0e4540f7
@ -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);
|
||||
|
||||
|
@ -384,6 +384,12 @@ EODESCR
|
||||
maxLength => 256,
|
||||
optional => 1,
|
||||
},
|
||||
protection => {
|
||||
optional => 1,
|
||||
type => 'boolean',
|
||||
description => "Sets the protection flag of the VM. This will prevent the remove operation.",
|
||||
default => 0,
|
||||
},
|
||||
};
|
||||
|
||||
# what about other qemu settings ?
|
||||
|
Loading…
Reference in New Issue
Block a user