Linux Containers

From Bobs Projects
Revision as of 08:35, 1 August 2017 by Bob Edwards (Talk | contribs)

Jump to: navigation, search

Linux Containers (LXC) is a form of OS-level virtualisation now native to the Linux kernel.

Contents

Ubuntu

LXC in Ubuntu makes use of AppArmor to restrict container access to host services.

Enabling NFS mounts

(see How to enable bind mount inside lxc container)

Basically, add:

 mount options=(rw, bind, ro),

to /etc/apparmor.d/lxc/lxc-default

Converting disk image to LXC

Some tips on converting a raw bootable disk image to a linux container

  • remove all disk mounts from /etc/fstab (but need to keep even just a comment in /etc/fstab)
  • for SSH to work, make sure that /dev/urandom exists (mknod dev/urandom c 1 9)

See also

External links