Use one of these procedures to delete a virtual machine:

  • Using the web console

  • Using the CLI

Deleting a virtual machine using the web console

Deleting a virtual machine permanently removes it from the cluster.

Delete a virtual machine using the ⋮ button of the virtual machine in the WorkloadsVirtual Machines list, or using the Actions control of the Virtual Machine Details screen.

  1. In the container-native virtualization console, click WorkloadsVirtual Machines from the side menu.

  2. Click the ⋮ button of the virtual machine to delete and select Delete Virtual Machine.

    • Alternatively, click the virtual machine name to open the Virtual Machine Details screen and click ActionsDelete Virtual Machine.

  3. In the confirmation pop-up window, click Delete to permanently delete the virtual machine.

Deleting a virtual machine and its DataVolume using the CLI

When you delete a virtual machine, the DataVolume it uses is not automatically deleted.

Deleting the DataVolume is recommended in order to maintain a clean environment and avoid possible confusion.


Run these commands to delete the virtual machine and the DataVolume.

You can delete objects only in the project you are currently working in, unless you specify the -n <project_name> option.
  1. Run the following command to delete the virtual machine:

    $ oc delete vm <fedora-vm>
  2. Run the following command to delete the DataVolume:

    $ oc delete dv <datavolume-name>