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] [-u, --uid
10                   uid] [-g, --gid gid] [-- command]
11

DESCRIPTION

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

OPTIONS

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

COMMON OPTIONS

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

DIAGNOSTIC

108       The container is busy
109              The specified container is already running an  application.  You
110              should stop it before reuse this container or create a new one.
111

SEE ALSO

113       lxc(7),  lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1), lxc-
114       stop(1), lxc-execute(1), lxc-console(1),  lxc-monitor(1),  lxc-wait(1),
115       lxc-cgroup(1),  lxc-ls(1), lxc-info(1), lxc-freeze(1), lxc-unfreeze(1),
116       lxc-attach(1), lxc.conf(5)
117

AUTHOR

119       Daniel Lezcano <daniel.lezcano@free.fr>
120
121
122
123                                  2022-05-26                    lxc-execute(1)
Impressum