$ oc delete HyperConverged kubevirt-hyperconverged -n openshift-cnv
You can uninstall OpenShift Virtualization by using the OpenShift Container Platform cli.
You must have OpenShift Virtualization 4.8 installed.
You must delete all virtual machines, virtual machine instances, and data volumes.
Attempting to uninstall OpenShift Virtualization without deleting these objects results in failure. |
You can delete OpenShift Virtualization by using the cli.
Install the OpenShift cli (oc
).
Access to a OpenShift Virtualization cluster using an account with
cluster-admin
permissions.
When you delete the subscription of the OpenShift Virtualization operator in the OLM by using the cli, the |
Delete the HyperConverged
custom resource:
$ oc delete HyperConverged kubevirt-hyperconverged -n openshift-cnv
Delete the subscription of the OpenShift Virtualization operator in the Operator Lifecycle Manager (OLM):
$ oc delete subscription kubevirt-hyperconverged -n openshift-cnv
Set the cluster service version (CSV) name for OpenShift Virtualization as an environment variable:
$ CSV_NAME=$(oc get csv -n openshift-cnv -o=jsonpath="{.items[0].metadata.name}")
Delete the CSV from the OpenShift Virtualization cluster by specifying the CSV name from the previous step:
$ oc delete csv ${CSV_NAME} -n openshift-cnv
OpenShift Virtualization is uninstalled when a confirmation message indicates that the CSV was deleted successfully:
clusterserviceversion.operators.coreos.com "kubevirt-hyperconverged-operator.v4.8.7" deleted