mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-14 18:04:27 +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();
|
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"
|
die "unable to remove VM $vmid - used in HA resources\n"
|
||||||
if PVE::HA::Config::vm_is_ha_managed($vmid);
|
if PVE::HA::Config::vm_is_ha_managed($vmid);
|
||||||
|
|
||||||
|
@ -384,6 +384,12 @@ EODESCR
|
|||||||
maxLength => 256,
|
maxLength => 256,
|
||||||
optional => 1,
|
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 ?
|
# what about other qemu settings ?
|
||||||
|
Loading…
Reference in New Issue
Block a user