Mount /dev/uinput to unpriviledged LXC & map gids/uids

cRaZy-bisCuiT

Member
Oct 8, 2022
53
9
13
I'd like to mount
Bash:
/dev/uinput
from host to an LXC CT. How do I do that? What I do have so far:
Bash:
lxc.mount.entry: /dev/uinput dev/uinput none bind,optional,create=file
lxc.mount.entry: /dev/uinput dev/uinput none bind,optional,create=dir

The dev looks the following:
Code:
root@pve:/etc/pve/lxc# ls -l /dev/uinput
crw------- 1 root root 10, 223 Feb 23 18:48 /dev/uinput

How would I need to do the mapping? I could not wrap my head around that logic :/
 
this worked for me (note that the container must be privileged)

Code:
unprivileged: 0
lxc.cgroup2.devices.allow: c 10:223 rwm
lxc.mount.entry: /dev/uinput dev/uinput none bind,optional,create=file