Created
August 6, 2026 04:28
-
-
Save 4piu/189e727c9a8c9e96220183f6822edc35 to your computer and use it in GitHub Desktop.
Allow LXC container to play audio using host device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Audio Configuration | |
| # Create a file on host: /etc/udev/rules.d/99-lxc-audio.rules | |
| # ACTION=="add", SUBSYSTEM=="sound", ENV{DEVNAME}!="", RUN+="/usr/bin/setfacl -m u:101000:rw $env{DEVNAME}" | |
| # EOF | |
| # Replace 101000 with the your mapped user ID for unprivileged container | |
| # !!! This rule must be executed after 73-seat-late.rules !!! | |
| lxc.cgroup2.devices.allow = c 116:* rwm | |
| lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir | |
| lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,size=20%,nr_inodes=800k,create=dir | |
| lxc.mount.entry = /run/udev/data run/udev/data none bind,ro,create=dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment