Debian Codegraph @

doc/lxc-start.sgml.in

raw
1 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
2
3 <!DOCTYPE refentry PUBLIC @docdtd@ [
4
5 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
6 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
7 ]>
8
9 <refentry>
10
11 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
12
13 <refmeta>
14 <refentrytitle>lxc-start</refentrytitle>
15 <manvolnum>1</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>lxc-start</refname>
20
21 <refpurpose>
22 run an application inside a container.
23 </refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <cmdsynopsis>
28 <command>lxc-start</command>
29 <arg choice="req">-n <replaceable>name</replaceable></arg>
30 <arg choice="opt">-f <replaceable>config_file</replaceable></arg>
31 <arg choice="opt">-c <replaceable>console_device</replaceable></arg>
32 <arg choice="opt">-L <replaceable>console_logfile</replaceable></arg>
33 <arg choice="opt">-d</arg>
34 <arg choice="opt">-F</arg>
35 <arg choice="opt">-p <replaceable>pid_file</replaceable></arg>
36 <arg choice="opt">-s KEY=VAL</arg>
37 <arg choice="opt">-C</arg>
38 <arg choice="opt">--share-[net|ipc|uts] <replaceable>name|pid</replaceable></arg>
39 <arg choice="opt">command</arg>
40 </cmdsynopsis>
41 </refsynopsisdiv>
42
43 <refsect1>
44 <title>Description</title>
45
46 <para>
47 <command>lxc-start</command> runs the specified
48 <replaceable>command</replaceable> inside the container
49 specified by <replaceable>name</replaceable>.
50 </para>
51 <para>
52 It will setup the container
53 according to the configuration previously defined with the
54 lxc-create command or with the configuration file parameter.
55 If no configuration is
56 defined, the default isolation is used.
57 </para>
58 <para>
59 If no command is specified, <command>lxc-start</command> will
60 use the command defined in lxc.init.cmd or if not set, the default
61 <command>"/sbin/init"</command> command to run a system
62 container.
63 </para>
64
65 </refsect1>
66
67 <refsect1>
68
69 <title>Options</title>
70
71 <variablelist>
72
73 <varlistentry>
74 <term>
75 <option>-d, --daemon</option>
76 </term>
77 <listitem>
78 <para>
79 Run the container as a daemon. As the container has no
80 more tty, if an error occurs nothing will be displayed,
81 the log file can be used to check the error. (This is the default mode)
82 </para>
83 </listitem>
84 </varlistentry>
85
86 <varlistentry>
87 <term>
88 <option>-F, --foreground</option>
89 </term>
90 <listitem>
91 <para>
92 Run the container in the foreground. In this mode, the container
93 console will be attached to the current tty and signals will be routed
94 directly to the container.
95 </para>
96 </listitem>
97 </varlistentry>
98
99 <varlistentry>
100 <term>
101 <option>-p, --pidfile <replaceable>pid_file</replaceable></option>
102 </term>
103 <listitem>
104 <para>
105 Create a file with the process id.
106 </para>
107 </listitem>
108 </varlistentry>
109
110 <varlistentry>
111 <term>
112 <option>-f, --rcfile <replaceable>config_file</replaceable></option>
113 </term>
114 <listitem>
115 <para>
116 Specify the configuration file to configure the virtualization
117 and isolation functionalities for the container.
118 </para>
119 <para>
120 This configuration file if present will be used even if there is
121 already a configuration file present in the previously created
122 container (via lxc-create).
123 </para>
124 </listitem>
125 </varlistentry>
126
127 <varlistentry>
128 <term>
129 <option>-c,
130 --console <replaceable>console_device</replaceable></option>
131 </term>
132 <listitem>
133 <para>
134 Specify a device to use for the container's console, for example
135 /dev/tty8. If this option is not specified the current terminal
136 will be used unless <option>-d</option> is specified.
137 </para>
138 </listitem>
139 </varlistentry>
140
141 <varlistentry>
142 <term>
143 <option>-L,
144 --console-log <replaceable>console_logfile</replaceable></option>
145 </term>
146 <listitem>
147 <para>
148 Specify a file to log the container's console output to.
149 </para>
150 </listitem>
151 </varlistentry>
152
153 <varlistentry>
154 <term>
155 <option>-s, --define <replaceable>KEY=VAL</replaceable></option>
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
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
181 <varlistentry>
182 <term>
183 <option>--share-net <replaceable>name|pid</replaceable></option>
184 </term>
185 <listitem>
186 <para>
187 Inherit a network namespace from
188 a <replaceable>name</replaceable> container or
189 a <replaceable>pid</replaceable>. The network namespace
190 will continue to be managed by the original owner. The
191 network configuration of the starting container is ignored
192 and the up/down scripts won't be executed.
193 </para>
194 </listitem>
195 </varlistentry>
196
197 <varlistentry>
198 <term>
199 <option>--share-ipc <replaceable>name|pid</replaceable></option>
200 </term>
201 <listitem>
202 <para>
203 Inherit an IPC namespace from
204 a <replaceable>name</replaceable> container or
205 a <replaceable>pid</replaceable>.
206 </para>
207 </listitem>
208 </varlistentry>
209
210 <varlistentry>
211 <term>
212 <option>--share-uts <replaceable>name|pid</replaceable></option>
213 </term>
214 <listitem>
215 <para>
216 Inherit a UTS namespace from
217 a <replaceable>name</replaceable> container or
218 a <replaceable>pid</replaceable>. The starting LXC will
219 not set the hostname, but the container OS may do it
220 anyway.
221 </para>
222 </listitem>
223 </varlistentry>
224
225 </variablelist>
226
227 </refsect1>
228
229 &commonoptions;
230
231 <refsect1>
232 <title>Diagnostic</title>
233
234 <variablelist>
235
236 <varlistentry>
237 <term>The container is busy</term>
238 <listitem>
239 <para>
240 The specified container is already running an
241 application. You should stop it before reuse this
242 container or create a new one.
243 </para>
244 </listitem>
245 </varlistentry>
246
247 </variablelist>
248
249 </refsect1>
250
251 &seealso;
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 -->