Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It seems like a lot of the pain comes from the fact that hardware passthrough behaves so differently under LXC vs VMs.

Has anyone here found a stable way to handle USB / PCIe device identity changes across updates or reboots?

That part always feels like the weak point in otherwise solid Proxmox setups



I just use UUID to make sure the mountpoint for each device stays the same across reboots.


For most part it's okay to pass through by I'd, unless it's some chinese device, which reminds me of the scene from Life Aquatic with Steve Zissou:

"- do interns get Glocks? - no, they all share one"


_If_ the device does have a serial by id, you’ll be fine - if not (I.e. it is mapped by /dev/bus/usb/001/002 for example) you’re mostly out of luck. Cases in point recently encountered: USB printers (to be used in container with CUPS), Eaton UPS to be used in container with NUT.

No amount of scripting with systemd path units, pre and post hooks, udev rules could make those work reliably (for me).

Solution, or workaround, after much headdesking: put services into a VM, map USB device by vendor:device ID, done.

If anyone could shed a light into why that is possible with a VM but not a LXC container, I’d be thankful!


You should be able to use the "Resource Mappings"[0] tab in the Datacenter view.

[0]: https://pve.proxmox.com/pve-docs/chapter-qm.html#resource_ma...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: