Debian Codegraph @

doc/lxc-stop.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-stop</refentrytitle>
15 <manvolnum>1</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>lxc-stop</refname>
20
21 <refpurpose>
22 stop the application running inside a container
23 </refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <cmdsynopsis>
28 <command>lxc-stop</command>
29 <arg choice="req">-n <replaceable>name</replaceable></arg>
30 <arg choice="opt">-W</arg>
31 <arg choice="opt">-r</arg>
32 <arg choice="opt">-t <replaceable>timeout</replaceable></arg>
33 <arg choice="opt">-k</arg>
34 <arg choice="opt">--nokill</arg>
35 <arg choice="opt">--nolock</arg>
36 </cmdsynopsis>
37 </refsynopsisdiv>
38
39 <refsect1>
40 <title>Description</title>
41
42 <para>
43 <command>lxc-stop</command> reboots, cleanly shuts down, or kills
44 all the processes inside the container. By default, it will
45 request a clean shutdown of the container by sending
46 <command>lxc.signal.halt</command> (defaults to SIGPWR) to
47 the container's init process, waiting up to 60 seconds for the container
48 to exit, and then returning. If the container fails to cleanly exit in
49 60 seconds, it will be sent the <command>lxc.signal.stop</command>
50 (defaults to SIGKILL) to force it to shut down. A request to reboot will
51 send the <command>lxc.signal.reboot</command> (defaults to SIGINT) to the
52 container's init process.
53 </para>
54 <para>
55 The <optional>-W</optional>, <optional>-r</optional>,
56 <optional>-k</optional> and <optional>--nokill</optional>
57 options specify the action to perform.
58 <optional>-W</optional> indicates that after performing the specified
59 action, <command>lxc-stop</command> should immediately exit, while
60 <optional>-t TIMEOUT</optional> specifies the maximum amount of time
61 to wait for the container to complete the shutdown or reboot.
62 </para>
63 </refsect1>
64
65 <refsect1>
66 <title>Options</title>
67 <variablelist>
68
69 <varlistentry>
70 <term>
71 <option>-r,--reboot </option>
72 </term>
73 <listitem>
74 <para>
75 Request a reboot of the container.
76 </para>
77 </listitem>
78 </varlistentry>
79
80 <varlistentry>
81 <term>
82 <option>-k,--kill </option>
83 </term>
84 <listitem>
85 <para>
86 Rather than requesting a clean shutdown of the container, explicitly
87 kill all tasks in the container. This is the legacy
88 <command>lxc-stop</command> behavior.
89 </para>
90 </listitem>
91 </varlistentry>
92
93 <varlistentry>
94 <term>
95 <option>--nokill</option>
96 </term>
97 <listitem>
98 <para>
99 Only request a clean shutdown, do not kill the container tasks if the
100 clean shutdown fails.
101 </para>
102 </listitem>
103 </varlistentry>
104
105 <varlistentry>
106 <term>
107 <option>--nolock </option>
108 </term>
109 <listitem>
110 <para>
111 This option avoids the use of any of the API lxc locking, and should
112 only be used if <command>lxc-stop</command> is hanging due to a bad
113 system state.
114 </para>
115 </listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term>
120 <option>-W,--nowait </option>
121 </term>
122 <listitem>
123 <para>
124 Simply perform the requestion action (reboot, shutdown, or hard
125 kill) and exit.
126 </para>
127 </listitem>
128 </varlistentry>
129
130 <varlistentry>
131 <term>
132 <option>-t,--timeout <replaceable>TIMEOUT</replaceable></option>
133 </term>
134 <listitem>
135 <para>
136 Wait TIMEOUT seconds before hard-stopping the container.
137 </para>
138 </listitem>
139 </varlistentry>
140
141 </variablelist>
142 </refsect1>
143
144 <refsect1>
145 <title>Exit value</title>
146
147 <variablelist>
148
149 <varlistentry>
150 <term>0</term>
151 <listitem>
152 <para>
153 The container was successfully stopped.
154 </para>
155 </listitem>
156 </varlistentry>
157
158 <varlistentry>
159 <term>1</term>
160 <listitem>
161 <para>
162 An error occurred while stopping the container.
163 </para>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry>
168 <term>2</term>
169 <listitem>
170 <para>
171 The specified container exists but was not running.
172 </para>
173 </listitem>
174 </varlistentry>
175
176 </variablelist>
177
178 </refsect1>
179 <refsect1>
180 <title>Diagnostic</title>
181
182 <variablelist>
183
184 <varlistentry>
185 <term>The container was not found</term>
186 <listitem>
187 <para>
188 The specified container was not created before with
189 the <command>lxc-create</command> command.
190 </para>
191 </listitem>
192 </varlistentry>
193
194 </variablelist>
195
196 </refsect1>
197
198 &seealso;
199
200 </refentry>
201
202 <!-- Keep this comment at the end of the file
203 Local variables:
204 mode: sgml
205 sgml-omittag:t
206 sgml-shorttag:t
207 sgml-minimize-attributes:nil
208 sgml-always-quote-attributes:t
209 sgml-indent-step:2
210 sgml-indent-data:t
211 sgml-parent-document:nil
212 sgml-default-dtd-file:nil
213 sgml-exposed-tags:nil
214 sgml-local-catalogs:nil
215 sgml-local-ecat-files:nil
216 End:
217 -->