'\" -*- 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-start 1 2024-03-30 "" "" .SH NAME lxc-start \- run an application inside a container. .SH SYNOPSIS 'nh .fi .ad l \*(T<\fBlxc\-start\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu {-n \fIname\fR} [-f \fIconfig_file\fR] [-c \fIconsole_device\fR] [-L \fIconsole_logfile\fR] [-d] [-F] [-p \fIpid_file\fR] [-s KEY=VAL] [-C] [--share-[net|ipc|uts] \fIname|pid\fR] [command] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBlxc-start\fR runs the specified \fIcommand\fR inside the container specified by \fIname\fR. .PP It will setup the container according to the configuration previously defined with the lxc-create command or with the configuration file parameter. If no configuration is defined, the default isolation is used. .PP If no command is specified, \fBlxc-start\fR will use the command defined in lxc.init.cmd or if not set, the default \fB"/sbin/init"\fR command to run a system container. .SH OPTIONS .TP \*(T<\fB\-d, \-\-daemon\fR\*(T> Run the container as a daemon. As the container has no more tty, if an error occurs nothing will be displayed, the log file can be used to check the error. (This is the default mode) .TP \*(T<\fB\-F, \-\-foreground\fR\*(T> Run the container in the foreground. In this mode, the container console will be attached to the current tty and signals will be routed directly to the container. .TP \*(T<\fB\-p, \-\-pidfile \fR\*(T>\fIpid_file\fR Create a file with the process id. .TP \*(T<\fB\-f, \-\-rcfile \fR\*(T>\fIconfig_file\fR Specify the configuration file to configure the virtualization and isolation functionalities for the container. This configuration file if present will be used even if there is already a configuration file present in the previously created container (via lxc-create). .TP \*(T<\fB\-c, \-\-console \fR\*(T>\fIconsole_device\fR Specify a device to use for the container's console, for example /dev/tty8. If this option is not specified the current terminal will be used unless \*(T<\fB\-d\fR\*(T> is specified. .TP \*(T<\fB\-L, \-\-console\-log \fR\*(T>\fIconsole_logfile\fR Specify a file to log the container's console output to. .TP \*(T<\fB\-s, \-\-define \fR\*(T>\fIKEY=VAL\fR Assign value \fIVAL\fR to configuration variable \fIKEY\fR. This overrides any assignment done in \fIconfig_file\fR. .TP \*(T<\fB\-C, \-\-close\-all\-fds\fR\*(T> If any file descriptors are inherited, close them. If this option is not specified, then \fBlxc-start\fR will exit with failure instead. Note: \fI--daemon\fR implies \fI--close-all-fds\fR. .TP \*(T<\fB\-\-share\-net \fR\*(T>\fIname|pid\fR Inherit a network namespace from a \fIname\fR container or a \fIpid\fR. The network namespace will continue to be managed by the original owner. The network configuration of the starting container is ignored and the up/down scripts won't be executed. .TP \*(T<\fB\-\-share\-ipc \fR\*(T>\fIname|pid\fR Inherit an IPC namespace from a \fIname\fR container or a \fIpid\fR. .TP \*(T<\fB\-\-share\-uts \fR\*(T>\fIname|pid\fR Inherit a UTS namespace from a \fIname\fR container or a \fIpid\fR. The starting LXC will not set the hostname, but the container OS may do it anyway. .SH "COMMON OPTIONS" These options are common to most of lxc commands. .TP \*(T<\fB\-?, \-h, \-\-help\fR\*(T> Print a longer usage message than normal. .TP \*(T<\fB\-\-usage\fR\*(T> Give the usage message .TP \*(T<\fB\-q, \-\-quiet\fR\*(T> mute on .TP \*(T<\fB\-P, \-\-lxcpath=\fR\*(T>\fIPATH\fR Use an alternate container path. The default is /var/lib/lxc. .TP \*(T<\fB\-o, \-\-logfile=\fR\*(T>\fIFILE\fR Output to an alternate log \fIFILE\fR. The default is no log. .TP \*(T<\fB\-l, \-\-logpriority=\fR\*(T>\fILEVEL\fR Set log priority to \fILEVEL\fR. The default log priority is \*(T. Possible values are : \*(T, \*(T, \*(T, \*(T, \*(T, \*(T, \*(T, \*(T, \*(T. Note that this option is setting the priority of the events log in the alternate log file. It do not have effect on the ERROR events log on stderr. .TP \*(T<\fB\-n, \-\-name=\fR\*(T>\fINAME\fR Use container identifier \fINAME\fR. The container identifier format is an alphanumeric string. .TP \*(T<\fB\-\-rcfile=\fR\*(T>\fIFILE\fR Specify the configuration file to configure the virtualization and isolation functionalities for the container. This configuration file if present will be used even if there is already a configuration file present in the previously created container (via lxc-create). .TP \*(T<\fB\-\-version\fR\*(T> Show the version number. .SH DIAGNOSTIC .TP The container is busy The specified container is already running an application. You should stop it before reuse this container or create a new one. .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) .SH AUTHOR Daniel Lezcano <\*(T>