LXC

From Wikipedia, the free encyclopedia
Jump to: navigation, search
LXC - Linux Containers
Developer(s) Daniel Lezcano, Serge Hallyn, Stéphane Graber
Stable release 1.0.0[1] / 20 February 2014; 57 days ago (2014-02-20)
Preview release 1.0.0-rc4[2] / 19 February 2014; 58 days ago (2014-02-19)
Development status Active
Written in C, python3, shell, lua
Operating system Linux
Platform x86, x86-64, IA-64, PowerPC, SPARC, Itanium, ARM.
Type OS-level virtualization
License GNU LGPL v.2.1 (some components under GNU GPL v2 and BSD)
Website linuxcontainers.org

LXC (LinuX Containers) is an operating system–level virtualization method for running multiple isolated Linux systems (containers) on a single control host.

The Linux kernel comprises cgroups for resource isolation (CPU, memory, block I/O, network, etc.) that does not require starting any virtual machines. Cgroups also provides namespace isolation to completely isolate application's view of the operating environment, including process trees, network, user ids and mounted file systems.

LXC combines cgroups and namespace support to provide an isolated environment for applications. Docker is built on top of LXC, enabling image management and deployment services.

Overview[edit]

LXC provides operating system-level virtualization not via a virtual machine but rather through a virtual environment that has its own process and network space. LXC relies on the Linux kernel cgroups functionality that was released in version 2.6.24. It also relies on other kinds of namespace-isolation functionality, which were developed and integrated into the mainline Linux kernel. It is used by Heroku to provide separation between their dynos.[3]

Security[edit]

Originally, LXC containers were not as secure as other OS-level virtualization methods such as OpenVZ: in Linux kernels before 3.8, the root user of the guest system could run arbitrary code on the host system with root privileges, much like chroot jails.[4] Starting with the 1.0 release, containers now run as regular users on the host using "unprivileged containers".[5] Unprivileged containers are more limited in that they cannot access hardware directly. Nevertheless, even privileged containers should provide adequate isolation in the 1.0 security model, if properly configured.[5]

Alternatives[edit]

LXC is similar to other OS-level virtualization technologies on Linux such as OpenVZ and Linux-VServer, as well as those on other operating systems such as FreeBSD jails, AIX Workload Partitions and Solaris Containers. In contrast to OpenVZ, LXC works in the vanilla Linux kernel thus requiring no additional patches to be applied to the kernel sources. Version 1 of the LXC, which was released on 20 February 2014, is a long-term supported version and intended to be supported for five years.[6]

See also[edit]

References[edit]

  1. ^ Download lxc
  2. ^ "Daily builds of LXC". launchpad.net. Ubuntu LXC team. Retrieved 2014-02-07. 
  3. ^ "Dynos and Dyno Manager". Heroku. Retrieved 1 Aug 2013. 
  4. ^ Marco, d'Itri (2011). "Evading from linux containers". Archived from the original on 9 January 2014. Retrieved 12 February 2014. 
  5. ^ a b Graber, Stéphane (1 January 2014). "LXC 1.0: Security features [6/10]". Retrieved 12 February 2014. "However, at least in Ubuntu, our default containers ship with what we think is a pretty good configuration of both the cgroup access and an extensive apparmor profile which prevents all attacks that we are aware of. [...] LXC is no longer running as root so even if an attacker manages to escape the container, he’d find himself having the privileges of a regular user on the host" 
  6. ^ Stéphane Graber (2013-12-20). "LXC 1.0: Your first Ubuntu container". Stgraber.org. Retrieved 2014-02-23. 

External links[edit]