f79d43bbe70a01454049b77d6f15f6369744959eStéphane Graber<!--
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanolxc: linux Container library
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano(C) Copyright IBM Corp. 2007, 2008
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoAuthors:
9afe19d634946d50eab30e3b90cb5cebcde39eeaDaniel LezcanoDaniel Lezcano <daniel.lezcano at free.fr>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoThis library is free software; you can redistribute it and/or
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanomodify it under the terms of the GNU Lesser General Public
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoLicense as published by the Free Software Foundation; either
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoversion 2.1 of the License, or (at your option) any later version.
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoThis library is distributed in the hope that it will be useful,
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanobut WITHOUT ANY WARRANTY; without even the implied warranty of
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoLesser General Public License for more details.
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoYou should have received a copy of the GNU Lesser General Public
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoLicense along with this library; if not, write to the Free Software
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano-->
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
7f95145833bb24f54e037f73ecc37444d6635697Dwight Engen<!DOCTYPE refentry PUBLIC @docdtd@ [
99e4008cad9e959b683c6f48411fcf15a92be3b5Michel Normand
10fba81b9d0221b8e47aa1e0b43236413b7d28dfMichel Normand<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
99e4008cad9e959b683c6f48411fcf15a92be3b5Michel Normand<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
99e4008cad9e959b683c6f48411fcf15a92be3b5Michel Normand]>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano<refentry>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refmeta>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refentrytitle>lxc-execute</refentrytitle>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <manvolnum>1</manvolnum>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refmeta>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refnamediv>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refname>lxc-execute</refname>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refpurpose>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano run an application inside a container.
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refpurpose>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refnamediv>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refsynopsisdiv>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <cmdsynopsis>
b4578c5b380130a41a69b5b49c970157acaf1dbbDwight Engen <command>lxc-execute</command>
b4578c5b380130a41a69b5b49c970157acaf1dbbDwight Engen <arg choice="req">-n <replaceable>name</replaceable></arg>
b4578c5b380130a41a69b5b49c970157acaf1dbbDwight Engen <arg choice="opt">-f <replaceable>config_file</replaceable></arg>
b4578c5b380130a41a69b5b49c970157acaf1dbbDwight Engen <arg choice="opt">-s KEY=VAL</arg>
b4578c5b380130a41a69b5b49c970157acaf1dbbDwight Engen <arg choice="opt">-- <replaceable>command</replaceable></arg>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </cmdsynopsis>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refsynopsisdiv>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <title>Description</title>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <para>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <command>lxc-execute</command> runs the specified
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <replaceable>command</replaceable> inside the container
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand specified by <replaceable>name</replaceable>.
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand </para>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <para>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand It will setup the container
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand according to the configuration previously defined with the
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand lxc-create command or with the configuration file parameter.
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand If no configuration is
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand defined, the default isolation is used.
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano This command is mainly used when you want to quickly launch an
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand application in an isolated environment.
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </para>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <para>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <command>lxc-execute</command> command will run the
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand specified command into the container via an intermediate
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand process, <command>lxc-init</command>.
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand This lxc-init after launching the specified command,
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand will wait for its end and all other reparented processes.
36b33520f67cd1a83be8031fccc3c2d7d7255e06Stéphane Graber (to support daemons in the container).
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand In other words, in the
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand container, <command>lxc-init</command> has the pid 1 and the
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand first process of the application has the pid 2.
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand </para>
e4b3fe5833cf5e8cb85389ceed8a00254c87b01fgkurz@linux.vnet.ibm.com <para>
e4b3fe5833cf5e8cb85389ceed8a00254c87b01fgkurz@linux.vnet.ibm.com The above <command>lxc-init</command> is designed to forward received
e4b3fe5833cf5e8cb85389ceed8a00254c87b01fgkurz@linux.vnet.ibm.com signals to the started command.
e4b3fe5833cf5e8cb85389ceed8a00254c87b01fgkurz@linux.vnet.ibm.com </para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <title>Options</title>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <variablelist>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <varlistentry>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <term>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <option>-f, --rcfile <replaceable>config_file</replaceable></option>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </term>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <listitem>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano Specify the configuration file to configure the virtualization
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano and isolation functionalities for the container.
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </para>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <para>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand This configuration file if present will be used even if there is
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand already a configuration file present in the previously created
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand container (via lxc-create).
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand </para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </listitem>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </varlistentry>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater <varlistentry>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater <term>
94b81f611fde1efdda844171d7b0d1f2d8f86ce6Michel Normand <option>-s, --define <replaceable>KEY=VAL</replaceable></option>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater </term>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater <listitem>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater <para>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater Assign value <replaceable>VAL</replaceable> to configuration
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater variable <replaceable>KEY</replaceable>. This overrides any
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater assignment done in <replaceable>config_file</replaceable>.
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater </para>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater </listitem>
201172806c477ecb36bc00fad92b85e067712c38Cedric Le Goater </varlistentry>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater <varlistentry>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater <term><option>--</option></term>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater <listitem>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater <para>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater Signal the end of options and disables further option
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater processing. Any arguments after the -- are treated as
1354f952876e96b456425efc7ed9994caf687028Dwight Engen arguments to <replaceable>command</replaceable>.
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater </para>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater <para>
1354f952876e96b456425efc7ed9994caf687028Dwight Engen This option is useful when you want specify options
1354f952876e96b456425efc7ed9994caf687028Dwight Engen to <replaceable>command</replaceable> and don't want
1354f952876e96b456425efc7ed9994caf687028Dwight Engen <command>lxc-execute</command> to interpret them.
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater </para>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater </listitem>
dfafa5a51397b4d3ced980ca80340f383701f823Cedric Le Goater </varlistentry>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </variablelist>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
10fba81b9d0221b8e47aa1e0b43236413b7d28dfMichel Normand &commonoptions;
10fba81b9d0221b8e47aa1e0b43236413b7d28dfMichel Normand
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <title>Diagnostic</title>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <variablelist>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <varlistentry>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <term>The container is busy</term>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <listitem>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano The specified container is already running an
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano application. You should stop it before reuse this
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano container or create a new one.
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </listitem>
f79d43bbe70a01454049b77d6f15f6369744959eStéphane Graber </varlistentry>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </variablelist>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
99e4008cad9e959b683c6f48411fcf15a92be3b5Michel Normand &seealso;
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <title>Author</title>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano </refsect1>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano</refentry>
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano<!-- Keep this comment at the end of the file
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoLocal variables:
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanomode: sgml
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-omittag:t
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-shorttag:t
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-minimize-attributes:nil
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-always-quote-attributes:t
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-indent-step:2
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-indent-data:t
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-parent-document:nil
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-default-dtd-file:nil
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-exposed-tags:nil
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-local-catalogs:nil
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanosgml-local-ecat-files:nil
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcanoEnd:
d823d5b966f49d975a09a8512d084389d6d7ffc7dlezcano-->