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

NAME

6       lxc-execute - run an application inside a container.
7

SYNOPSIS

9       lxc-execute {-n name} [-d] [-f config_file] [-s KEY=VAL] [-- command]
10

DESCRIPTION

12       lxc-execute  runs  the specified command inside the container specified
13       by name.
14
15       It will setup the container according to the  configuration  previously
16       defined  with the lxc-create command or with the configuration file pa‐
17       rameter.  If no configuration is  defined,  the  default  isolation  is
18       used.
19
20       This command is mainly used when you want to quickly launch an applica‐
21       tion in an isolated environment.
22
23       lxc-execute command will run the specified command into  the  container
24       via  an  intermediate process, lxc-init.  This lxc-init after launching
25       the specified command, will wait for its end and all  other  reparented
26       processes.   (to support daemons in the container).  In other words, in
27       the container, lxc-init has the pid 1 and the first process of the  ap‐
28       plication has the pid 2.
29
30       The  above  lxc-init  is  designed  to  forward received signals to the
31       started command.
32

OPTIONS

34       -f, --rcfile config_file
35              Specify the configuration file to configure  the  virtualization
36              and isolation functionalities for the container.
37
38              This configuration file if present will be used even if there is
39              already a configuration file present in the  previously  created
40              container (via lxc-create).
41
42       -s, --define KEY=VAL
43              Assign  value  VAL to configuration variable KEY. This overrides
44              any assignment done in config_file.
45
46       -d, --daemon
47              Run the container as a daemon. As the container has no more tty,
48              if  an  error occurs nothing will be displayed, the log file can
49              be used to check the error.
50
51       --     Signal the end of options and disables further  option  process‐
52              ing. Any arguments after the -- are treated as arguments to com‐
53              mand.
54
55              This option is useful when you want specify options  to  command
56              and don't want lxc-execute to interpret them.
57

COMMON OPTIONS

59       These options are common to most of lxc commands.
60
61       -?, -h, --help
62              Print a longer usage message than normal.
63
64       --usage
65              Give the usage message
66
67       -q, --quiet
68              mute on
69
70       -P, --lxcpath=PATH
71              Use an alternate container path. The default is /var/lib/lxc.
72
73       -o, --logfile=FILE
74              Output to an alternate log FILE. The default is no log.
75
76       -l, --logpriority=LEVEL
77              Set  log  priority  to LEVEL. The default log priority is ERROR.
78              Possible values are : FATAL, CRIT, WARN,  ERROR,  NOTICE,  INFO,
79              DEBUG.
80
81              Note  that this option is setting the priority of the events log
82              in the alternate log file. It do not have effect  on  the  ERROR
83              events log on stderr.
84
85       -n, --name=NAME
86              Use  container identifier NAME.  The container identifier format
87              is an alphanumeric string.
88
89       --rcfile=FILE
90              Specify the configuration file to configure  the  virtualization
91              and isolation functionalities for the container.
92
93              This configuration file if present will be used even if there is
94              already a configuration file present in the  previously  created
95              container (via lxc-create).
96
97       --version
98              Show the version number.
99

DIAGNOSTIC

101       The container is busy
102              The  specified  container is already running an application. You
103              should stop it before reuse this container or create a new one.
104

SEE ALSO

106       lxc(7), lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1),  lxc-
107       stop(1),  lxc-execute(1),  lxc-console(1), lxc-monitor(1), lxc-wait(1),
108       lxc-cgroup(1), lxc-ls(1), lxc-info(1), lxc-freeze(1),  lxc-unfreeze(1),
109       lxc-attach(1), lxc.conf(5)
110

AUTHOR

112       Daniel Lezcano <daniel.lezcano@free.fr>
113
114
115
116                                  2019-02-01                    lxc-execute(1)
Impressum