@@ -23,12 +23,12 @@ You can configure virtual machine (VM) access to a USB device. This configuratio
2323$ oc get {HCOCliKind} kubevirt-hyperconverged -n {CNVNamespace}
2424----
2525+
26- * Example output*
26+ Example output:
2727+
2828[source, yaml]
2929----
3030# ...
31- spec:
31+ spec:
3232 permittedHostDevices:
3333 usbHostDevices:
3434 - resourceName: kubevirt.io/peripherals
@@ -41,42 +41,43 @@ $ oc get {HCOCliKind} kubevirt-hyperconverged -n {CNVNamespace}
4141 product: "b100"
4242----
4343
44- . Open the VM instance CR:
44+ . Open the VM CR:
4545+
4646[source,terminal]
4747----
48- $ oc edit vmi < vmi _usb >
48+ $ oc edit vm < vm _name >
4949----
5050+
5151 where:
5252+
53- `<vmi_usb>` :: Specifies the name of the `VirtualMachineInstance` CR.
54-
53+ `<vm_name>` :: Specifies the name of the `VirtualMachine` CR.
5554
5655. Edit the CR by adding the USB device, as shown in the following example:
5756+
58- * Example configuration*
57+ Example configuration:
5958+
6059[source, yaml]
6160----
6261apiVersion: kubevirt.io/v1
63- kind: VirtualMachineInstance
62+ kind: VirtualMachine
6463metadata:
65- labels:
66- special: vmi-usb
67- name: vmi-usb
64+ name: example-vm
6865spec:
69- domain:
70- devices:
71- hostDevices:
72- - deviceName: kubevirt.io/peripherals
73- name: local-peripherals
66+ template:
67+ spec:
68+ architecture: amd64
69+ domain:
70+ devices:
71+ hostDevices:
72+ - deviceName: kubevirt.io/peripherals
73+ name: local-peripherals
7474# ...
7575----
7676+
77- * `spec.domain.devices.hostDevices.name` defines the name of the USB device.
77+ * `spec.template.spec.domain.devices.hostDevices.deviceName` specifies the resource name from the `HyperConverged` CR.
78+ * `spec.template.spec.domain.devices.hostDevices.name` defines the name of the USB device.
7879
79- . Apply the modifications to the VM configurations :
80+ . Save and apply your changes :
8081+
8182[source,terminal]
8283----
@@ -85,4 +86,4 @@ $ oc apply -f <filename>.yaml
8586+
8687 where:
8788+
88- <filename >:: Specifies the name of the `VirtualMachineInstance ` manifest YAML file.
89+ ` <filename>` :: Specifies the name of the `VirtualMachine ` manifest YAML file.
0 commit comments