Alessandro Guido <a...@alessandroguido.name>
writes:

> Whenever I shutdown a container /var/lib/lxc get remounted ro.

This is because the reboot/halt jobs in /etc/rc[06].d/ try to mount the
root filesystem read-only before halting, and you do not disallow this
in your /etc/lxc/<container name>.conf:

    lxc.cap.drop = sys_admin

Note that this will prevent *all* mount/umount/swapon/swapoff/... within
the container, so anything you use in the container's /etc/fstab or
/lib/init/fstab will need to be moved to lxc.mount.entry lines in your
lxc.conf -- in particular, upstart needs /proc to work at all, and wants
/var/run (tmpfs) for networking.  lxc 0.7.2's lxc-ubuntu contains a
workaround for the latter that in places in the container's
/etc/init/lxc.conf.

Oh, and you may with to dpkg-divert --rename mount, umount, swapon and
swapoff and replace them with symlinks to /bin/true (or /bin/false), so
you get less noise on the container's /dev/console during boot/halt.


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to