Delete a VM
Delete a virtual machine (VM) when you no longer need it or when its creation failed. Together with the VM, Center deletes all its disks and snapshots and releases its IP addresses.
Before you begin
- You need the VDC admin role in the VDC (virtual data center) of this VM, or the Cluster master role.
- The data you need from the VM disks is saved elsewhere. You cannot restore a deleted VM, its disks or its snapshots.
- The VM is not being moved right now: while it has the Migrating or Sending status, the Remove item is inactive.
- The VM has no clones. While it has clones, the Remove item is inactive with the tooltip This VM cannot be deleted. It is a source for clones.; the clones are listed in the Linked clones section on the VM page. Delete the clones first — Clone a VM.
Stop the VM first — Start, stop and restart a VM. Deletion does not wait for the VM to stop: if the VM runs on the node of its pool, the node terminates it forcibly, without a graceful shutdown of the guest OS. If the VM runs on another node, the deletion fails — Using with nvmf-share.
1. Open the VM
- In the left menu, select Virtual Data Centers → the VDC → Virtual Machines → the VM. The VM page opens.
Check the result
Make sure that the open VM is the one you want to delete:
- the VM name is in the page header, and its VDC is in the VDC field of the General properties block;
- the Disks section shows the disks that will be deleted together with the VM;
- the Snapshots section shows the snapshots that will be deleted together with the VM.
If the Actions menu has no Remove item, you do not have the required role in this VDC.
Delete the VM
Warning. Center deletes the VM and all its disks and snapshots permanently.
- On the VM page, select Actions → Remove. The Are you sure want to remove <VM name>? window opens.
- Click Remove.
When the VM is deleted, the web interface shows the notification VM (id: <ID>, name: <name>) was successfully deleted and opens the Virtual Machines list of the VDC. If this was the last VM of the VDC, the web interface opens the VDC page.
You can also delete a VM from the Virtual Machines table: ⋯ in the VM row → Additional actions → Remove. In this case, the table stays open.
If the VM could not be deleted, the web interface shows a notification with the error text:
- VM is locked — another operation is in progress on the VM; the error message names it. Wait for the operation to finish and try again.
- The Cannot delete VM window with a list of clones — the VM has clones. Delete them, and then delete the VM.
Next
API methods: vms-remove — in the API reference.