1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/virt-removing-mediated-device-from-cluster-cli.adoc

47 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * virt/virtual_machines/advanced_vm_management/virt-configuring-virtual-gpus.adoc
:_mod-docs-content-type: PROCEDURE
[id="virt-removing-mediated-device-from-cluster-cli_{context}"]
= Removing mediated devices from the cluster
[role="_abstract"]
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 {oc-first}.
.Procedure
. Edit the `HyperConverged` CR in your default editor by running the following command:
+
[source,terminal,subs="attributes+"]
----
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
----
. Remove the device information from the `spec.mediatedDevicesConfiguration` and `spec.permittedHostDevices` stanzas of the `HyperConverged` CR. Removing both entries ensures that you can later create a new mediated device type on the same node. For example:
+
[source,yaml,subs="attributes+"]
----
apiVersion: hco.kubevirt.io/v1
kind: HyperConverged
metadata:
name: kubevirt-hyperconverged
namespace: {CNVNamespace}
spec:
mediatedDevicesConfiguration:
mediatedDeviceTypes:
- nvidia-231
permittedHostDevices:
mediatedDevices:
- mdevNameSelector: GRID T4-2Q
resourceName: nvidia.com/GRID_T4-2Q
----
** To remove the `nvidia-231` device type, delete it from the `mediatedDeviceTypes` array.
** To remove the `GRID T4-2Q` device, delete the `mdevNameSelector` field and its corresponding `resourceName` field.
. Save your changes and exit the editor.