USB Passthrough to unprivileged Container

Dec 23, 2021
2
0
6
25
Hello,

for a few hours I am trying to passthrough my 3D Printer to my Octoprint Container.
But I can't get it to work - the main Problem is that after adding this to my container config in Proxmox:
Code:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/002/008 dev/bus/usb/002/008 none bind,optional,create=file
It does not create a ttyACM0 in /dev .

If it help here is the complete Container config:
Code:
  GNU nano 7.2                                                                  /etc/pve/lxc/104.conf
#||Wert|Port/s|
#|%3A-----|%3A-----|%3A-----|
#|Hostname|SLNC-CT-3D|
#|Domain||
#|OS|Debian 12|
#|Services|Octoprint||
#|IP|10.6.13.2|5000|
arch: amd64
cores: 2
features: keyctl=1,nesting=1
hostname: SLNC-CT-3D
memory: 2048
nameserver: 10.6.13.1
net0: name=eth0,bridge=vmbr0,gw=10.6.13.1,hwaddr=BC:24:11:1F:F4:BA,ip=10.6.13.2/24,tag=613,type=veth
onboot: 0
ostype: debian
rootfs: local-lvm:vm-104-disk-0,size=4G
swap: 512
tags: proxmox-helper-scripts
unprivileged: 1
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/002/008 dev/bus/usb/002/008 none bind,optional,create=file

My ProxmoxVE is 8.1.4

I've read dozens of threads but I just can't get it to work..
Maybe my brain ain't braining right now - hope someones brain.exe will help me solve my Problem
 
Code:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/002/008 dev/bus/usb/002/008 none bind,optional,create=file
It does not create a ttyACM0 in /dev .
/dev/bus/usb is not stable and (hot)plugging does not work in containers, which propably explains why ttyACM0 is not creatged.
If it help here is the complete Container config:
Code:
  GNU nano 7.2                                                                  /etc/pve/lxc/104.conf
#||Wert|Port/s|
#|%3A-----|%3A-----|%3A-----|
#|Hostname|SLNC-CT-3D|
#|Domain||
#|OS|Debian 12|
#|Services|Octoprint||
#|IP|10.6.13.2|5000|
arch: amd64
cores: 2
features: keyctl=1,nesting=1
hostname: SLNC-CT-3D
memory: 2048
nameserver: 10.6.13.1
net0: name=eth0,bridge=vmbr0,gw=10.6.13.1,hwaddr=BC:24:11:1F:F4:BA,ip=10.6.13.2/24,tag=613,type=veth
onboot: 0
ostype: debian
rootfs: local-lvm:vm-104-disk-0,size=4G
swap: 512
tags: proxmox-helper-scripts
unprivileged: 1
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/002/008 dev/bus/usb/002/008 none bind,optional,create=file

My ProxmoxVE is 8.1.4

I've read dozens of threads but I just can't get it to work..
Maybe my brain ain't braining right now - hope someones brain.exe will help me solve my Problem
Maybe use the new way to do this, like I suggested here: https://forum.proxmox.com/threads/s...ss-gpu-by-id-mapping-error.145086/post-653528
But use /dev/ttyACM0 in your case and figure out the right group ID for your device.
 

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!