[lxc-users] Share alsa devices in lxc.
Oz Dror
odror7 at gmail.com
Thu May 28 17:40:00 UTC 2015
Is it possible to used alsa devices in lxc.
in my config file I have ( allow access to the sound devices)
lxc.cgroup.devices.allow = c 116:* rwm
Before the container starts
I create the /dev/snd devices
cd ${LXC_ROOTFS_MOUNT}
mkdir ./dev/snd
cd ./dev/snd
mknod -m 666 controlC0 c 116 2
mknod -m 666 controlC1 c 116 11
mknod -m 666 controlC2 c 116 8
mknod -m 666 hwC0D0 c 116 7
mknod -m 666 hwC1D0 c 116 16
mknod -m 666 pcmC0D0c c 116 4
mknod -m 666 pcmC0D0p c 116 3
mknod -m 666 pcmC0D1p c 116 5
mknod -m 666 pcmC0D2c c 116 6
mknod -m 666 pcmC1D3p c 116 12
mknod -m 666 pcmC1D7p c 116 13
mknod -m 666 pcmC1D8p c 116 14
mknod -m 666 pcmC1D9p c 116 15
mknod -m 666 pcmC2D0c c 116 10
mknod -m 666 pcmC2D0p c 116 9
mknod -m 666 seq c 116 1
mknod -m 666 timer c 116 33
the lxc correctly list the devices with aplay -l or aplay -L
But when I try to play a file
aplay -D ....
I get an error message. The device is not accessible.
Is there anything else that I need to do. Are there any additional
permissions.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150528/25dd733c/attachment.html>
More information about the lxc-users
mailing list