USB passthrough in unprivileged container

aC23

Active Member
Nov 21, 2019
10
0
41
47
Is there a way to do USB passthrough to an unprivileged container? This is exactly what I am trying to do: https://forum.proxmox.com/threads/lxc-usb-passthrough-zwave-stick.30058/

...and after a lot of frustration, I realized that it was because my container was unprivileged. chmod o+rw /dev/ttyACM0 did not help. I was able to follow those instructions successfully in a privileged container, though.

1. Is there a way to accomplish USB passthrough using an unprivileged container?
2. If not, is there a way for me to clone my container as privileged, or make it privileged after the fact? --EDIT: looks like a backup and restore will do the trick for this, unless there is another way?

Thank you
 
Last edited:
1. Is there a way to accomplish USB passthrough using an unprivileged container?

sure, you just need to make sure your mapped root uid in the unprivileged container can access the device in /dev/bus/usb/

something like: chown 100000:100000 /dev/bus/usb/003/005 should work. change bus numbers according to your setup