Issues attempting to pass through USB devices to LXC container

gyrex

Member
Jul 19, 2022
91
19
8
Hi guys,

I've been trying all day to pass through a Zwave & Zigbee USB device through to an LXC container. I've tried to follow a few threads on here and done as much research as I can but I'm stuck and need help please.

Proxmox 8.1.4

On Proxmox host:

Code:
# lsusb
Bus 002 Device 002: ID 0bc2:2321 Seagate RSS LLC Expansion Portable
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 003: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code:
# ls -l /dev/serial/by-id/
total 0
lrwxrwxrwx 1 root root 13 Jan 21 18:46 usb-0658_0200-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Jan 21 18:46 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_5614c21d5298ec11bf6ba7d044d80d13-if00-port0 -> ../../ttyUSB0

Code:
# ls -l /dev/bus/usb/001/004
crw-rw-rw- 1 root dialout 189, 3 Jan 21 18:46 /dev/bus/usb/001/004
root@pve:~# ls -l /dev/bus/usb/001/003
crw-rw-rw- 1 root dialout 189, 2 Jan 21 18:46 /dev/bus/usb/001/003

Code:
# cat /etc/udev/rules.d/50-myusb.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", OWNER="root", GROUP="dialout", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", OWNER="root", GROUP="dialout", MODE="0666"

Code:
# cat /etc/pve/lxc/103.conf
arch: amd64
cores: 2
features: nesting=1
hostname: docker
memory: 2048
nameserver: 10.11.12.1
net0: name=eth0,bridge=vmbr2,gw=10.11.12.1,hwaddr=BC:24:11:06:37:82,ip=10.11.12.11/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-103-disk-0,size=100G
searchdomain: lan
swap: 512
unprivileged: 1
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.cgroup2.devices.allow: c 166:* rwm
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file

In container:

Code:
$ ls -l /dev
total 0
crw--w---- 1 root   tty     136, 0 Jan 21 19:28 console
lrwxrwxrwx 1 root   root        11 Jan 21 19:28 core -> /proc/kcore
lrwxrwxrwx 1 root   root        13 Jan 21 19:28 fd -> /proc/self/fd
crw-rw-rw- 1 nobody nogroup   1, 7 Jan 21 18:46 full
lrwxrwxrwx 1 root   root        12 Jan 21 19:28 initctl -> /run/initctl
lrwxrwxrwx 1 root   root        28 Jan 21 19:28 log -> /run/systemd/journal/dev-log
drwxrwxrwt 2 nobody nogroup     40 Jan 21 19:28 mqueue
crw-rw-rw- 1 nobody nogroup   1, 3 Jan 21 18:46 null
crw-rw-rw- 1 root   root      5, 2 Jan 21 19:28 ptmx
drwxr-xr-x 2 root   root         0 Jan 21 19:28 pts
crw-rw-rw- 1 nobody nogroup   1, 8 Jan 21 18:46 random
drwxrwxrwt 2 root   root        40 Jan 21 19:28 shm
lrwxrwxrwx 1 root   root        15 Jan 21 19:28 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root   root        15 Jan 21 19:28 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root   root        15 Jan 21 19:28 stdout -> /proc/self/fd/1
crw-rw-rw- 1 nobody nogroup   5, 0 Jan 21 19:28 tty
crw--w---- 1 root   tty     136, 1 Jan 21 19:28 tty1
crw--w---- 1 root   tty     136, 2 Jan 21 19:28 tty2
crw-rw-rw- 1 nobody nogroup 166, 0 Jan 21 19:28 ttyACM0
crw-rw-rw- 1 nobody nogroup 188, 0 Jan 21 18:46 ttyUSB0
crw-rw-rw- 1 nobody nogroup   1, 9 Jan 21 18:46 urandom
crw-rw-rw- 1 nobody nogroup   1, 5 Jan 21 18:46 zero

Is the nobody:nogroup an issue?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!