Table of Contents

Proxmox - USB - Pass USB device to LXC Container

List USB devices on the Host

ls -l /dev/ttyU*

returns:

crw-rw-rw- 1 root dialout 188, 0 Jul  8 11:46 /dev/ttyUSB0
crw-rw-rw- 1 root dialout 188, 1 Jul  8 11:46 /dev/ttyUSB1

Client Configuration

On the Client

/etc/pve/lxc/.conf
lxc.cgroup.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file

List USB devices on the Client

ls -l /dev/ttyU*

returns:

srv:dev# ls -l ttyU*
crw-rw-rw- 1 root dialout 188, 0 Jul  8 11:46 ttyUSB0
crw-rw-rw- 1 root dialout 188, 1 Jul  8 11:46 ttyUSB1

Display USB

cat ttyUSB1

returns:

TODO

NOTE: If an error is seen:

Operation not permitted
  • Try to change this line:
        lxc.cgroup.devices.allow: c 188:* rwm

to:

  • lxc.cgroup2.devices.allow: c 188:* rwm

References

https://pve.proxmox.com/wiki/Manual:_pct.conf