$ oc delete vm <fedora-vm>
Use one of these procedures to delete a virtual machine:
Using the web console
Using the CLI
Deleting a virtual machine permanently removes it from the cluster.
Delete a virtual machine using the ⋮ button of the virtual machine in the Workloads → Virtual Machines list, or using the Actions control of the Virtual Machine Details screen.
In the container-native virtualization console, click Workloads → Virtual Machines from the side menu.
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 Actions → Delete Virtual Machine.
In the confirmation pop-up window, click Delete to permanently delete the virtual machine.
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.
|
Run the following command to delete the virtual machine:
$ oc delete vm <fedora-vm>
Run the following command to delete the DataVolume:
$ oc delete dv <datavolume-name>