Use this when a VM needs a USB dongle, token or serial adapter.
USB Passthrough
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.
1. USB passthrough maps host USB devices to a VM.
2. By vendor:product or by port.
3. Whole USB controller passthrough for many devices.
4. Pins VM to host.
5. Check in guest.
USB device → passthrough → guest
Context & applicabilityCommon mistakes · platform/version boundaries
- Device re-enumerates with a new address after unplugging, breaking bus/port-based passthrough — use vendor/product ID mapping.
- Dongles or licence keys not passed after host reboot.
- USB 3 devices on a USB 2 virtual controller (add an xHCI controller).
- Live migration blocked by local USB devices; consider USB over IP.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Device passthrough vs controller passthrough.
- Hot-plug may change addressing.
- Licensing dongles may need persistence.
lsusb— host USB devicesqm set <vmid> --usb0 host=<vid:pid>— Proxmox USBvirsh attach-device <vm> usb.xml --live— libvirt hotplug
ReferenceWhy it matters1 section · depth on demand
Methods
- Single device by vendor:product ID (
qm set 120 --usb0 host=1234:5678, VMware "Add USB device", Hyper-V needs USB over network or RDP redirection). - Whole USB controller via PCIe passthrough for many devices or hot-plug reliability.
- Network USB hubs for clustered environments.
USB-passthrough VMs cannot live-migrate (except with network USB).
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
USB passthrough connects a host USB device or port to a VM.
lsusb # Bus 001 Device 004: ID 0529:0001 Aladdin HASP
qm set 120 --usb0 host=0529:0001 # by vendor:product (follows the device)
qm set 120 --usb1 host=1-2 # by physical port
virsh attach-device vm1 usb.xml --live
By-ID mapping follows the device across ports; by-port mapping lets you swap identical devices. USB 3 devices need an xHCI controller in the VM (usb3=1). For HA clusters, use USB-over-IP devices so the VM can restart elsewhere.
ReferenceConfiguration & state1 section · depth on demand
Configuration
# Proxmox (by vendor:product)
qm set 101 --usb0 host=046d:c52b
# libvirt
<hostdev mode='subsystem' type='usb'>
<source><vendor id='0x046d'/><product id='0xc52b'/></source>
</hostdev>
Documented example, not captured output. Find IDs with lsusb.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in PCI & Device Passthrough → USB Passthrough. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/driver-api/vfio.html · confidence 94%