1lxc-stop(1)                                                        lxc-stop(1)
2
3
4

NAME

6       lxc-stop - stop the application running inside a container
7

SYNOPSIS

9       lxc-stop {-n name} [-W] [-r] [-t timeout] [-k] [--nokill] [--nolock]
10

DESCRIPTION

12       lxc-stop reboots, cleanly shuts down, or kills all the processes inside
13       the container. By default, it will request a clean shutdown of the con‐
14       tainer  by sending lxc.signal.halt (defaults to SIGPWR) to the contain‐
15       er's init process, waiting up to 60 seconds for the container to  exit,
16       and  then  returning. If the container fails to cleanly exit in 60 sec‐
17       onds, it will be sent the  lxc.signal.stop  (defaults  to  SIGKILL)  to
18       force it to shut down. A request to reboot will send the lxc.signal.re‐
19       boot (defaults to SIGINT) to the container's init process.
20
21       The [-W], [-r], [-k] and [--nokill] options specify the action to  per‐
22       form.   [-W] indicates that after performing the specified action, lxc-
23       stop should immediately exit, while [-t TIMEOUT] specifies the  maximum
24       amount  of  time  to wait for the container to complete the shutdown or
25       reboot.
26

OPTIONS

28       -r,--reboot
29              Request a reboot of the container.
30
31       -k,--kill
32              Rather than requesting a clean shutdown of  the  container,  ex‐
33              plicitly  kill  all  tasks  in the container. This is the legacy
34              lxc-stop behavior.
35
36       --nokill
37              Only request a clean shutdown, do not kill the  container  tasks
38              if the clean shutdown fails.
39
40       --nolock
41              This  option  avoids  the use of any of the API lxc locking, and
42              should only be used if lxc-stop is hanging due to a  bad  system
43              state.
44
45       -W,--nowait
46              Simply  perform the requestion action (reboot, shutdown, or hard
47              kill) and exit.
48
49       -t,--timeout TIMEOUT
50              Wait TIMEOUT seconds before hard-stopping the container.
51

EXIT VALUE

53       0      The container was successfully stopped.
54
55       1      An error occurred while stopping the container.
56
57       2      The specified container exists but was not running.
58

DIAGNOSTIC

60       The container was not found
61              The specified container was not created before with the lxc-cre‐
62              ate command.
63

SEE ALSO

65       lxc(7),  lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1), lxc-
66       stop(1), lxc-execute(1), lxc-console(1),  lxc-monitor(1),  lxc-wait(1),
67       lxc-cgroup(1),  lxc-ls(1), lxc-info(1), lxc-freeze(1), lxc-unfreeze(1),
68       lxc-attach(1), lxc.conf(5)
69

AUTHOR

71       Daniel Lezcano <daniel.lezcano@free.fr>
72
73
74
75                                  2022-07-21                       lxc-stop(1)
Impressum