[Lxc-users] Mount /dev/shm of the host inside a container

Fred Finkelstein reliable61 at gmail.com
Tue Jan 10 00:39:30 UTC 2012


I finally found it with the help of the #lxcontainers irc channel. I have
to replace this in lxc.fstab:
/dev/shm /dev/shm bind 0 0
with this:
/dev/shm /srv/shm none bind 0 0
and I can access it.

On Mon, Jan 9, 2012 at 5:13 PM, Fevzi Çakmak <reliable61 at gmail.com> wrote:

> I am trying to use the /dev/shm tmpfs folder of the host inside of the
> container but I am getting a new and empty /dev/shm when I create the
> container. I only want to execute a command which should have no networking
> at all.
>
> My configuration is:
> lxc.conf:
> lxc.utsname = mycontainer
> lxc.network.type = empty
> lxc.network.flags = up
> lxc.mount = lxc.fstab
>
> lxc.fstab:
> /dev/shm /dev/shm bind 0 0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120110/e7b0275a/attachment.html>


More information about the lxc-users mailing list