:_mod-docs-content-type: ASSEMBLY
[id="virt-enabling-disabling-vm-delete-protection"]
= Enable or disable virtual machine delete protection
include::_attributes/common-attributes.adoc[]
:context: virt-enabling-disabling-vm-delete-protection

toc::[]

[role="_abstract"]
You can prevent accidental deletion of a virtual machine (VM) by enabling delete protection. If delete protection is enabled, you must disable it before you can delete that VM.

You enable or disable delete protection from either the command line or the VM's *VirtualMachine details* page in the {product-title} web console. The option is disabled by default.

You can also choose to remove availability of the delete protection option for any VMs in a cluster you administer. In this case, VMs with the feature already enabled retain the protection, while the option is unavailable for any newly created VMs.

include::modules/virt-enabling-disabling-vm-delete-protection-web.adoc[leveloffset=+1]
include::modules/virt-enabling-disabling-vm-delete-protection-cli.adoc[leveloffset=+1]
include::modules/virt-removing-vm-delete-protection.adoc[leveloffset=+1]

[role="_additional-resources"]
[id="additional-resources_{context}"]
== Additional resources
* xref:../../virt/managing_vms/virt-enabling-disabling-vm-delete-protection.adoc#virt-enabling-disabling-vm-delete-protection-web_virt-enabling-disabling-vm-delete-protection[Enabling or disabling virtual machine delete protection by using the web console]
* xref:../../virt/managing_vms/virt-enabling-disabling-vm-delete-protection.adoc#virt-enabling-disabling-vm-delete-protection-cli_virt-enabling-disabling-vm-delete-protection[Enabling or disabling virtual machine delete protection by using the CLI]
