diff --git a/docs/advanced/addons/pcidevices.md b/docs/advanced/addons/pcidevices.md index 53f9d8de4ab..fe4ab6a5890 100644 --- a/docs/advanced/addons/pcidevices.md +++ b/docs/advanced/addons/pcidevices.md @@ -1,13 +1,15 @@ --- sidebar_position: 2 -sidebar_label: PCI Devices -title: "PCI Devices" +sidebar_label: PCI Device +title: "PCI Device" ---
+## PCI Devices + _Available as of v1.1.0_ A `PCIDevice` in Harvester represents a host device with a PCI address. @@ -24,7 +26,7 @@ To use the PCI devices feature, users need to enable the `pcidevices-controller` Once the `pcidevices-controller` addon is deployed successfully, it can take a few minutes for it to scan and the PCIDevice CRDs to become available. ![](/img/v1.2/pcidevices/PcideviceEnabled.png) -## Enabling Passthrough on a PCI Device +### Enabling Passthrough on a PCI Device 1. Now go to the `Advanced -> PCI Devices` page: @@ -47,7 +49,7 @@ Once the `pcidevices-controller` addon is deployed successfully, it can take a f ![](/img/v1.2/pcidevices/enable-pcidevices-done.png) -## Attaching PCI Devices to a VM +### Attaching PCI Devices to a VM After enabling these PCI devices, you can navigate to the **Virtual Machines** page and select **Edit Config** to pass these devices. @@ -58,12 +60,12 @@ Select **PCI Devices** and use the **Available PCI Devices** drop-down. Select t ![](/img/v1.2/pcidevices/vm-pcidevices-attach.png) -## Using a passed-through PCI Device inside the VM +### Using a passed-through PCI Device inside the VM Boot the VM up, and run `lspci` inside the VM, the attached PCI devices will show up, although the PCI address in the VM won't necessarily match the PCI address in the host. -## Installing drivers for your PCI device inside the VM +### Installing drivers for your PCI device inside the VM This is just like installing drivers in the host. The PCI passthrough feature will bind the host device to the `vfio-pci` driver, which gives VMs the ability to use their own drivers. [Here is a screenshot](https://tobilehman.com/posts/suse-harvester-pci/#toc) of NVIDIA drivers being installed in a VM. It includes a CUDA example that proves that the device drivers work. @@ -94,4 +96,17 @@ We have also introduced a new filter to help you filter PCI devices by the under ![](/img/v1.2/pcidevices/SriovNetworkDevicesFilter.png) The newly created PCI device can be passed through to virtual machines like any other PCI device. -![](/img/v1.2/pcidevices/SriovNetworkDevicesFilterResult.png) \ No newline at end of file +![](/img/v1.2/pcidevices/SriovNetworkDevicesFilterResult.png) + +## USB Devices + +A `USBDevice` in Harvester represents a USB device **on the node.** This is accomplished by using the `pcidevices-controller` addon. + +The devices can be passed through the hypervisor to a VM by creating a `USBDeviecClaim` resource, or by using the UI to enable passthrough. Passing a device through the hypervisor means that the VM can directly access the device, and effectively owns the device. + +It's slightly different from PCI Devices. For example, we have a USB Controller with four USB ports. We'll get a full control by creating `PCIDeviceClaim`. However, we can also get one USB port by creating `USBDeviceClaim`. The rest of USB ports are still available to the node. + +### Limitations + +1. Don't support live migration since USB device is bound to the specified node. +2. Don't support hot plug, please see [reference](https://github.com/kubevirt/kubevirt/issues/11979). \ No newline at end of file