[lxc-users] Question on using /dev/uio0 inside containers
Stéphane Graber
stgraber at ubuntu.com
Mon Jul 7 15:22:31 UTC 2014
On Mon, Jul 07, 2014 at 02:59:44PM +0000, Anjali Kulkarni wrote:
> Hi,
>
> I am a newbie to using containers, and I am trying to run a DPDK enabled app inside a system container (which I created using lxc-create). While, lxc-execute works to run the dpdk app, the system container does not, giving me the following error:
>
> EAL: Cannot open /dev/uio0: No such file or directory
> EAL: Error - exiting with code: 1
>
> Where, one 10G ethernet device on host has been assigned to the uio_igb driver on the host, and hence is visible from host:
> root:/# ls /dev/uio0
> /dev/uio0
>
> But /dev/uio0 is not visible in the container.
>
> I was reading about autodev and how using autodev hook you can do an mknod to create the devs, but I am not sure what is the right approach here. If I look in the dev of the rootfs of the container, I see some dev are already created/shared with the host. I want to do something similar for /dev/uio0. Can I just share/mount the /dev/uio0 from host onto container or use autodev?
> I just want the container to be able to use the /dev/uio0 just as if on host - what's the right way to approach/make this work?
There are a few ways to do what you want, in any case, make sure you
have this node listed in your cgroup.device's configuration so once it's
there you can actually access it.
I can thnk of three ways to have it available from inside the container:
- Just mknod it by hand and use it
- Use the lxc-device tool to add it once the container is started
- Add this to your container's config:
"lxc.mount.entry = /dev/uio0 dev/uio0 none bind,create=file"
The last two options expect LXC 1.0 or higher.
>
> Thanks
> Anjali
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140707/1d8e6dca/attachment.sig>
More information about the lxc-users
mailing list