[lxc-users] Accessing /dev file system from container

Anjali Kulkarni anjali at juniper.net
Thu Sep 25 14:48:30 UTC 2014


You can export the uio device to the container in its config file using its device major and minor number, such as:

lxc.cgroup.devices.allow = c 247:0 rwm
lxc.mount.entry = /dev/uio0 dev/uio0 none bind,create=file

Where, you get the 247:0 from the output of
ls -l /dev/uio0

If you are trying to run DPDK app inside the container, you will also need to do the following to get the huge pages working:

mkdir -p /var/lib/lxc/$container_name/rootfs/mnt/huge

lxc.mount.entry=/mnt/huge /var/lib/lxc/test/rootfs/mnt/huge none rw,bind 0 0

Anjali

From: <Murthy>, Krishna J <krishna.j.murthy at intel.com<mailto:krishna.j.murthy at intel.com>>
Reply-To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Date: Thursday, September 25, 2014 6:04 AM
To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Subject: [lxc-users] Accessing /dev file system from container

I have a Ethernet device which is attached to the container. I have installed the driver module for this device on the host. When I run the application on the container it complains it is unable to find the device in the /dev file system. Infact I use UIO based driver. So in container I get message unable to access /dev/uio0: No such file or directory.

Regards,
Krishna




--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140925/40acffff/attachment.html>


More information about the lxc-users mailing list