lxc.sgml.in revision 0d9f8e188c1c4832e4f6b9de646478947ae86877
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornbergerlxc: linux Container library
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger(C) Copyright IBM Corp. 2007, 2008
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian KornbergerDaniel Lezcano <dlezcano at fr.ibm.com>
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian KornbergerThis library is free software; you can redistribute it and/or
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornbergermodify it under the terms of the GNU Lesser General Public
772a71bcc07f7001f5cd3cb4c3dc2cf393ffe9beJulian KornbergerLicense as published by the Free Software Foundation; either
1d2a2bdc364ab8fecd3db98c17162ce9f03d4361Eugen Kuksaversion 2.1 of the License, or (at your option) any later version.
4755669b9d408e3240e1f005349399973923c095Eugen KuksaThis library is distributed in the hope that it will be useful,
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen Kuksabut WITHOUT ANY WARRANTY; without even the implied warranty of
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen KuksaMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen KuksaLesser General Public License for more details.
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen KuksaYou should have received a copy of the GNU Lesser General Public
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen KuksaLicense along with this library; if not, write to the Free Software
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen KuksaFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1d2a2bdc364ab8fecd3db98c17162ce9f03d4361Eugen Kuksa<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
1d2a2bdc364ab8fecd3db98c17162ce9f03d4361Eugen Kuksa Version @LXC_MAJOR_VERSION@.@LXC_MINOR_VERSION@.@LXC_MICRO_VERSION@
f9c64720306a03102ed06e2e497c8f7d5bd0910aChristian Clausen </refmiscinfo>
0ae77dd0f6698fa1948d1c6c973cc64d6df9e8d6Christian Clausen linux containers
1d2a2bdc364ab8fecd3db98c17162ce9f03d4361Eugen Kuksa </refpurpose>
0ae77dd0f6698fa1948d1c6c973cc64d6df9e8d6Christian Clausen You are in a hurry, and you don't want to read this man page. Ok,
0ae77dd0f6698fa1948d1c6c973cc64d6df9e8d6Christian Clausen without warranty, here are the commands to launch a shell inside
0ae77dd0f6698fa1948d1c6c973cc64d6df9e8d6Christian Clausen a container with a predefined configuration template, it may
ca68055161f6beb2ec248e789ab787e6de69bd18Christian Clausen @BINDIR@/lxc-execute -n foo -f @SYSCONFDIR@/lxc/lxc-macvlan.conf /bin/bash
ca68055161f6beb2ec248e789ab787e6de69bd18Christian Clausen The container technology is actively being pushed into the
ca68055161f6beb2ec248e789ab787e6de69bd18Christian Clausen mainstream linux kernel. It provides the resource management
1d2a2bdc364ab8fecd3db98c17162ce9f03d4361Eugen Kuksa through the control groups aka process containers and resource
ca68055161f6beb2ec248e789ab787e6de69bd18Christian Clausen isolation through the namespaces.
ca68055161f6beb2ec248e789ab787e6de69bd18Christian Clausen The linux containers, <command>lxc</command>, aims to use these
1d2a2bdc364ab8fecd3db98c17162ce9f03d4361Eugen Kuksa new functionalities to provide an userspace container object
0ae77dd0f6698fa1948d1c6c973cc64d6df9e8d6Christian Clausen which provides full resource isolation and resource control for
813c1fb6ef7f1d386c65abf8d79389be3cb0f4e9Christian Clausen an applications or a system.
813c1fb6ef7f1d386c65abf8d79389be3cb0f4e9Christian Clausen The first objective of this project is to make the life easier
813c1fb6ef7f1d386c65abf8d79389be3cb0f4e9Christian Clausen for the kernel developers involved in the containers project and
813c1fb6ef7f1d386c65abf8d79389be3cb0f4e9Christian Clausen especially to continue working on the Checkpoint/Restart new
1d2a2bdc364ab8fecd3db98c17162ce9f03d4361Eugen Kuksa features. The <command>lxc</command> is small enough to easily
7c5e9db9a07461d92c007563a2a27ca42ce93baeChristian Clausen manage a container with simple command lines and complete enough
7c5e9db9a07461d92c007563a2a27ca42ce93baeChristian Clausen to be used for other purposes.
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger The <command>lxc</command> relies on a set of functionalies
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger provided by the kernel which needs to be active. Depending of
432ee743a5f1c5688c73446b5977b06ed97fb67cJulian Kornberger the missing functionalities the <command>lxc</command> will
432ee743a5f1c5688c73446b5977b06ed97fb67cJulian Kornberger work with a restricted number of functionalities or will simply
f4f335875509867dd238df7c92b0b8f4fe101705Julian Kornberger The following list gives the kernel features to be enabled in
f4f335875509867dd238df7c92b0b8f4fe101705Julian Kornberger the kernel to have the full features container:
f4f335875509867dd238df7c92b0b8f4fe101705Julian Kornberger <programlisting>
3c4b1bd39fa36d241f2ef0d6f7ebbf2a9a6f4d36henning mueller * General setup
3c4b1bd39fa36d241f2ef0d6f7ebbf2a9a6f4d36henning mueller * Control Group support
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen Kuksa -> Namespace cgroup subsystem
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen Kuksa -> Freezer cgroup subsystem
4755669b9d408e3240e1f005349399973923c095Eugen Kuksa -> Cpuset support
df8908f48450f65ca99c9b997ebd3711f49049e5Eugen Kuksa -> Simple CPU accounting cgroup subsystem
17e3eda463c5fe407b4498c996c7fd0474e34e41henning mueller -> Resource counters
17e3eda463c5fe407b4498c996c7fd0474e34e41henning mueller -> Memory resource controllers for Control Groups
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger * Group CPU scheduler
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger -> Basis for grouping tasks (Control Groups)
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger * Namespaces support
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger -> UTS namespace
7b025f9d9726413eb3f50ca2b39826e7eed816fbJulian Kornberger -> IPC namespace
the resolv.conf file belonging to the host.
lxc-cgroup -n foo cpuset.cpus
lxc-cgroup -n foo cpu.shares 512