]>
Commit | Line | Data |
---|---|---|
d823d5b9 | 1 | <!-- |
2 | ||
3 | lxc: linux Container library | |
4 | ||
5 | (C) Copyright IBM Corp. 2007, 2008 | |
6 | ||
7 | Authors: | |
8 | Daniel Lezcano <dlezcano at fr.ibm.com> | |
9 | ||
10 | This library is free software; you can redistribute it and/or | |
11 | modify it under the terms of the GNU Lesser General Public | |
12 | License as published by the Free Software Foundation; either | |
13 | version 2.1 of the License, or (at your option) any later version. | |
14 | ||
15 | This library is distributed in the hope that it will be useful, | |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public | |
21 | License along with this library; if not, write to the Free Software | |
22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 | ||
24 | --> | |
25 | ||
aa8d013e | 26 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
99e4008c | 27 | |
10fba81b | 28 | <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml"> |
99e4008c MN |
29 | <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml"> |
30 | ]> | |
d823d5b9 | 31 | |
32 | <refentry> | |
33 | ||
34 | <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo> | |
35 | ||
36 | <refmeta> | |
37 | <refentrytitle>lxc-start</refentrytitle> | |
38 | <manvolnum>1</manvolnum> | |
39 | </refmeta> | |
40 | ||
41 | <refnamediv> | |
42 | <refname>lxc-start</refname> | |
43 | ||
44 | <refpurpose> | |
45 | run an application inside a container. | |
46 | </refpurpose> | |
47 | </refnamediv> | |
48 | ||
49 | <refsynopsisdiv> | |
b4578c5b DE |
50 | <cmdsynopsis> |
51 | <command>lxc-start</command> | |
52 | <arg choice="req">-n <replaceable>name</replaceable></arg> | |
53 | <arg choice="opt">-f <replaceable>config_file</replaceable></arg> | |
54 | <arg choice="opt">-c <replaceable>console_file</replaceable></arg> | |
55 | <arg choice="opt">-d</arg> | |
3114c982 | 56 | <arg choice="opt">-p <replaceable>pid_file</replaceable></arg> |
b4578c5b DE |
57 | <arg choice="opt">-s KEY=VAL</arg> |
58 | <arg choice="opt">-C</arg> | |
59 | <arg choice="opt">command</arg> | |
60 | </cmdsynopsis> | |
d823d5b9 | 61 | </refsynopsisdiv> |
62 | ||
63 | <refsect1> | |
64 | <title>Description</title> | |
65 | ||
66 | <para> | |
94b81f61 MN |
67 | <command>lxc-start</command> runs the specified |
68 | <replaceable>command</replaceable> inside the container | |
69 | specified by <replaceable>name</replaceable>. | |
70 | </para> | |
71 | <para> | |
72 | It will setup the container | |
73 | according to the configuration previously defined with the | |
74 | lxc-create command or with the configuration file parameter. | |
75 | If no configuration is | |
76 | defined, the default isolation is used. | |
77 | </para> | |
78 | <para> | |
79 | The orphan process group | |
6a22713f DL |
80 | and daemon are not supported by this command, use |
81 | the <command>lxc-execute</command> command instead. | |
94b81f61 MN |
82 | </para> |
83 | <para> | |
d823d5b9 | 84 | If no command is specified, <command>lxc-start</command> will |
85 | use the default | |
86 | <command>"/sbin/init"</command> command to run a system | |
87 | container. | |
d823d5b9 | 88 | </para> |
89 | ||
90 | </refsect1> | |
91 | ||
c36583c3 DL |
92 | <refsect1> |
93 | ||
94 | <title>Options</title> | |
95 | ||
96 | <variablelist> | |
97 | ||
98 | <varlistentry> | |
99 | <term> | |
100 | <option>-d, --daemon</option> | |
101 | </term> | |
102 | <listitem> | |
103 | <para> | |
104 | Run the container as a daemon. As the container has no | |
105 | more tty, if an error occurs nothing will be displayed, | |
106 | the log file can be used to check the error. | |
107 | </para> | |
108 | </listitem> | |
109 | </varlistentry> | |
110 | ||
3114c982 NC |
111 | <varlistentry> |
112 | <term> | |
113 | <option>-p, --pidfile <replaceable>pid_file</replaceable></option> | |
114 | </term> | |
115 | <listitem> | |
116 | <para> | |
117 | Create a file with the process id. | |
118 | </para> | |
119 | </listitem> | |
120 | </varlistentry> | |
121 | ||
0f71d073 DL |
122 | <varlistentry> |
123 | <term> | |
94b81f61 | 124 | <option>-f, --rcfile <replaceable>config_file</replaceable></option> |
0f71d073 DL |
125 | </term> |
126 | <listitem> | |
127 | <para> | |
128 | Specify the configuration file to configure the virtualization | |
129 | and isolation functionalities for the container. | |
130 | </para> | |
becc0400 MN |
131 | <para> |
132 | This configuration file if present will be used even if there is | |
133 | already a configuration file present in the previously created | |
134 | container (via lxc-create). | |
135 | </para> | |
0f71d073 DL |
136 | </listitem> |
137 | </varlistentry> | |
138 | ||
829dd918 DL |
139 | <varlistentry> |
140 | <term> | |
141 | <option>-c, | |
142 | --console <replaceable>console_file</replaceable></option> | |
143 | </term> | |
144 | <listitem> | |
145 | <para> | |
146 | Specify a file to output the container console. If the | |
147 | option is not specified the output will go the terminal | |
148 | except if the <option>-d</option> is specified. | |
149 | </para> | |
150 | </listitem> | |
151 | </varlistentry> | |
152 | ||
33ba4ad7 CLG |
153 | <varlistentry> |
154 | <term> | |
94b81f61 | 155 | <option>-s, --define <replaceable>KEY=VAL</replaceable></option> |
33ba4ad7 CLG |
156 | </term> |
157 | <listitem> | |
158 | <para> | |
159 | Assign value <replaceable>VAL</replaceable> to configuration | |
160 | variable <replaceable>KEY</replaceable>. This overrides any | |
161 | assignment done in <replaceable>config_file</replaceable>. | |
162 | </para> | |
163 | </listitem> | |
164 | </varlistentry> | |
165 | ||
1305dd24 SH |
166 | <varlistentry> |
167 | <term> | |
168 | <option>-C, | |
169 | --close-all-fds</option> | |
170 | </term> | |
171 | <listitem> | |
172 | <para> | |
173 | If any file descriptors are inherited, close them. If this option | |
174 | is not specified, then <command>lxc-start</command> will exit with | |
175 | failure instead. Note: <replaceable>--daemon</replaceable> implies | |
176 | <replaceable>--close-all-fds</replaceable>. | |
177 | </para> | |
178 | </listitem> | |
179 | </varlistentry> | |
180 | ||
c36583c3 DL |
181 | </variablelist> |
182 | ||
183 | </refsect1> | |
184 | ||
10fba81b | 185 | &commonoptions; |
d823d5b9 | 186 | |
187 | <refsect1> | |
188 | <title>Diagnostic</title> | |
189 | ||
190 | <variablelist> | |
191 | ||
192 | <varlistentry> | |
193 | <term>The container is busy</term> | |
194 | <listitem> | |
195 | <para> | |
196 | The specified container is already running an | |
197 | application. You should stop it before reuse this | |
198 | container or create a new one. | |
199 | </para> | |
200 | </listitem> | |
201 | </varlistentry> | |
202 | ||
d823d5b9 | 203 | </variablelist> |
204 | ||
205 | </refsect1> | |
206 | ||
99e4008c | 207 | &seealso; |
d823d5b9 | 208 | |
209 | <refsect1> | |
210 | <title>Author</title> | |
211 | <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para> | |
212 | </refsect1> | |
213 | ||
214 | </refentry> | |
215 | ||
216 | <!-- Keep this comment at the end of the file | |
217 | Local variables: | |
218 | mode: sgml | |
219 | sgml-omittag:t | |
220 | sgml-shorttag:t | |
221 | sgml-minimize-attributes:nil | |
222 | sgml-always-quote-attributes:t | |
223 | sgml-indent-step:2 | |
224 | sgml-indent-data:t | |
225 | sgml-parent-document:nil | |
226 | sgml-default-dtd-file:nil | |
227 | sgml-exposed-tags:nil | |
228 | sgml-local-catalogs:nil | |
229 | sgml-local-ecat-files:nil | |
230 | End: | |
231 | --> |