% qemu usb passthrough % % 2023-04-07
reference:
https://wiki.archlinux.org/title/Udev
https://unix.stackexchange.com/questions/250938/qemu-usb-passthrough-windows-guest
get vendorid and productid by inspecting lsusb
output.
replace xxxx / yyyy with real id.
add permission for wheel group (udev)
add file in /etc/udev/rules.d/, e.g. 90-betop.rules
.
ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="yyyy", GROUP="wheel"
# root
udevadm control --reload
... -usb -device usb-host,vendorid=0x{xxxx},productid=0x{yyyy} ...
package qemu-device-usb-host
is required; otherwise device type usb-host
will not be recognized.
workaround with qemu-img (a fake usb img) and dd.