Skip to content

Passthrough a USB or TTY from the Host

In this case the device is a USB device posing as a serial port.

List the USB device

ls -l /dev/bus/usb/004/005

Result

crw-rw-r-- 1 root root 189, 388 Oct 25 16:19 /dev/bus/usb/004/005

Take note of the numbers 189,388 and use them in the edit

Edit the LXC Config file /var/lib/lxc/<name>

lxc.cgroup.devices.allow = c 189:388 rwm
lxc.mount.entry = /dev/bus/usb/004/005 dev/bus/usb/004/005 none bind,optional,create=file

List the TTY (zwave controller)

ls -l /dev/ttyACM0

Result

crwxrwxrwx 1 root dialout 166, 0 Oct 30 13:38 /dev/ttyACM0

Take note of the numbers 166 and use them in the edit

Edit the LXC Config file

lxc.cgroup.devices.allow: c 166:* rwm
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file