Anything special about LXC dev passthrough on this?

I’ve been trying everything to get a USB device (Z-Wave stick) passed through to an LXC container and am having zero luck. Using global and container configurations of the cgroup nodes and the mount command. Using lxc-cgroup. Doing “ls” on the host of the lxc /dev/shows a lot of devices I don’t see using “ls” on the guest. I had some luck getting the device to appear using a manual mount --bind from the host to the guest dev directory, but it wasn’t visible within the guest.

Same problem here. I’m trying to pass through /dev/ttyUSB0. Device is available on host:

# ls /dev/ttyUSB* -la
crw-rw-rw-    1 root     root      188,   0 Dec  7 22:13 /dev/ttyUSB0

I added the following to the container config:

lxc.cgroup.devices.allow = c 188:* rwm
lxc.cgroup.devices.allow = c 189:* rwm
lxc.mount.entry = /dev/bus/usb/001 dev/bus/usb/001 none bind,optional,create=dir
lxc.mount.entry = /dev/bus/usb/002 dev/bus/usb/002 none bind,optional,create=dir
lxc.mount.entry = /dev/bus/usb/003 dev/bus/usb/003 none bind,optional,create=dir
lxc.mount.entry = /dev/bus/usb/004 dev/bus/usb/004 none bind,optional,create=dir
lxc.mount.entry = /dev/ttyUSB0 dev/ttyUSB0  none bind,optional,create=file

But the device does not appear within the container? What am I missing? Any hint is appreciated.

I ultimately was able to get things working by putting " 0 0" at the end of the mount lines. Makes me wonder if the mounting mechanism is related to fstab.


Thank you so much for your response.

That solved the issue for me as well!

You made my day. Cheers