Coral USB Passthrough to Proxmox VM
• 2 minute read • Linux
It was time to disassemble the year-long temporary Frigate machine to continue in a standardized Kubernetes setup (running in VMs). The Proxmox machines don’t have M.2 slots, but they do have plenty of internal USB ports. Passthrough wasn’t straight forward.
XtremeOwnaga documented it working, but with the proprietary driver installed on the hypervisor – which an another admin didn’t find acceptable. After a while debugging, the following conditions have to be met:
- The machine type has to be
q35. Mind that cloud-init does not run (on Debian cloud images), it is reasonable to boot the machine once with i440fx first.
- The cloud kernel does not have USB drivers: replace
linux-image-cloud-amd64 with linux-image-amd64
- VM has Coral drivers:
libedgetpu1-std (ansible)
Finding the correct hub/port (not device, as the TPU reboots once the driver loads) to pass through was a challenge for the specific Supermicro server – the USB hubs have identical identifiers:
- PVE docs refer to
pvesh get /nodes/<name>/hardware/pci --pci-class-blacklist "" and lspci as to hail IOMMU and pass it as a raw PCI(e) device, which, with the dupes, didn’t really work.
usb-devices (from usbutils) ended up being the most informative, where I could see where the numbers in the other commands came from.
- Ultimately,
lsusb (-t / -v) does the job, look for Google Inc..
VM: Hardware → Add → USB Device → Use USB Port. Mine ended up being 6-1. Make sure to the virtual machine is pinned to the node in HA.