This is a cache of https://docs.okd.io/latest/virt/managing_vms/virt-delete-vms.html. It is a snapshot of the page at 2026-11-10T20:21:44.761+0000.
Deleting virtual machines - Managing VMs | Virtualization | OKD 5
×

You can remove virtual machines (VMs) from your cluster to free up resources using either the web console or cli. Deleting a VM removes the virtual machine definition and optionally its associated storage resources.

Delete a VM by using the web console

You can permanently remove a virtual machine (VM) from the cluster by using the OKD web console. The Delete action is disabled while the VM is delete protected.

Prerequisites
  • You have disabled the VM’s delete protection setting.

  • You have stopped the VM.

Procedure
  1. From the OKD web console, choose your view:

    • For a virtualization-focused view, select Administrator → Virtualization → VirtualMachines.

    • For a general view, navigate to Virtualization → VirtualMachines.

  2. click the Options menu kebab beside a VM and select Delete.

    Alternatively, click the VM’s name to open the VirtualMachine details page and click Actions → Delete.

    You can also right-click the VM in the tree view and select Delete from the pop-up menu.

  3. Optional: Select With grace period or clear Delete disks.

  4. click Delete to permanently delete the VM.

Delete a VM by using the cli

You can delete a virtual machine (VM) by using the OpenShift cli (oc). The command deletes a VM in the current project unless you specify another namespace.

Prerequisites
  • You have disabled the VM’s delete protection setting.

  • You have stopped the VM.

  • You have installed the OpenShift cli (oc).

Procedure
  • Delete the VM by running the following command:

    $ oc delete vm <vm_name>

    This command only deletes a VM in the current project. Specify the -n <project_name> option if the VM you want to delete is in a different project or namespace.