KubeVirt included support for redirecting devices from the client's machine to the VMI with the support of virtctl command.
Support for redirection of client's USB device was introduced in release v0.44. This feature is not
enabled by default. To enable it, add an empty
clientPassthrough under devices, as such:
This configuration currently adds 4 USB slots to the VMI that can only be used with virtctl.
There are two ways of redirecting the same USB devices: Either using its device's vendor and product
information or the actual bus and device address information. In Linux, you can gather this info
lsusb, a redacted example below:
Using Vendor and Product¶
Redirecting the Kingston storage device.
Using Bus and Device address¶
Redirecting the integrated camera
virtctl command uses an application called
usbredirect to handle client's USB device by
unplugging the device from the Client OS and channeling the communication between the device and the
Managing USB devices requires privileged access in most Operation Systems. The user running
virtctl usbredir would need to be privileged or run it in a privileged manner (e.g: with
- Redirecting USB devices on Windows requires the installation of UsbDk.
- Be sure to have
usbredirectincluded in the PATH Enviroment Variable.