lxc-start.sgml.in revision 304dc8b3ff5d14229942d314bb3bfc44cede68de
6bdda696b3ea703c47e87fea61017ec655f91d92ndlxc: linux Container library
6bdda696b3ea703c47e87fea61017ec655f91d92nd(C) Copyright IBM Corp. 2007, 2008
6bdda696b3ea703c47e87fea61017ec655f91d92ndDaniel Lezcano <daniel.lezcano at free.fr>
6bdda696b3ea703c47e87fea61017ec655f91d92ndThis library is free software; you can redistribute it and/or
6bdda696b3ea703c47e87fea61017ec655f91d92ndmodify it under the terms of the GNU Lesser General Public
6bdda696b3ea703c47e87fea61017ec655f91d92ndLicense as published by the Free Software Foundation; either
6bdda696b3ea703c47e87fea61017ec655f91d92ndversion 2.1 of the License, or (at your option) any later version.
6bdda696b3ea703c47e87fea61017ec655f91d92ndThis library is distributed in the hope that it will be useful,
6bdda696b3ea703c47e87fea61017ec655f91d92ndbut WITHOUT ANY WARRANTY; without even the implied warranty of
6bdda696b3ea703c47e87fea61017ec655f91d92ndMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6bdda696b3ea703c47e87fea61017ec655f91d92ndLesser General Public License for more details.
6bdda696b3ea703c47e87fea61017ec655f91d92ndYou should have received a copy of the GNU Lesser General Public
6bdda696b3ea703c47e87fea61017ec655f91d92ndLicense along with this library; if not, write to the Free Software
6bdda696b3ea703c47e87fea61017ec655f91d92ndFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6bdda696b3ea703c47e87fea61017ec655f91d92nd<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
6bdda696b3ea703c47e87fea61017ec655f91d92nd </refmeta>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <refnamediv>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <refpurpose>
6bdda696b3ea703c47e87fea61017ec655f91d92nd run an application inside a container.
6bdda696b3ea703c47e87fea61017ec655f91d92nd </refpurpose>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </refnamediv>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <refsynopsisdiv>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <cmdsynopsis>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <arg choice="req">-n <replaceable>name</replaceable></arg>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <arg choice="opt">-f <replaceable>config_file</replaceable></arg>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <arg choice="opt">-c <replaceable>console_device</replaceable></arg>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <arg choice="opt">-L <replaceable>console_logfile</replaceable></arg>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <arg choice="opt">-p <replaceable>pid_file</replaceable></arg>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <arg choice="opt">--share-[net|ipc|uts] <replaceable>name|pid</replaceable></arg>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </cmdsynopsis>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </refsynopsisdiv>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <refsect1>
6bdda696b3ea703c47e87fea61017ec655f91d92nd It will setup the container
6bdda696b3ea703c47e87fea61017ec655f91d92nd according to the configuration previously defined with the
6bdda696b3ea703c47e87fea61017ec655f91d92nd lxc-create command or with the configuration file parameter.
6bdda696b3ea703c47e87fea61017ec655f91d92nd If no configuration is
6bdda696b3ea703c47e87fea61017ec655f91d92nd defined, the default isolation is used.
6bdda696b3ea703c47e87fea61017ec655f91d92nd If no command is specified, <command>lxc-start</command> will
6bdda696b3ea703c47e87fea61017ec655f91d92nd use the default
6bdda696b3ea703c47e87fea61017ec655f91d92nd container.
6bdda696b3ea703c47e87fea61017ec655f91d92nd </refsect1>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <refsect1>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <variablelist>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg Run the container as a daemon. As the container has no
6bdda696b3ea703c47e87fea61017ec655f91d92nd more tty, if an error occurs nothing will be displayed,
6bdda696b3ea703c47e87fea61017ec655f91d92nd the log file can be used to check the error.
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>-p, --pidfile <replaceable>pid_file</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd Create a file with the process id.
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>-f, --rcfile <replaceable>config_file</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd Specify the configuration file to configure the virtualization
6bdda696b3ea703c47e87fea61017ec655f91d92nd and isolation functionalities for the container.
6bdda696b3ea703c47e87fea61017ec655f91d92nd This configuration file if present will be used even if there is
6bdda696b3ea703c47e87fea61017ec655f91d92nd already a configuration file present in the previously created
6bdda696b3ea703c47e87fea61017ec655f91d92nd container (via lxc-create).
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>-c,
6bdda696b3ea703c47e87fea61017ec655f91d92nd --console <replaceable>console_device</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd Specify a device to use for the container's console, for example
6bdda696b3ea703c47e87fea61017ec655f91d92nd /dev/tty8. If this option is not specified the current terminal
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg will be used unless <option>-d</option> is specified.
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>-L,
6bdda696b3ea703c47e87fea61017ec655f91d92nd --console-log <replaceable>console_logfile</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd Specify a file to log the container's console output to.
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>-s, --define <replaceable>KEY=VAL</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd Assign value <replaceable>VAL</replaceable> to configuration
6bdda696b3ea703c47e87fea61017ec655f91d92nd variable <replaceable>KEY</replaceable>. This overrides any
6bdda696b3ea703c47e87fea61017ec655f91d92nd assignment done in <replaceable>config_file</replaceable>.
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <option>-C,
6bdda696b3ea703c47e87fea61017ec655f91d92nd --close-all-fds</option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd If any file descriptors are inherited, close them. If this option
6bdda696b3ea703c47e87fea61017ec655f91d92nd is not specified, then <command>lxc-start</command> will exit with
6bdda696b3ea703c47e87fea61017ec655f91d92nd failure instead. Note: <replaceable>--daemon</replaceable> implies
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>--share-net <replaceable>name|pid</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd Inherit a network namespace from
6bdda696b3ea703c47e87fea61017ec655f91d92nd will continue to be managed by the original owner. The
6bdda696b3ea703c47e87fea61017ec655f91d92nd network configuration of the starting container is ignored
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>--share-ipc <replaceable>name|pid</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg Inherit an IPC namespace from
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <option>--share-uts <replaceable>name|pid</replaceable></option>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg Inherit a UTS namespace from
6bdda696b3ea703c47e87fea61017ec655f91d92nd not set the hostname, but the container OS may do it
6bdda696b3ea703c47e87fea61017ec655f91d92nd </listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd </variablelist>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg </refsect1>
6bdda696b3ea703c47e87fea61017ec655f91d92nd &commonoptions;
6bdda696b3ea703c47e87fea61017ec655f91d92nd <refsect1>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <variablelist>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <varlistentry>
6bdda696b3ea703c47e87fea61017ec655f91d92nd <listitem>
6bdda696b3ea703c47e87fea61017ec655f91d92nd The specified container is already running an
6bdda696b3ea703c47e87fea61017ec655f91d92nd application. You should stop it before reuse this
6bdda696b3ea703c47e87fea61017ec655f91d92nd container or create a new one.