9.17.11.5.3. Removing mediated devices from the cluster
To remove a mediated device from the cluster, delete the information for that device from the HyperConverged custom resource (CR).
Prerequisites
-
You have installed the OpenShift CLI (
oc).
Procedure
Edit the
HyperConvergedCR in your default editor by running the following command:$ oc edit hyperconverged kubevirt-hyperconverged -n openshift-cnvRemove the device information from the
spec.mediatedDevicesConfigurationandspec.permittedHostDevicesstanzas of theHyperConvergedCR. Removing both entries ensures that you can later create a new mediated device type on the same node. For example:apiVersion: hco.kubevirt.io/v1 kind: HyperConverged metadata: name: kubevirt-hyperconverged namespace: openshift-cnv spec: mediatedDevicesConfiguration: mediatedDeviceTypes: - nvidia-231 permittedHostDevices: mediatedDevices: - mdevNameSelector: GRID T4-2Q resourceName: nvidia.com/GRID_T4-2Q-
To remove the
nvidia-231device type, delete it from themediatedDeviceTypesarray. -
To remove the
GRID T4-2Qdevice, delete themdevNameSelectorfield and its correspondingresourceNamefield.
-
To remove the
- Save your changes and exit the editor.