[Lxc-users] Camera access inside container
Serge Hallyn
serge.hallyn at canonical.com
Thu Nov 29 14:24:02 UTC 2012
Quoting vignesh kumar (vigneshkumar86 at gmail.com):
> Hi,
> I have added the line as you mentioned and restarted the container as
> well. Still getting the same issue.
>
> On Wed, Nov 28, 2012 at 8:23 PM, Serge Hallyn <serge.hallyn at canonical.com>wrote:
>
> > Quoting vignesh kumar (vigneshkumar86 at gmail.com):
> > > Hi,
> > > I am using a lxc-ubuntu container in a ubuntu 11.10 host OS. An
> > > application running in a container requires camera access . Currently
> > > I have a USB based webcam which mount as /dev/video0 in my host.I
> > > tried giving access to the device by adding the line
> > > "lxc.cgroup.allow=c 81:0 rwm" in my lxc config file. But still getting
> >
> > this needs to be lxc.cgroup.devices.allow
> >
> > > error msg "mknod:/dev/video0 Operation not permitted" in my container.
> > > Can anyone give me a solution in accessing camera inside a container?
> >
> > Did you stop and re-start your container after adding that line to
> > your config?
> >
> > -serge
Please show the results, in the container, of:
cat /proc/self/cgroup
ls -l /dev/video0
strace -f mknod /dev/vdeo0 c 81 0
and in the host
cat /sys/fs/cgroup/devices/lxc/<container-name>/devices.allow
Also in your container run your application under
'strace -f -ooutout <application>' and attach the file outout.
-serge
More information about the lxc-users
mailing list