I run a Debian-LXC as a Dockerhost.
The Dockerhost is dedicatet to my workshop running services for a 3D-printer and a CNC-router.
For the sake of keeping it simple, lets take one of them out of the equation and focus on the CNC-router.
The CNC-router need a USB-connection that I call ttyUSB0.
Technically, I have gotten this to work but not as how I want it to.
The node conf include the following
(As a side note, I've also tried
Now, the problem is that this does not work until I log in to the shell of the host and enter
This change the device from
to
This change both on the host/machine and the container/node.
The node (Debian-LXC) gets read/write-permissions to the host's USB (Proxmox-host), and the second passthrough from LXC to Docker is a non-issue.
Everything start to work.
Until I restart the host...
Is there an easy way to have this persistant? I know Proxmox create all dev during bootup so they're alway new but is there a option in Proxmox to make the passthrough persitent, similar as with the VM's?
I would like to avoid special operations such as a cronjob if there's any other way to do it.
Or at least as easy so I don't need to relearn it every second 10 month? The extra lines in the node conf is already to much to keep in mind next time I do this operation...
The Dockerhost is dedicatet to my workshop running services for a 3D-printer and a CNC-router.
For the sake of keeping it simple, lets take one of them out of the equation and focus on the CNC-router.
The CNC-router need a USB-connection that I call ttyUSB0.
Technically, I have gotten this to work but not as how I want it to.
The node conf include the following
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
(As a side note, I've also tried
lxc.cgroup2.devices.allow: a
, and that is likely what I will be running with eventually to keep things simple).Now, the problem is that this does not work until I log in to the shell of the host and enter
chmod a+rw /dev/ttyUSB0
This change the device from
crw-rw---- 1 root dialout 188, 0 Jul 1 18:21 /dev/ttyUSB0
to
crw-rw-rw- 1 root dialout 188, 0 Jul 1 18:21 /dev/ttyUSB0
This change both on the host/machine and the container/node.
The node (Debian-LXC) gets read/write-permissions to the host's USB (Proxmox-host), and the second passthrough from LXC to Docker is a non-issue.
Everything start to work.
Until I restart the host...
Is there an easy way to have this persistant? I know Proxmox create all dev during bootup so they're alway new but is there a option in Proxmox to make the passthrough persitent, similar as with the VM's?
I would like to avoid special operations such as a cronjob if there's any other way to do it.
Or at least as easy so I don't need to relearn it every second 10 month? The extra lines in the node conf is already to much to keep in mind next time I do this operation...
Last edited: