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
 

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!