Pcornel
Virtualization · PCI & Device Passthrough

USB Passthrough

Cheat sheet · https://pcornel.dk/topic.php?topic=3550

Back to the Topic

Answer

USB passthrough connects a physical USB device or controller to a VM — for license dongles, serial adapters or tokens. Passing a single device is flexible; passing the whole controller is more reliable for demanding devices.

Remember

  • Device passthrough vs controller passthrough.
  • Hot-plug may change addressing.
  • Licensing dongles may need persistence.

First checks

  • lsusb — host USB devices
  • qm set <vmid> --usb0 host=<vid:pid> — Proxmox USB
  • virsh attach-device <vm> usb.xml --live — libvirt hotplug

Commands

qm set 120 --usb0 host=1234:5678

Verify in this order

USB device → passthrough → guest

Where it usually breaks

First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3550

Confirmation

Confirm action

Continue?