Persistent device in LXC

gguest64

New Member
Dec 3, 2023
2
1
3
Hi,

I need a specific device in a LXC contener and I use this command :

# lxc-device add -n 100 /dev/usb/hiddev0

It works, but I want to avoid to hit this command after each reboot.

What should I do ?

Thank you very much.
 
Hi,

Could you try to add the following lines to your LXC config?

Bash:
lxc.cgroup2.devices.allow = c 189:* rwm
lxc.mount.entry = /dev/usb/hiddev0 dev/usb/hiddev0 none bind,optional,create=file