[SOLVED] USB UDEV Passthrough Not Working On First Boot

Tenatious

New Member
Mar 25, 2025
3
0
1
Hi,

I have a USB device connected to the host that I am trying to pass through to an unprivileged LXC. The passthrough is working but the permissions arent. I have the following set in a file I created at /etc/udev/rules.d/50-myusb.rules.

Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", OWNER="100000", GROUP="100020", SYMLINK="ttyACM0", MODE="0777"

The output of lsusb for the device is: Bus 001 Device 005: ID 1a86:55d4 QinHeng Electronics SONOFF Zigbee 3.0 USB Dongle Plus V2.

Now if I reboot the entire proxmox, the USB is getting passed through as I can see it in the container but for some reason my UDEV isn't getting applied. However if I then unplug and replug in the USB device to the same slot , the UDEV rule is applied.

How can I get it to apply on host reboot and not require me to unplug it each time?
 
Last edited:
How are you passing the device to the container?
Do the advanced settings for the UID, GID and access mode in "Add" -> "Device Passthrough" in the Web UI work?
 
How are you passing the device to the container?
Do the advanced settings for the UID, GID and access mode in "Add" -> "Device Passthrough" in the Web UI work?
Passing it through via the container conf.

I can see it all fine in the container so that bit is working and can see it fine when everything boots up. It's just the permissions from the udev don't get set until I replug the USB and then restart the container.


Code:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509152410-if00 dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_202305091524>
lxc.cgroup2.devices.allow: c 166:* rwm
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file
 
Code:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509152410-if00 dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_202305091524>
lxc.cgroup2.devices.allow: c 166:* rwm
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file
Instead of mounting the devices into the container using the lxc config lines, try to use the device passthrough feature built into Proxmox Virtual Environment.

Either replace these config lines with:
Code:
dev0: /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509152410-if00,uid=0,gid=20,mode=0777
dev1: /dev/ttyACM0,uid=0,gid=20,mode=0777

Or use pct set to create these lines in the config:
Code:
pct set <container_id> -dev0 /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509152410-if00,uid=0,gid=20,mode=0777
pct set <container_id> -dev1 /dev/ttyACM0,uid=0,gid=20,mode=0777

Or use the Web UI as mentioned already.
 
Instead of mounting the devices into the container using the lxc config lines, try to use the device passthrough feature built into Proxmox Virtual Environment.

Either replace these config lines with:
Code:
dev0: /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509152410-if00,uid=0,gid=20,mode=0777
dev1: /dev/ttyACM0,uid=0,gid=20,mode=0777

Or use pct set to create these lines in the config:
Code:
pct set <container_id> -dev0 /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509152410-if00,uid=0,gid=20,mode=0777
pct set <container_id> -dev1 /dev/ttyACM0,uid=0,gid=20,mode=0777

Or use the Web UI as mentioned already.
Perfect. That works great.

Love a simple fix!