]> git.proxmox.com Git - mirror_lxc.git/blob - doc/lxc-start.sgml.in
Create --share-ipc option
[mirror_lxc.git] / doc / lxc-start.sgml.in
1 <!--
2
3 lxc: linux Container library
4
5 (C) Copyright IBM Corp. 2007, 2008
6
7 Authors:
8 Daniel Lezcano <daniel.lezcano at free.fr>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
24 -->
25
26 <!DOCTYPE refentry PUBLIC @docdtd@ [
27
28 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
29 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
30 ]>
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>
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_device</replaceable></arg>
55 <arg choice="opt">-L <replaceable>console_logfile</replaceable></arg>
56 <arg choice="opt">-d</arg>
57 <arg choice="opt">-p <replaceable>pid_file</replaceable></arg>
58 <arg choice="opt">-s KEY=VAL</arg>
59 <arg choice="opt">-C</arg>
60 <arg choice="opt">--share-net <replaceable>name|pid</replaceable></arg>
61 <arg choice="opt">--share-ipc <replaceable>name|pid</replaceable></arg>
62 <arg choice="opt">command</arg>
63 </cmdsynopsis>
64 </refsynopsisdiv>
65
66 <refsect1>
67 <title>Description</title>
68
69 <para>
70 <command>lxc-start</command> runs the specified
71 <replaceable>command</replaceable> inside the container
72 specified by <replaceable>name</replaceable>.
73 </para>
74 <para>
75 It will setup the container
76 according to the configuration previously defined with the
77 lxc-create command or with the configuration file parameter.
78 If no configuration is
79 defined, the default isolation is used.
80 </para>
81 <para>
82 If no command is specified, <command>lxc-start</command> will
83 use the default
84 <command>"/sbin/init"</command> command to run a system
85 container.
86 </para>
87
88 </refsect1>
89
90 <refsect1>
91
92 <title>Options</title>
93
94 <variablelist>
95
96 <varlistentry>
97 <term>
98 <option>-d, --daemon</option>
99 </term>
100 <listitem>
101 <para>
102 Run the container as a daemon. As the container has no
103 more tty, if an error occurs nothing will be displayed,
104 the log file can be used to check the error.
105 </para>
106 </listitem>
107 </varlistentry>
108
109 <varlistentry>
110 <term>
111 <option>-p, --pidfile <replaceable>pid_file</replaceable></option>
112 </term>
113 <listitem>
114 <para>
115 Create a file with the process id.
116 </para>
117 </listitem>
118 </varlistentry>
119
120 <varlistentry>
121 <term>
122 <option>-f, --rcfile <replaceable>config_file</replaceable></option>
123 </term>
124 <listitem>
125 <para>
126 Specify the configuration file to configure the virtualization
127 and isolation functionalities for the container.
128 </para>
129 <para>
130 This configuration file if present will be used even if there is
131 already a configuration file present in the previously created
132 container (via lxc-create).
133 </para>
134 </listitem>
135 </varlistentry>
136
137 <varlistentry>
138 <term>
139 <option>-c,
140 --console <replaceable>console_device</replaceable></option>
141 </term>
142 <listitem>
143 <para>
144 Specify a device to use for the container's console, for example
145 /dev/tty8. If this option is not specified the current terminal
146 will be used unless <option>-d</option> is specified.
147 </para>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry>
152 <term>
153 <option>-L,
154 --console-log <replaceable>console_logfile</replaceable></option>
155 </term>
156 <listitem>
157 <para>
158 Specify a file to log the container's console output to.
159 </para>
160 </listitem>
161 </varlistentry>
162
163 <varlistentry>
164 <term>
165 <option>-s, --define <replaceable>KEY=VAL</replaceable></option>
166 </term>
167 <listitem>
168 <para>
169 Assign value <replaceable>VAL</replaceable> to configuration
170 variable <replaceable>KEY</replaceable>. This overrides any
171 assignment done in <replaceable>config_file</replaceable>.
172 </para>
173 </listitem>
174 </varlistentry>
175
176 <varlistentry>
177 <term>
178 <option>-C,
179 --close-all-fds</option>
180 </term>
181 <listitem>
182 <para>
183 If any file descriptors are inherited, close them. If this option
184 is not specified, then <command>lxc-start</command> will exit with
185 failure instead. Note: <replaceable>--daemon</replaceable> implies
186 <replaceable>--close-all-fds</replaceable>.
187 </para>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry>
192 <term>
193 <option>--share-net <replaceable>name|pid</replaceable></option>
194 </term>
195 <listitem>
196 <para>
197 Inherit a network namespace from
198 a <replaceable>name</replaceable> container or
199 a <replaceable>pid</replaceable>. The network namespace
200 will continue to be managed by the original owner. The
201 network configuration of the starting container is ignored
202 and the up/down scripts won't be executed.
203 </para>
204 </listitem>
205 </varlistentry>
206
207 <varlistentry>
208 <term>
209 <option>--share-ipc <replaceable>name|pid</replaceable></option>
210 </term>
211 <listitem>
212 <para>
213 Inherit an IPC namespace from
214 a <replaceable>name</replaceable> container or
215 a <replaceable>pid</replaceable>.
216 </para>
217 </listitem>
218 </varlistentry>
219
220 </variablelist>
221
222 </refsect1>
223
224 &commonoptions;
225
226 <refsect1>
227 <title>Diagnostic</title>
228
229 <variablelist>
230
231 <varlistentry>
232 <term>The container is busy</term>
233 <listitem>
234 <para>
235 The specified container is already running an
236 application. You should stop it before reuse this
237 container or create a new one.
238 </para>
239 </listitem>
240 </varlistentry>
241
242 </variablelist>
243
244 </refsect1>
245
246 &seealso;
247
248 <refsect1>
249 <title>Author</title>
250 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
251 </refsect1>
252
253 </refentry>
254
255 <!-- Keep this comment at the end of the file
256 Local variables:
257 mode: sgml
258 sgml-omittag:t
259 sgml-shorttag:t
260 sgml-minimize-attributes:nil
261 sgml-always-quote-attributes:t
262 sgml-indent-step:2
263 sgml-indent-data:t
264 sgml-parent-document:nil
265 sgml-default-dtd-file:nil
266 sgml-exposed-tags:nil
267 sgml-local-catalogs:nil
268 sgml-local-ecat-files:nil
269 End:
270 -->