Managing USB Devices

Enable USB

Enable up to the support you want - e.g: OHCI and EHCI for USB 2.0.

vboxmanage modifyvm ${VM_UUID} --usbohci on # USB 1.1
vboxmanage modifyvm ${VM_UUID} --usbehci on # USB 2.0
vboxmanage modifyvm ${VM_UUID} --usbxhci on # USB 3.x

Locate USB Device

vboxmanage list usbhost

Attach / Detach at Runtime

vboxmanage controlvm ${VM_UUID} usbattach ${USB_UUID}
vboxmanage controlvm ${VM_UUID} usbdetach ${USB_UUID}

Add Filters (auto attach / detach)

vboxmanage list usbhost

# push filters into the top
vboxmanage usbfilter add 0 --target ${VM_UUID} --vendorid ${USB_VID} --productid ${USB_PID}
vboxmanage usbfilter add 0 --target ${VM_UUID} --vendorid ${USB_VID} --productid ${USB_PID} --serialnumber ${USB_SERIAL}

# show VM filters:
vboxmanage showvminfo ${VM_UUID}

vboxmanage usbfilter modify ${FILTER_IDX} --target ${VM_UUID} ...
vboxmanage usbfilter remove ${FILTER_IDX}


Don't try to attach to the host machine, instead attach directly to Virtual Box:

vboxmanage usbdevsource add "${SERVER}" --backend USBIP --address "${SERVER}"
vboxmanage usbdevsource remove "${SERVER}"

Devices are then visible using vboxmanage list usbhost.