.\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH lxc-stop 1 2024-09-16 "" "" .SH NAME lxc-stop \- stop the application running inside a container .SH SYNOPSIS 'nh .fi .ad l \fBlxc-stop\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu {-n \fIname\fR} [-W] [-r] [-t \fItimeout\fR] [-k] [--nokill] [--nolock] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBlxc-stop\fR reboots, cleanly shuts down, or kills all the processes inside the container. By default, it will request a clean shutdown of the container by sending \fBlxc.signal.halt\fR (defaults to SIGPWR) to the container's init process, waiting up to 60 seconds for the container to exit, and then returning. If the container fails to cleanly exit in 60 seconds, it will be sent the \fBlxc.signal.stop\fR (defaults to SIGKILL) to force it to shut down. A request to reboot will send the \fBlxc.signal.reboot\fR (defaults to SIGINT) to the container's init process. .PP The [-W], [-r], [-k] and [--nokill] options specify the action to perform. [-W] indicates that after performing the specified action, \fBlxc-stop\fR should immediately exit, while [-t TIMEOUT] specifies the maximum amount of time to wait for the container to complete the shutdown or reboot. .SH OPTIONS .TP \*(T<\fB\-r,\-\-reboot \fR\*(T> Request a reboot of the container. .TP \*(T<\fB\-k,\-\-kill \fR\*(T> Rather than requesting a clean shutdown of the container, explicitly kill all tasks in the container. This is the legacy \fBlxc-stop\fR behavior. .TP \*(T<\fB\-\-nokill\fR\*(T> Only request a clean shutdown, do not kill the container tasks if the clean shutdown fails. .TP \*(T<\fB\-\-nolock \fR\*(T> This option avoids the use of any of the API lxc locking, and should only be used if \fBlxc-stop\fR is hanging due to a bad system state. .TP \*(T<\fB\-W,\-\-nowait \fR\*(T> Simply perform the requestion action (reboot, shutdown, or hard kill) and exit. .TP \*(T<\fB\-t,\-\-timeout \fR\*(T>\fITIMEOUT\fR Wait TIMEOUT seconds before hard-stopping the container. .SH "EXIT VALUE" .TP 0 The container was successfully stopped. .TP 1 An error occurred while stopping the container. .TP 2 The specified container exists but was not running. .SH DIAGNOSTIC .TP The container was not found The specified container was not created before with the \fBlxc-create\fR command. .SH "SEE ALSO" \fBlxc\fR(7), \fBlxc-create\fR(1), \fBlxc-copy\fR(1), \fBlxc-destroy\fR(1), \fBlxc-start\fR(1), \fBlxc-stop\fR(1), \fBlxc-execute\fR(1), \fBlxc-console\fR(1), \fBlxc-monitor\fR(1), \fBlxc-wait\fR(1), \fBlxc-cgroup\fR(1), \fBlxc-ls\fR(1), \fBlxc-info\fR(1), \fBlxc-freeze\fR(1), \fBlxc-unfreeze\fR(1), \fBlxc-attach\fR(1), \fBlxc.conf\fR(5)