====== 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
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
**NOTE:** See https://pve.proxmox.com/wiki/Manual:_pct.conf.
----
===== 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
* This is needed because Proxmox 7 uses the new default [[https://pve.proxmox.com/pve-docs/chapter-pct.html#pct_cgroup_compat|cgroup version 2]].
----
===== References =====
https://pve.proxmox.com/wiki/Manual:_pct.conf