3 lxc: linux Container library
5 (C) Copyright IBM Corp. 2007, 2008
8 Daniel Lezcano <daniel.lezcano at free.fr>
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.
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.
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
26 <!DOCTYPE refentry PUBLIC @docdtd@ [
28 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
29 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
34 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
37 <refentrytitle>lxc-stop</refentrytitle>
38 <manvolnum>1</manvolnum>
42 <refname>lxc-stop</refname>
45 stop the application running inside a container
51 <command>lxc-stop</command>
52 <arg choice="req">-n <replaceable>name</replaceable></arg>
53 <arg choice="opt">-W</arg>
54 <arg choice="opt">-r</arg>
55 <arg choice="opt">-t <replaceable>timeout</replaceable></arg>
56 <arg choice="opt">-k</arg>
57 <arg choice="opt">--nokill</arg>
58 <arg choice="opt">--nolock</arg>
63 <title>Description</title>
66 <command>lxc-stop</command> reboots, cleanly shuts down, or kills
67 all the processes inside the container. By default, it will
68 request a clean shutdown of the container by sending
69 <command>lxc.haltsignal</command> (defaults to SIGPWR) to
70 the container's init process, waiting up to 60 seconds for the container
71 to exit, and then returning. If the container fails to cleanly exit in
72 60 seconds, it will be sent the <command>lxc.stopsignal</command>
73 (defaults to SIGKILL) to force it to shut down.
76 The <optional>-W</optional>, <optional>-r</optional>,
77 <optional>-k</optional> and <optional>--nokill</optional>
78 options specify the action to perform.
79 <optional>-W</optional> indicates that after performing the specified
80 action, <command>lxc-stop</command> should immediately exit, while
81 <optional>-t TIMEOUT</optional> specifies the maximum amount of time
82 to wait for the container to complete the shutdown or reboot.
87 <title>Options</title>
92 <option>-r,--reboot </option>
96 Request a reboot of the container.
103 <option>-k,--kill </option>
107 Rather than requesting a clean shutdown of the container, explicitly
108 kill all tasks in the container. This is the legacy
109 <command>lxc-stop</command> behavior.
116 <option>--nokill</option>
120 Only request a clean shutdown, do not kill the container tasks if the
121 clean shutdown fails.
128 <option>--nolock </option>
132 This option avoids the use of any of the API lxc locking, and should
133 only be used if <command>lxc-stop</command> is hanging due to a bad
141 <option>-W,--nowait </option>
145 Simply perform the requestion action (reboot, shutdown, or hard
153 <option>-t,--timeout <replaceable>TIMEOUT</replaceable></option>
157 Wait TIMEOUT seconds before hard-stopping the container.
166 <title>Diagnostic</title>
171 <term>The container was not found</term>
174 The specified container was not created before with
175 the <command>lxc-create</command> command.
187 <title>Author</title>
188 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
193 <!-- Keep this comment at the end of the file
198 sgml-minimize-attributes:nil
199 sgml-always-quote-attributes:t
202 sgml-parent-document:nil
203 sgml-default-dtd-file:nil
204 sgml-exposed-tags:nil
205 sgml-local-catalogs:nil
206 sgml-local-ecat-files:nil