[lxc-users] Using devices in an unprivileged LXC container
Christian Brauner
christian.brauner at getenv.org
Mon Apr 9 08:25:03 UTC 2018
On Sun, Mar 25, 2018 at 05:23:21PM +0000, Avadhut Bhangui wrote:
> Hello,
> I have an ubuntu system. i login to the device as root user. I have two LXC containers created using the busbox template. One is privileged and other one is unprivileged.
> I want to ensure that when a USB device is connected to my ubuntu box, i should be able grant access to the unprivileged container. What options are possible and how do we do this?
Are you using LXD or LXC?
For LXD it should be as simple as
lxc config device add <container-name> <device-name> usb vendorid=<id> productid=<id>
vendor and product id can be gathered via lsusb. For example:
lxc config device add c1 sony usb vendorid=0fce productid=51da
would pass through a specific Sony phone.
Christian
More information about the lxc-users
mailing list