Unable to Mount /dev/uinput and /dev/uhid in LXC Container on Proxmox VE

AlexMa233

New Member
Aug 25, 2024
1
0
1
Hello everyone,

I'm facing an issue with my LXC container running on Proxmox VE (PVE). Here are the details:

- The container is running Ubuntu.
- I've added the following entries in the container's configuration file /etc/pve/lxc/101.conf to bind mount the /dev/uinput and /dev/uhid devices from the host:

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

On the host, both /dev/uinput and /dev/uhid devices exist and are correctly loaded:

Bash:
crw------- 1 root root 10, 223 /dev/uinput
crw------- 1 root root 10, 239 /dev/uhid

However, after starting the container, these device files are not visible inside the container. I’ve tried manually mounting and checking permissions, but to no avail.

Bash:
root@Docker:~# ls -l /dev/uind
ls: cannot access '/dev/uind': No such file or directory
root@Docker:~# ls -l /dev/uinput
ls: cannot access '/dev/uinput': No such file or directory
 
Last edited:
I added this to my lxc config file (from https://forum.proxmox.com/threads/m...viledged-lxc-map-gids-uids.142161/post-647122)

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

My docker-compose inside the LXC now starts up without errors, however the inputs for my sunshine server don't work.
Maybe I'll need to attach physical keyboard/mouse to the host.