Changes

Jump to: navigation, search

Man/vzctl.8

30,342 bytes added, 18:21, 23 April 2015
Automated import of articles *** existing text overwritten ***
<p style="margin-left:11%; margin-top: 1em">vzctl &minus;
utility to control perform various operations on an OpenVZ container.</p>
== SYNOPSIS ==
<p styletable width="margin-left:11100%; margin-top: 1em">vzctlborder="0" rules="none" frame="void"[<i>flags</i>] <b>create</b> <i>CTID</i cellspacing="0" cellpadding="0">[<b>--ostemplate</b> <i>name</i>] [<b>--config</btr valign="top" align="left"><i>name</i>] [<b>--private</b> <itd width="11%">path</i>] [<b>--root</btd><i>path</i>] [<b>--ipadd</b> <i>addr</i>] [<b>--hostname</b><i>name</i>]</ptd width="7%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<ib>flagsvzctl</i>] <b>set</bp> <i>CTID parameters</itd>[<btd width="2%">--save</btd>]</ptd width="80%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<i>flags</i>] <b>destroycreate</b> | <bi>mountCTID --parameter value</bi> | <b>umount[...]</bp>| <b>start</btd> | <b>stop</btr> | <b>restart</btr valign="top" align="left"> |<btd width="11%">status</btd> | <b>quotaon</b> | <b>quotaoff</b> |<b>quotainit</b> <i>CTID</i></ptd width="7%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<ib>flagsvzctl</i>] <b>exec</b> | <bp>exec2</b> <itd>CTIDcommand</i> [<itd width="2%">arg</itd> ...]</ptd width="80%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<i>flags</i>] <b>enterstart</b> <i>CTID</i> [<b>--execwait</b>][<ib>command--force</ib> ] [<ib>arg--skip-fsck</ib> ...][<b>--skip-remount</b>]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<ib>flagsvzctl</ib>] <b/p>runscript</btd> <itd width="2%">CTID script</itd></ptd width="80%">
<p style="margin>[<i>flags</i>] <b>stop</b> <i>CTID</i> [<b>-left:11%; margin-top: 1em"fast</b>vzctl][<b>--helpskip-umount</b> | ]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%"> <p><b>--versionvzctl</b></p></td><td width="2%"></td><td width="80%">
<p>[<i>flags</i>] <b>restart</b> <i>CTID</i>[<b>--wait</b>] [<b>--force</b>] [<b>--fast</b>][<b>--skip-fsck</b>] [<b>--skip-remount</b>]</p></td></tr><tr valign="top" align= DESCRIPTION "left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%; margin-top: 1em">Utility<b>vzctl</b> runs on the host system (otherwise known as</p></td>Hardware Node, or HN) and performs direct manipulations with<td width="2%"></td>containers (CTs).</ptd width="80%">
<p style="margin-left:11%; margin-top: 1em">Containers can[<i>flags</i>] <b>suspend</b> | <b>resume</b>be referred to by either numeric <i>CTID</i> or by name (see[<b>--dumpfile&nbsp;</b><i>name</bi>]</p></td></tr> option). Note that CT ID &lt;<tr valign="top" align= 100 are"left">reserved for OpenVZ internal purposes.<td width="11%"></ptd><td width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width= OPTIONS =="80%">
<p>[<i>flags</i>] <b>snapshot</b> <i>CTID</i>[<b>--id&nbsp;</b><i>uuid</i>][<b>--name&nbsp;</b><i>name</i>][<b>--description&nbsp;</b><i>desc</i>][<b>--skip-suspend</b>] [<b>--skip-config</b>]</p></td></tr><tr valign="top" align="left"><td width= Flags =="11%"></td><td width="7%">
<p style><b>vzctl</b></p></td><td width="margin-top: 1em2%">These flags come before acommand, and can be used with any command. They affectlogging to console (terminal) only, and do not affect</td>logging to a log file.</ptd width="80%">
<p style="margin>[<i>flags</i>] <b>snapshot-switch</b> <i>CTID</i>[<b>--skip-resume</b> | <b>--must-resume</b>][<b>--skip-left:11%;"config</b>] <b>--quietid</b> <i>uuid</i></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style><b>vzctl</b></p></td><td width="margin-left:172%;">Disables output. Note that</td>scripts run by vzctl are still able to produce someoutput.</ptd width="80%">
<p style="margin>[<i>flags</i>] <b>snapshot-left:11%;"delete</b> <i>CTID</i><b>--verboseid</b> <i>uuid</i></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:17%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of <b>VERBOSEvzctl</b> parameter in theglobal configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]], or to <bp>0</btd>if not set by <btd width="2%">VERBOSE</btd> parameter.</ptd width="80%">
<p>[<i>flags</i>] <b>snapshot-mount</b> <i>CTID</i><b>--id</b> <i>uuid</i> <b>--target</b> <i>dir</i></p></td></tr><tr valign="top" align="left"><td width= Setting container parameters =="11%"></td><td width="7%">
<p style="margin-left:11%;"><b>setvzctl</b> <i>CTIDparameters</i> [<bp>--save</btd>] [<btd width="2%">--force</btd>]</ptd width="80%">
<p style="margin-left:17%;">This command sets variouscontainer parameters. If a [<i>flags</i>] <b>snapshot--saveumount</b> flag is given,parameters are saved in container configuration file[[Man/ctid.conf.5|<bi>ctid.confCTID</bi>(5)]]. Use <b>--forceid</b> to save the<i>uuid</i></p></td></tr>parameters even if the current kernel doesn&rsquo;t support<tr valign="top" align="left">OpenVZ. If the container is currently running, <btd width="11%">vzctl</btd>applies these parameters to the container.</ptd width="7%">
<p style="margin-left:17%; margin-top: 1em">The followingparameters can be used with <b>setvzctl</b> command.</p></td><td width="2%"></td><td width="80%">
<p>[<i>flags</i>] <b>snapshot-list</b> <i>CTID</i>[<b>-H</b>] [<b>-o</b> <i>field</i>[,<i>field</i>...][<b>--id</b> <i>uuid</i>]</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width= Miscellaneous ===="7%">
<p style="margin-left:11%;"><b>--onboot yesvzctl</b> |</p></td><btd width="2%">no</btd></ptd width="80%">
<p style="margin>[<i>flags</i>] <b>set</b> <i>CTID --left:17%;"parameter value</i>Sets whether the container willbe started during system boot[.. The container will not be.] [<b>--save</b>] [<b>--force</b>]auto[<b>--started unless this parameter is set to setmode&nbsp;restart</b>|<b>yesignore</b>.]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%;"><b>--bootordervzctl</b></p></td><itd width="2%">number</itd></ptd width="80%">
<p style="margin-left:17%;">Sets the boot order priorityfor this CT. The higher the [<i>flags</i>] <b>set</b> <i>numberCTID</i> is, the earlier inthe boot process this container starts. By default thisparameter is unset, which is considered to be the lowestpriority, so containers with unset <b>bootorder--reset_ub</b> will</p> </td></tr>start last.<tr valign="top" align="left"><td width="11%"></ptd><td width="7%">
<p style="margin-left:11%;"><b>--rootvzctl</b> <i/p>path</itd><td width="2%"></ptd><td width="80%">
<p style="margin-left:17%;">Sets the path to root directory[<i>flags</i>] <b>destroy</b> | <b>delete</b> |for this container. This is essentially a <b>mount point forcontainer&rsquo;s root directory. Argument can contain</b> | <b>umount</b> | <b>status</b> |literal string <b>$VEIDquotaon</b>, which will be substituted withthe numeric CT ID. Changing this parameter is notrecommended, better edit [[Man| <b>quotaoff</vz.conf.5b> |<b>vz.confquotainit</b>(5)]] globalconfiguration file.<i>CTID</i></p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%;"><b>--userpasswdvzctl</b><i/p>user</itd>:<itd width="2%">password</itd></ptd width="80%">
<p style="margin-left:17%;">Sets password for the givenuser in a container, creating the user if it does notexists. Note that this option is not saved in configurationfile at all (so [<i>flags</i>] <b>--saveconsole</b> flag is useless), it is<i>CTID</i>applied to the container (by modifying its [<i>ttynum</etci>]</passwd andp> </etctd></shadow files).tr><tr valign="top" align="left"><td width="11%"></ptd><td width="7%">
<p style><b>vzctl</b></p></td><td width="margin-left:172%; margin-top: 1em">In case</td>container root filesystem is not mounted, it isautomatically mounted, then all the appropriate file changesare applied, then it is unmounted.</ptd width="80%">
<p style>[<i>flags</i>] <b>convert</b> <i>CTID</i>[<b>--layout&nbsp;ploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]]</p> </td></tr><tr valign="top" align="margin-left:17"><td width="11%; margin-top: 1em">Note that</td>container should be created before using this option.</ptd width="7%">
<p style="margin-left:11%;"><b>--disabled yesvzctl</b> |</p></td><btd width="2%">no</btd></ptd width="80%">
<p style>[<i>flags</i>] <b>compact</b> <i>CTID</i></p></td></tr><tr valign="top" align="margin-left:17%;">Disable container start. Toforce the start of a disabled container, use <btd width="11%">vzctl start--force</btd>.</ptd width="7%">
<p style="margin-left:11%;"><b>--namevzctl</b> <i/p>name</itd><td width="2%"></ptd><td width="80%">
<p style="margin-left:17%;">Add a name for a container. The[<i>nameflags</i> can later be used in subsequent calls to] <b>exec</b> | <b>vzctlexec2</b> in place of <i>CTIDcommand</i> [<i>arg</i>...]</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%;"><b>--descriptionvzctl</b></p></td><itd width="2%">string</itd></ptd width="80%">
<p style>[<i>flags</i>] <b>enter</b> <i>CTID</i>[<b>--exec&nbsp;</b><i>command&nbsp;</i>[<i>arg&nbsp;</i>...]]</p> </td></tr><tr valign="top" align="margin-left:17"><td width="11%;">Add a textual description for a</td>container.</ptd width="7%">
<p style="margin-left:11%;"><b>--setmoderestartvzctl</b>|<b/p>ignore</btd><td width="2%"></ptd><td width="80%">
<p style>[<i>flags</i>] <b>runscript</b> <i>CTID script</i></p></td></tr><tr valign="top" align="margin-left:17"><td width="11%;">Whether to restart a container</td>after applying parameters that require the container to berestarted in order to take effect.</ptd width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width=== Networking ===="80%">
<p style="margin><b>-left:11%;"-help</b>| <b>--ipaddversion</b> <i/p>addr</itd></ptr></table>
<p style="margin-left:17%;">Adds IP address to a givencontainer. Note that this option is incremental, so<i>addr</i> are added to already existing ones.</p>= DESCRIPTION ==
<p style="margin-left:11%;margin-top: 1em">Utility<b>--ipdelvzctl</b> <i>addr</i> |runs on the host system (otherwise known asHardware Node, or HN) and performs direct manipulations with<b>all</b>containers (CTs).</p>
<p style="margin-left:1711%;margin-top: 1em">Removes IP address Containers canbe referred to by either numeric <i>addrCTID</i>or by name (see<b>--name</b> option). Note that CT ID &lt;= 100 arefrom a containerreserved for OpenVZ internal purposes. If you want to remove all the addresses,A numeric ID shoulduse not be more than <b>--ipdel all2147483644</b>.</p>
<p style="margin-left:11%;"><b>--hostname</b><i>name</i></p>= OPTIONS ==
<p style="margin-left:17%;">Sets container hostname.<b>vzctl</b> writes it to the appropriate file inside acontainer (distribution-dependent).</p>== Flags ===
<p style="margin-lefttop:11%;1em"><b>--nameserver</b>These flags come before acommand, and can be used with any command. They affectlogging to console (terminal) only, and do not affect<i>addr</i>logging to a log file.</p>
<p style="margin-left:1711%;">Sets DNS server IP address fora container. If you want to set several nameservers, youshould do it at once, so use <b>--nameserverquiet</b> optionmultiple times in one call to <b>vzctl</b>, as all the nameserver values set in previous calls to <b>vzctl</b> areoverwritten.</p>
<p style="margin-left:17%;">Disables output. Note thatscripts run by vzctl are still able to produce someoutput.</p> <p style="margin-left:11%;"><b>--searchdomainverbose</b><i>name</i></p>
<p style="margin-left:17%;">Sets DNS search domains for aIncrements logging level upcontainerfrom the default. If you want Can be used multiple times. Default valueis set to set several search domains, youthe value of <b>VERBOSE</b> parameter in theshould do it at once, so use global configuration file [[Man/vz.conf.5|<b>--searchdomainvz.conf</b> optionmultiple times in one call (5)]], or to <b>vzctl0</b>, as all thesearch domain values if not set in previous calls to by <b>vzctlVERBOSE</b>are overwrittenparameter.</p>
<p style="margin-left:11%;"><b>--netif_add</b><i>ifname[</i>,<i>mac</i>,<i>host_ifname</i>,<i>host_mac</i>,<i>bridge]</i></p>== Setting container parameters ===
<p styletable width="margin-left:17100%;" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0">Adds a virtual Ethernet device(veth) to a given container. Here <itr valign="top" align="left">ifname</i> is theEthernet device name in the container, <itd width="11%">mac</itd> is its MACaddress, <itd width="4%">host_ifname </ip style="margin-top: 1em"> is the Ethernet device name onthe host, and <ib>host_macset</ib> is its MAC address. MACaddresses should be in the format like XX:XX:XX:XX:XX:XX.<i/p>bridge</itd> is an optional parameter which can be used incustom network start scripts to automatically add theinterface to a bridge. All parameters except <itd width="2%">ifname</itd>are optional and are automatically generated if notspecified.</ptd width="83%">
<p style="margin-lefttop: 1em"><i>CTID</i>[<b>--onboot&nbsp;yes</b>|<b>no</b>][<b>--bootorder&nbsp;</b><i>number</i>][<b>--root&nbsp;</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>][<b>--mount_opts&nbsp;</b><i>options</i>][<b>--userpasswd&nbsp;</b><i>user</i>:11%<i>pass</i>][<b>--disabled&nbsp;yes</b>|<b>no</b>][<b>--name&nbsp;</b><i>name</i>][<b>--description&nbsp;</b><i>string</i>][<b>--ostemplate&nbsp;</b><i>string</i>][<b>--stop-timeout&nbsp;</b><i>seconds</i>][<b>--ipadd&nbsp;</b><i>addr</i>][<b>--ipdel&nbsp;</b><i>addr</i>|<b>all</b>][<b>--hostname&nbsp;</b><i>name</i>][<b>--nameserver&nbsp;</b><i>addr</i>][<b>--searchdomain&nbsp;</b><i>name</i>][<b>--netif_add&nbsp;"</b><i>dev</i>[,<i>params</i>...]][<b>--netif_del&nbsp;</b><i>dev</i>|<b>all</b>][<b>--ifname</b> <i>dev</i>[<b>--mac&nbsp;</b><i>hwaddr</i>][<b>--host_ifname&nbsp;</b><i>dev</i>][<b>--host_mac&nbsp;</b><i>hwaddr</i>][<b>--bridge&nbsp;</b><i>dev_namename</i>][<b>--mac_filter&nbsp;on</b>|<b>off</b>]][<b>--numproc&nbsp;</b><i>items</i>][<b>--numtcpsock&nbsp;</b><i>items</i>][<b>--numothersock&nbsp;</b><i>items</i>][<b>--vmguarpages&nbsp;</b><i>pages</i>][<b>--kmemsize&nbsp;</b><i>bytes</i>][<b>--tcpsndbuf&nbsp;</b><i>bytes</i>][<b>--tcprcvbuf&nbsp;</b><i>bytes</i>][<b>--othersockbuf&nbsp;</b><i>bytes</i>][<b>--dgramrcvbuf&nbsp;</b><i>bytes</i>][<b>--oomguarpages&nbsp;</b><i>pages</i>][<b>--lockedpages&nbsp;</b><i>pages</i>][<b>--privvmpages&nbsp;</b><i>pages</i>][<b>--shmpages&nbsp;</b><i>pages</i>][<b>--numfile&nbsp;</b><i>items</i>][<b>--numflock&nbsp;</b><i>items</i>][<b>--numpty&nbsp;</b><i>items</i>][<b>--numsiginfo&nbsp;</b><i>items</i>][<b>--dcachesize&nbsp;</b><i>bytes</i>][<b>--numiptent&nbsp;</b><i>num</i>][<b>--physpages&nbsp;</b><i>pages</i>][<b>--swappages&nbsp;</b><i>pages</i>][<b>--ram&nbsp;</b><i>bytes</i>][<b>--swap&nbsp;</b><i>bytes</i>][<b>--vm_overcommit&nbsp;</b><i>float</i>][<b>--cpuunits&nbsp;</b><i>num</i>][<b>--cpulimit&nbsp;</b><i>num</i>][<b>--cpus&nbsp;</b><i>num</i>][<b>--cpumask&nbsp;</b><i>cpus</i>|<b>auto</b> | <b>all</b>][<b>--nodemask&nbsp;</b><i>nodes</i>|<b>all</b>][<b>--meminfo&nbsp;none</b>|<i>mode</i>:<i>value</i>][<b>--iptables&nbsp;</b><i>name</i>[<b>,</b>...]][<b>--netfilter&nbsp;disabled</b>|<b>stateless</b>|<b>stateful</b>|<b>full</b>][<b>--netdev_add&nbsp;</b><i>ifname</i>][<b>--netdev_del&nbsp;</b><i>ifname</i>][<b>--diskquota&nbsp;yes</b>|<b>no</b>][<b>--diskspace&nbsp;</b><i>num</i>][<b>--diskinodes&nbsp;</b><i>num</i>][<b>--quotatime&nbsp;</b><i>seconds</i>][<b>--quotaugidlimit&nbsp;</b><i>num</i>][<b>--capability&nbsp;</b><i>capname</i>:<b>on</b>|<b>off</b>[<b>,</b>...]][<b>--devnodes&nbsp;</b><i>param</i>][<b>--devices&nbsp;</b><i>param</i>][<b>--pci_add&nbsp;</b><i>dev</i>][<b>--pci_del&nbsp;</b><i>dev</i>][<b>--features&nbsp;</b><i>name</i>:<b>on</b>|<b>off</b>[<b>,</b>...]][<b>--applyconfig&nbsp;</b><i>name</i>][<b>--applyconfig_map&nbsp;</b><i>group</i>][<b>--ioprio&nbsp;</b><i>num</i>][<b>--iolimit&nbsp;</b><i>mbps</i>][<b>--iopslimit&nbsp;</b><i>iops</i>] [<b>--save</b>][<b>--force</b>] [<b>--reset_ub</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"></td><td width="2%"></td><td width="83%">
<p style="margin-left:17%;">Removes virtual Ethernet devicefrom a This command sets various containerparameters. If you want thecontainer is currently running, <b>vzctl</b> applies theseparameters to remove all devices, usethe container. The following options can beused with <b>allset</b>command.</p></td></tr></table>
==== veth interface configuration Flags ====
<p style="margin-left:11%; margin-top: 1em">The followingoptions can be used to reconfigure the already-createdvirtual Ethernet interface. To select the interface toconfigure, use <b>--ifname</b> <i>namesave</i> option. <b><br>--mac</b> <i>XX:XX:XX:XX:XX:XX</i></p>
<p style="margin-left:2217%;">MAC address of interface insideIf this flag is given,a parameters are saved in containerconfiguration file[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]].</p>
<p style="margin-left:11%;"><b>--host_ifnameforce</b><i>name</i></p>
<p style="margin-left:2217%;">interface name for virtualIf this flag is given togetherinterface in with <b>--save</b>, parameters are saved even if the host systemcurrentkernel doesn&rsquo;t support OpenVZ. Note this flag does notmake sense without <b>--save</b>, so <b>--save</b> isrequired.</p>
<p style="margin-left:11%;"><b>--host_macreset_ub</b><i>XX:XX:XX:XX:XX:XX</i></p>
<p style="margin-left:2217%;">MAC address of interface If this flag is given,<b>vzctl</b> applies all User Beancounter parameters fromthe configuration file to a running container. This ishelpful in thecase configuration file is modified manually.Please note this flag is exclusive, i.e. it can not behost systemcombined with any other options or flags.</p>
<p style="margin-left:11%;"><b>--bridgesetmode restart</b> |<ib>nameignore</ib></p>
<p style="margin-left:2217%;">Bridge nameA few parameters can only beapplied by restarting the container. By default,<b>vzctl</b> prints a warning if such parameters aresupplied and a container is running. Custom networkUse <b>--setmodestart scripts can use this value restart</b> together with <b>--save</b> flag to automatically add therestart ainterface container in such a case, or <b>--setmode ignore</b> to a bridgesuppress the warning.</p>
<p style="margin-left:11%;"><b>--mac_filter on</b> |<b>off</b></p>=== Miscellaneous ====
<p style="margin-left:2211%;">Enables<b>--onboot yes</disables MAC addressfiltering for the Container veth device and the possibilityof configuring the MAC address of this device from insideb> |the Container. If the filtering is turned on: <brb>&bull; the veth device accepts only those packets that havea MAC address in their headers corresponding to that of thisdevice (excluding all broadcast and multicast packets); no<br/b>&bull; it is impossible to modify the veth MAC address frominside the Container.</p>
<p style="margin-left:2217%; margin-top: 1em">By defaultSets whether the container willbe started during system boot. The container will be startedon boot by <b>vz</b> initscript if either this parameter isset to <b>yes</b>,or the container was running just beforelast reboot, and this functionality parameter is enabled for all veth devices existingnot set to <b>no</b>.Default value is unset, meaning the container will beinside started if it was running before the Containerlast reboot.</p>
<p style==== Resource limits ===="margin-left:11%;"><b>--bootorder</b><i>number</i></p>
<p style="margin-left:1117%; margin-top: 1em">The followingSets the boot order priorityoptions sets barrier and limit for various userbeancountersthis CT. Each option requires one or two arguments. Incase of one argument, The higher the <bi>vzctlnumber</bi> sets barrier and limit tois, the earlier inthe same valueboot process this container starts. In case of two colon-separated arguments,By default thisthe first parameter is a barrierunset, and which is considered to be the second is a limit. Eachlowestargument is either a numberpriority, a number so containers with a suffix, or aspecial value unset <b>unlimitedbootorder</b>willstart last.</p>
<p style="margin-left:11%; margin-top: 1em">Arguments arein items, pages or bytes. Note that page size isarchitecture<b>--specific, it is 4096 bytes on x86 and x86_64platforms.root</b> <i>path</i></p>
<p style="margin-left:1117%; margin-top: 1em">You can alsoSets the path to root directoryspecify different suffixes for <b>set</b> parameters (exceptfor the parameters which names start with <b>numVE_ROOT</b>)for this container. ForThis is essentially aexample, <b>vzctl set</b> <i>CTID</i> <b>--privvmpagesmount point for container&rsquo;s root directory. Argument5M:6M</b> should set can contain literal string <b>privvmpages$VEID</b>&rsquo; barrier to 5, which will bemegabytes and its limit to 6 megabytessubstituted with the numeric CT ID.</p>
<p style="margin-left:11%; margin"><b>-top: 1em"-private</b>Availablesuffixes are:<i>path</i></p>
<table widthp style="100margin-left:17%;" border="0" rules="none" frame="void">Sets the path to private cellspacing="0" cellpadding="0"directory (<b>VE_PRIVATE<tr valign="top" align="left"/b>) for this container. This is adirectory in which all the container&rsquo;s files arestored. Argument can contain literal string <td width="11%"b>$VEID</tdb>,which will be substituted with the numeric CT ID.<td width="6%"/p>
<pstyle="margin-left:11%;"><b>T--mount_opts</b>, <bi>toption</bi>[</pb>,</tdb><td width="5%"i>option</tdi>...]<td width="44%"/p>
<p>terabytes;</p></td><td widthstyle="34margin-left:17%;">Sets additional mount optionsfor container file system. Only applicable for </tdb>ploop</tr><tr valign="top" align="left"b><td width="11%">layout, ignored otherwise.</td><td width="6%"p>
<pstyle="margin-left:11%;"><b>G--userpasswd</b>, <bi>guser</bi>:</pi>password</td><td width="5%"i></td><td width="44%"p>
<p>gigabytes;</p></td><td widthstyle="34margin-left:17%;">Sets password for the givenuser in a container, creating the user if it does notexists. Note that this option is not saved in configurationfile at all (so </tdb>--save</trb>flag is useless), it isapplied directly to the container, by running<tr valign="top" align="left">distribution-specific programs inside the container. It isnot recommended to combine this option with any other<td width="11%">options.</td><td width="6%"p>
<p><b>M</b>, <b>m</b></p></td><td widthstyle="5margin-left:17%; margin-top: 1em">In casecontainer was not running, it is automatically started thenall the appropriate changes are applied, then it isstopped.</td><td width="44%"p>
<p>megabytes;</p></td><td widthstyle="34margin-left:17%"></td></tr><tr valign="; margin-top" align="left: 1em">Note that<td width="11%">container should be created before using this option.</td><td width="6%"p>
<pstyle="margin-left:11%;"><b>K--disabled yes</b>, |<b>kno</b></p></td><td width="5%"></td><td width="44%">
<p>kilobytes;</p></td><td widthstyle="34margin-left:17%;">Disable container start. Toforce the start of a disabled container, use </tdb>vzctl start--force</tr><tr valign="top" align="left"><td width="11%"b>.</td><td width="6%"p>
<pstyle="margin-left:11%;"><b>P--name</b>, <bi>pname</bi></p></td><td width="5%"></td><td width="44%">
<pstyle="margin-left:17%;">memory pages (arch-specific)Add a name for a container.The</pi>name</tdi>can later be used in subsequent calls to<td width="34%"b>vzctl</tdb> in place of <i>CTID</tri>. Note this option cannot be used without <b>--save</b>.</tablep>
<p style="margin-left:11%; margin-top: 1em">You can alsospecify the literal word <b>unlimited</b> in place of anumber. In that case the corresponding value will be set to<b>LONG_MAX</b>, i. e. the maximum possible value. <b><br>--numprocdescription</b> <i>items</i>[:<i>itemsstring</i>]</p>
<p style="margin-left:2217%;">Maximum number of processes andAdd a textual description for akernel-level threads. Setting the barrier and the limit todifferent values does not make practical sensecontainer.</p>
<p style="margin-left:11%;"><b>--numtcpsockostemplate</b><i>itemsstring</i>[:<i>items</i>]</p>
<p style="margin-left:2217%;">Maximum number Sets a new value of TCP sockets<b>OSTEMPLATE</b> parameter in container configuration file[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]].Requires <b>--save</b> flag. UsefulThis parameter limits the number after a change/upgrade of TCP connections and,a distribution running insidethuscontainer, as vzctl uses the number value of clients the server application canhandle in parallel. Setting the barrier and the limit OSTEMPLATE torundifferent values does not make practical sensedistribution-specific scripts.</p>
<p style="margin-left:11%;"><b>--numothersockstop-timeout</b><i>itemsseconds</i>[:<i>items</i>]</p>
<p style="margin-left:2217%;">Maximum number of non-TCPSets a time to wait forcontainer to stop on <b>vzctl stop</b> before forciblysockets (local socketskilling it, UDP and other types of sockets)in seconds.Note this option can not be usedSetting the barrier and the limit to different values doesnot make practical sensewithout <b>--save</b> flag.</p>
<p style="margin-left:1117%;margin-top: 1em">Special valueof <b>--vmguarpages0</b><i>pages</i>[:<i>pages</i>]means to use compiled-in default.</p>
<p style="margin-left:22%;">Memory allocation guarantee.This parameter controls how much memory is available to acontainer. The barrier is the amount of memory thatcontainer&rsquo;s applications are guaranteed to be able toallocate. The meaning of the limit is currently unspecified;it should be set to <b>unlimited</b>.</p>=== Networking ====
<p style="margin-left:11%;"><b>--kmemsizeipadd</b><i>bytesaddr</i>[:<i>bytes</i>]</p>
<p style="margin-left:2217%;">Maximum amount of kernel memoryused. This parameter is related to Adds an IP address <bi>--numprocaddr</bi>. Eachprocess consumes certain amount of kernel memory - 16 KB atleast, 30-50 KB typically. Very large processes may consumeto a bit moregiven container. It is important to Address can optionally have a certain safety gapnetmaskbetween specified in the barrier and the limit of this parameter: equalbarrier and limit may lead to the situation where the kernelwill need to kill container&rsquo;s applications to keep theCIDR notation (e.g. <b>kmemsize10.1.2.3/25</b> usage under the limit).Note that this option is incremental, so <i>addr</i> areadded to already existing ones.</p>
<p style="margin-left:11%;"><b>--tcpsndbufipdel</b><i>bytesaddr</i>[:|<ib>bytesall</ib>]</p>
<p style="margin-left:2217%;">Maximum size of TCP sendRemoves IP address <i>addr</i>buffersfrom a container. Barrier should be not less than 64 KBIf you want to remove all the addresses, anddifference between barrier and limit should be equal to ormore than value of use <b>numtcpsock--ipdel all</b> multiplied by 2.5KB.</p>
<p style="margin-left:11%;"><b>--tcprcvbufhostname</b><i>bytesname</i>[</p> <p style="margin-left:17%;">Sets container hostname.<ib>bytesvzctl</ib>]writes it to the appropriate file inside acontainer (distribution-dependent).</p>
<p style="margin-left:2211%;">Maximum size of TCP receivebuffers. Barrier should be not less than 64 KB, anddifference between barrier and limit should be equal to ormore than value of <b>numtcpsock--nameserver</b> multiplied by 2.5KB.<i>addr</i></p>
<p style="margin-left:1117%;">Sets DNS server IP address fora container. If you want to set several nameservers, youshould do it at once, so use <b>--othersockbufnameserver</b>optionmultiple times in one call to <ib>bytesvzctl</ib>[:, as all the nameserver values set in previous calls to <ib>bytesvzctl</ib>]areoverwritten.</p>
<p style="margin-left:2217%;margin-top: 1em">Maximum size A special valueof other <b>inherit</b> can be used to auto-propagate nameservervalue(non-TCPs)socket send buffers. If containerfrom the host system&rsquo;s processes needs tosend very large datagrams, the barrier should be setaccordingly<b>/etc/resolv. Increased limit is necessary for highperformance of communications through local (UNIX-domain)socketsconf</b> file.</p>
<p style="margin-left:11%;"><b>--dgramrcvbufsearchdomain</b><i>bytesname</i>[:<i>bytes</i>]</p>
<p style="margin-left:2217%;">Maximum size of other (non-TCP)Sets DNS search domains for asocket receive bufferscontainer. If container&rsquo;s processes needsyou want to set several search domains, youshould do it at once, so use <b>--searchdomain</b> optionmultiple times in one call to receive very large datagrams<b>vzctl</b>, as all the barrier should be search domain values setin previous calls to <b>vzctl</b>accordingly. The difference between the barrier and thelimit is not neededare overwritten.</p>
<p style="margin-left:1117%;margin-top: 1em">A special valueof <b>--oomguarpagesinherit</b>can be used to auto-propagate searchdomain value(s) from the host system&rsquo;s<ib>pages</i>[:<i>pagesetc/resolv.conf</ib>]file.</p>
<p style="margin-left:2211%;">Guarantees against OOM kill.Under this beancounter the kernel accounts the total amountof memory and swap space used by the container&rsquo;sprocesses. The barrier of this parameter is theout<b>-of-memory guarantee. If the netif_add</b>oomguarpages<i>ifname[</i>,<i>mac</i>,<i>host_ifname</i>,<i>host_mac</bi> usage isbelow the barrier, processes of this container areguaranteed not to be killed in out-of-memory situations. Themeaning of limit is currently unspecified; it should be setto <bi>unlimitedbridge]</bi>.</p>
<p style="margin-left:17%;">Adds a virtual Ethernet device(veth) to a given container. Here <i>ifname</i> is theEthernet device name in the container, <i>mac</i> is its MACaddress, <i>host_ifname</i> is the Ethernet device name onthe host, and <i>host_mac</i> is its MAC address. MACaddresses should be in the format like XX:XX:XX:XX:XX:XX.<i>bridge</i> is an optional parameter which can be used incustom network start scripts to automatically add theinterface to a bridge. All parameters except <i>ifname</i>are optional and are automatically generated if notspecified.</p> <p style="margin-left:11%;"><b>--lockedpagesnetif_del</b><i>pagesdev_name</i>[:| <ib>pagesall</ib>]</p>
<p style="margin-left:2217%;">Maximum number of pagesRemoves virtual Ethernet devicefrom a container. If you want to remove all devices, useacquired by <b>mlockall</b>(2).</p>
<p style="margin-left:11%;"><b>--privvmpages</b><i>pages</i>[:<i>pages</i>]</p>=== veth interface configuration ====
<p style="margin-left:2211%;margin-top: 1em">Allows controlling The followingoptions can be used to reconfigure the amountalready-createdof memory allocated by virtual Ethernet interface. To select the applications. For shared (mappedinterface toas configure, use <b>MAP_SHARED--ifname</b>) pages, each container really using amemory page is charged for the fraction of the page(depending on the number of others using it)<i>name</i> option. For&quot;potentially private&quot; pages (mapped as<b><br>--mac</b>MAP_PRIVATE<i>XX:XX:XX:XX:XX:XX</bi>), container is charged either for afraction of the size or for the full size if the allocatedaddress space. In the latter case, the physical pagesassociated with the allocated address space may be inmemory, in swap or not physically allocated yet.</p>
<p style="margin-left:22%; margin-top: 1em">The barrier andthe limit of this parameter control the upper boundary ofthe total size MAC address of allocated memory. Note that this upperinterface insideboundary does not guarantee that a container will be able toallocate that much memory. The primary mechanism to controlmemory allocation is the <b>--vmguarpages</b> guarantee.</p>
<p style="margin-left:11%;"><b>--shmpageshost_ifname</b><i>pagesname</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">Maximum IPC SHM segment size.interface name for virtualSetting interface in the barrier and the limit to different values doesnot make practical sensehost system.</p>
<p style="margin-left:11%;"><b>--numfilehost_mac</b><i>items</i>[XX:XX:XX:XX:XX:<i>itemsXX</i>]</p>
<p style="margin-left:22%;">Maximum number MAC address of open files.In most cases the barrier and the limit should be set to thesame value. Setting the barrier to <b>0</b> effectivelydisables pre-charging optimization for this beancounter interface inthe kernel, which leads to the held value being precise butcould slightly degrade file open performancehost system.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>--numflock</b>If you want anindependent communication with the Container through thebridge, you should specify a multicast MAC address here<i>items</i>[(FE:FF:FF:FF:FF:<i>items</i>]FF).</p>
<p style="margin-left:2211%;">Maximum number of file locks.Safety gap should be between barrier and limit.<b>--bridge</b> <i>name</i></p>
<p style="margin-left:1122%;"><b>--numpty</b>Bridge name. Custom networkstart scripts can use this value to automatically add the<i>items</i>[:<i>items</i>]interface to a bridge.</p>
<p style="margin-left:2211%;">Number of pseudo<b>--terminalsmac_filter on</b> |(PTY). Note that in OpenVZ each container can have not morethan 255 PTYs. Setting the barrier and the limit todifferent values does not make practical sense.<b>off</b></p>
<p style="margin-left:1122%;"><b>--numsiginfo<Enables/b>disables MAC addressfiltering for the Container veth device and the possibilityof configuring the MAC address of this device from inside<i>items</i>[the Container. If the filtering is turned on:<ibr>items&bull; the veth device accepts only those packets that havea MAC address in their headers corresponding to that of thisdevice (excluding all broadcast and multicast packets); </ibr>]&bull; it is impossible to modify the veth MAC address frominside the Container.</p>
<p style="margin-left:22%;margin-top: 1em">Number of siginfo structures.By default,Setting this functionality is enabled for all veth devices existinginside the barrier and the limit to different values doesnot make practical senseContainer.</p>
<p style="margin-left:11%;"><b>--dcachesize</b><i>bytes</i>[:<i>bytes</i>]</p>=== VSwap limits ====
<p style="margin-left:2211%;margin-top: 1em">Maximum size offilesystem-related caches, such as directory entry and inodecaches. Exists as a separate parameter to impose a limitThe followingcausing file operations to sense options sets memory shortage and returnswap limits for VSwap-enabledan errno to applications, protecting from memory shortagesduring critical operations that should not fail. Safety gapshould be between barrier and limitkernels (kernel version 042stab042 or greater).</p>
<p style="margin-left:11%;margin-top: 1em"><b>--numiptent</b>Argument is inbytes, unless otherwise specified by an optional suffix.<i>num</i>[Available suffixes are:<i>num</i>]</p>
<p style="margin-left:2211%;margin-top: 1em">Number of iptables &bull;<b>T</b>, <b>t</b> - terabytes; <br>&bull; <b>G</b>, <b>g</b> - gigabytes; <br>&bull; <b>M</b>, <b>m</b> - megabytes; <br>&bull; <b>K</b>, <b>k</b> - kilobytes; <br>&bull; <b>P</b>, <b>p</b> - memory pages (netfilterarch-specific,usually 4KB); <br>entries&bull; <b>B</b>, <b>b</b> - bytes (this is the default). Setting the barrier and the limit to differentvalues does not make practical sense.<b><br>--ram</b> <i>bytes</i></p>
<p style="margin-left:1122%;">Sets physical memory (RAM)available to a container. Actually, the option is a shortcutfor setting <b>--physpages</b>limit (the barrier is set to<i>pages</i>[:<i>pages</i>]0).</p>
<p style="margin-left:2211%;">On VSwap<b>--enabled kernels, thislimits the amount of physical memory (RAM) available to acontainer. The barrier should be set to swap</b>0<i>bytes</bi>, and thelimit to a total size of RAM that can be used used by acontainer.</p>
<p style="margin-left:22%; margin-top: 1em">For olderSet swap space available to akernelscontainer. Actually, this the option is an accounting-only parameter, showing theusage of RAM by this container. Barrier should be set toa shortcut for setting<b>0--swappages</b>, and limit should be (the barrier is set to <b>unlimited</b>0).</p>
<p style="margin-left:11%;"><b>--swappagesvm_overcommit</b><i>pagesfloat</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">The limit, if Set VM overcommitment value to<i>float</i>. If set, it is used tocalculateshow a total amount of swap space available inside thecontainer. The barrier of this <b>privmmpages</b> parameter in case it is currentlynot setignoredexplicitly (see below). The default Default value is <b>unlimited0</b>, meaningtotal swap will be reported as 0unlimited privvmpages.</p>
<p style="margin-left:2211%; margin-top: 1em">Note that inorder for the value to be shown as total swap space,<b>--meminfovzctl</b> parameter should checks if running kernel is VSwap capable, and refuses touse these parameters otherwise. This behavior can be set to value other thanoverriden by using <b>none--force</b>flag beforeparameters.</p>
<p style==== CPU fair scheduler parameters ===="margin-left:11%; margin-top: 1em">In VSwap mode,all beancounters other than RAM and swap become optional.Note though that if some optional beancounters are not set,they are calculated and set by vzctl implicitly, using thefollowing formulae:</p>
<p style="margin-left:11%; margin-top: 1em">Theseparameters control CPU usage by container. <b><br>&bull;--cpuunitslockedpages.barrier = oomguarpages.barrier = ram</b> <i>num</i></p>
<p style="margin-left:2211%;margin-top: 1em">CPU weight for a container.Argument is positive non-zero number, passed to and used inthe kernel fair scheduler. The larger the number is, the<b>&bull;more CPU time this container getslockedpages. Maximum value is 500000,minimal is 8limit = oomguarpages. Number is relative to weights of all the otherrunning containers. If <b>cpuunitslimit = unlimited</b> are not specified,default value of 1000 is used.</p>
<p style="margin-left:2211%; margin-top: 1em">You can set CPUweight for CT0 (host system itself) as well (use <b>vzctl&bull;set 0 --cpuunits</b> <i>num</i>)vmguarpages. Usually, OpenVZ initscript(<b>/etc/initbarrier = vmguarpages.d/vzlimit = ram + swap</b>) takes care of setting this.</p>
<p style="margin-left:11%;margin-top: 1em"><b>--cpulimit</b>&bull;privvmpages.barrier = privvmpages.limit = (ram + swap) *<i>num</i>[<b>%vm_overcommit</b>]</p>
<p style="margin-left:2211%;margin-top: 1em">Limit of CPU usage for thecontainer, in per cent. Note (if the computer has 2 CPUs, ithas total of 200% CPU time. Default CPU limit <b>vm_overcommit</b> is <b>0</b>or not set,(no CPU limit<b>privvmpages</b> is set to &quot;unlimited&quot;).</p>
<p style="margin-left:11%;margin-top: 1em"><b>--cpus</b> <i>num</i>Here is anexample of setting container 777 to have 512 megabytes ofRAM and 1 gigabyte of swap:</p>
<p pre style="margin-left:2211%;">sets number of CPUs availablein the container. vzctl set 777 --ram 512M --swap 1G --save</ppre>
<p style="margin-left:11%;"><b>--cpumask</b> <i>cpus</i> |<b>all</b></p>=== User Beancounter limits ====
<p style="margin-left:2211%;margin-top: 1em">The followingoptions sets list of allowed CPUs barrier and limit forvarious userthe container. Input format is a comma-separated list ofdecimal numbers and ranges. Consecutively set bits are shownas two hyphen-separated decimal numbers, the smallest andlargest bit numbers set in the range. For example, if youwant the container to execute on CPUs 0, 1, 2, 7, you shouldpass <b>0-2,7</b>. Default value is <b>all</b> (thecontainer can execute on any CPU)beancounters.</p>
<p style==== Memory output parameters ===="margin-left:11%; margin-top: 1em">Note that forVSwap-enabled kernels (version 042stab042 or greater) theselimits are optional, you must only set <b>--ram</b> and<b>--swap</b> (see above). For older kernels, these limitsare obligatory.</p>
<p style="margin-left:11%; margin-top: 1em">This parameterEach optioncontrol output requires one or two arguments. In case of /proc/meminfo inside a container. one argument,<b>vzctl<br/b>sets barrier and limit to the same value. Incase of two colon--meminfo noneseparated arguments, the first is abarrier, and the second is a limit. Each argument is eithera number, a number with a suffix, or a special value<b>unlimited</b>.</p>
<p style="margin-left:2211%;margin-top: 1em">No /proc/meminfo virtualizationArguments are(the same as in items, pages or bytes. Note that page size isarchitecture-specific, it is 4096 bytes on host system)x86 and x86_64platforms.</p>
<p style="margin-left:11%;margin-top: 1em">You can alsospecify different suffixes for User Beancounter parameters(except for those which names start with <b>--meminfonum</b>). Forexample, <b>vzctl set</b> <i>modeCTID</i><b>--privvmpages5M:6M</b> should set <ib>valueprivvmpages</ib>&rsquo; barrier to 5megabytes and its limit to 6 megabytes.</p>
<p style="margin-left:2211%;margin-top: 1em">Configure total memory outputin a container. Reported free memory is evaluatedaccordingly to the mode being set. Reported swap isevaluated according to the settings of <b>--swappages</b>Availableparameter.suffixes are:</p>
<p style="margin-left:2211%; margin-top: 1em">You can use the&bull;<b>T</b>, <b>t</b> - terabytes; <br>following modes for &bull; <ib>modeG</ib>: , <b>g</b> - gigabytes; <br>&bull; <b>pagesM</b>:, <ib>valuem</ib> - sets total memory inmegabytes; <br>pages&bull; <b>K</b>, <b>k</b> - kilobytes; <br>&bull; <b>privvmpagesP</b>:, <ib>valuep</ib> - sets total memorypages (arch-specific,usually 4KB); <br>as &bull; <b>privvmpagesB</b> * , <ib>valueb</ib>- bytes.</p>
<p style="margin-left:2211%; margin-top: 1em">Default isYou can alsospecify the literal word <b>privvmpages:1unlimited</b> in place of anumber. In that case the corresponding value will be set to<b>LONG_MAX</b>, i.e. the maximum possible value. <b><br>--numproc</b> <i>items</i>[:<i>items</i>]</p>
<p style="margin-left:22%; margin-top: 1em">Note that ifMaximum number of processes and<b>--physpages</b> is set on a VSwap-enabled kernel, ittakes a precedence over <b>--meminfo</b>, i.elevel threads. settingSetting the barrier and the limit to<b>--meminfo</b> different values does not take any effectmake practical sense.</p>
<p style==== iptables control parameters ===="margin-left:11%;"><b>--numtcpsock</b><i>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%;"><b>--iptables</b>Maximum number of TCP sockets.This parameter limits the number of TCP connections and,thus, the number of clients the server application canhandle in parallel. Setting the barrier and the limit to<i>name</i>different values does not make practical sense.</p>
<p style="margin-left:2211%;">Allow to use the functionality<b>--numothersock</b>of <i>nameitems</i> iptables module inside the container. Tospecify multiple [:<i>nameitems</i>s, repeat --iptables for each,or use space-separated list as an argument (enclosed insingle or double quotes to protect spaces).]</p>
<p style="margin-left:22%; margin-top: 1em">The defaultMaximum number of non-TCPlist sockets (local sockets, UDP and other types of enabled iptables modules is specified by sockets).Setting the barrier and thelimit to different values does<b>IPTABLES</b> variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]]not make practical sense.</p>
<p style="margin-left:2211%; margin-top: 1em">You can use thefollowing values for <i>name</i>: <b>iptable_filter--vmguarpages</b>,<bi>iptable_manglepages</bi>, [:<bi>ipt_limitpages</b>,<b>ipt_multiport</b>, <b>ipt_tos</b>, <b>ipt_TOS</b>,<b>ipt_REJECT</b>, <b>ipt_TCPMSS</b>, <b>ipt_tcpmss</b>,<b>ipt_ttl</b>, <b>ipt_LOG</b>, <b>ipt_length</b>,<b>ip_conntrack</b>, <b>ip_conntrack_ftp</b>,<b>ip_conntrack_irc</b>, <b>ipt_conntrack</b>,<b>ipt_state</b>, <b>ipt_helper</b>, <b>iptable_nat</b>,<b>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>ipt_REDIRECT</b>,<b>xt_mac</b>, <b>ipt_recent</b>, <b>ipt_owner</bi>.]</p>
==== Network devices control parameters ==== <p style="margin-left:1122%;">Memory allocation guarantee.This parameter controls how much memory is available to acontainer. The barrier is the amount of memory thatcontainer&rsquo;s applications are guaranteed to be able toallocate. The meaning of the limit is currently unspecified;it should be set to <b>--netdev_addunlimited</b><i>name</i>.</p>
<p style="margin-left:2211%;">move network device from the<b>--kmemsize</b>host system to a specified container<i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:1122%;">Maximum amount of kernel memoryused. This parameter is related to <b>--netdev_delnumproc</b>. Eachprocess consumes certain amount of kernel memory - 16 KB atleast, 30-50 KB typically. Very large processes may consumea bit more. It is important to have a certain safety gapbetween the barrier and the limit of this parameter: equalbarrier and limit may lead to the situation where the kernelwill need to kill container&rsquo;s applications to keep the<ib>namekmemsize</ib>usage under the limit.</p>
<p style="margin-left:2211%;">delete network device from a<b>--tcpsndbuf</b>specified container<i>bytes</i>[:<i>bytes</i>]</p>
<p style==== Disk quota parameters ===="margin-left:22%;">Maximum size of TCP sendbuffers. Barrier should be not less than 64 KB, anddifference between barrier and limit should be equal to ormore than value of <b>numtcpsock</b> multiplied by 2.5KB.</p>
<p style="margin-left:11%;"><b>--diskquota yestcprcvbuf</b> |<bi>bytes</i>[:<i>nobytes</bi>]</p>
<p style="margin-left:22%;">allows Maximum size of TCP receivebuffers. Barrier should be not less than 64 KB, anddifference between barrier and limit should be equal to enable or disabledisk quota for a container. By default, a global more than value(of <b>DISK_QUOTAnumtcpsock</b>) from [[Man/vz.confmultiplied by 2.5|<b>vz.conf</b>(5)]] is usedKB.</p>
<p style="margin-left:11%;"><b>--diskspaceothersockbuf</b><i>numbytes</i>[:<i>numbytes</i>]</p>
<p style="margin-left:22%;">sets soft and hard disk quotalimits, in blocks. First parameter is soft limit, second isMaximum size of other (non-TCP)hard limitsocket send buffers. One block is currently equal If container&rsquo;s processes needs to 1Kb. Suffixes<b>G</b>send very large datagrams, <b>M</b>, <b>K</b> can also the barrier should be specified (seeset<b>Resource limits</b> section accordingly. Increased limit is necessary for more info onhighsuffixesperformance of communications through local (UNIX-domain)sockets.</p>
<p style="margin-left:11%;"><b>--diskinodesdgramrcvbuf</b><i>numbytes</i>[:<i>numbytes</i>]</p>
<p style="margin-left:22%;">sets soft and hard disk quotaMaximum size of other (non-TCP)socket receive buffers. If container&rsquo;s processes needslimitsto receive very large datagrams, in i-nodesthe barrier should be setaccordingly. First parameter is soft The difference between the barrier and thelimit, second ishard limitnot needed.</p>
<p style="margin-left:11%;"><b>--quotatimeoomguarpages</b><i>secondspages</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">sets quota grace periodGuarantees against OOM kill.Container Under this beancounter the kernel accounts the total amountof memory and swap space used by the container&rsquo;sprocesses. The barrier of this parameter is permitted to exceed its soft limits for thegrace periodout-of-memory guarantee. If the <b>oomguarpages</b> usage isbelow the barrier, but once it has expired, the soft processes of this container areguaranteed not to be killed in out-of-memory situations. Themeaning of limit iscurrently unspecified; it should be setenforced as a hard limitto <b>unlimited</b>.</p>
<p style="margin-left:11%;"><b>--quotaugidlimitlockedpages</b><i>numpages</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">sets maximum Maximum number ofpagesuser/group IDs in a container for which disk quota insidethe container will be accounted. If this value is set toacquired by <b>0mlock</b>, user and group quotas inside the container willnot be accounted(2).</p>
<p style="margin-left:2211%; margin-top: 1em">Note that ifyou have previously set value of this parameter to <b>0--privvmpages</b>,changing it while the container is running will not takeeffect.<i>pages</i>[:<i>pages</i>]</p>
<p style==== Mount option ===="margin-left:22%;">Allows controlling the amountof memory allocated by the applications. For shared (mappedas <b>MAP_SHARED</b>) pages, each container really using amemory page is charged for the fraction of the page(depending on the number of others using it). For&quot;potentially private&quot; pages (mapped as<b>MAP_PRIVATE</b>), container is charged either for afraction of the size or for the full size if the allocatedaddress space. In the latter case, the physical pagesassociated with the allocated address space may be inmemory, in swap or not physically allocated yet.</p>
<p style="margin-left:1122%;margin-top: 1em">The barrier andthe limit of this parameter control the upper boundary ofthe total size of allocated memory. Note that this upperboundary does not guarantee that container will be able toallocate that much memory. The primary mechanism to controlmemory allocation is the <b>--noatime yes</b> |<b>novmguarpages</b>guarantee.</p>
<p style="margin-left:2211%;">Sets noatime flag (do not<b>--shmpages</b>update inode access times) on filesystem.<i>pages</i>[:<i>pages</i>]</p>
<p style==== Capability option ===="margin-left:22%;">Maximum IPC SHM segment size.Setting the barrier and the limit to different values doesnot make practical sense.</p>
<p style="margin-left:11%;"><b>--capabilitynumfile</b><i>capnameitems</i>[:<bi>onitems</b>|<b>off</bi>]</p>
<p style="margin-left:22%;">Sets a capability for aMaximum number of open files.container. Note that setting capability when In most cases the barrier and the limit should be set to the containeris running does not take immediate effect; restart same value. Setting thebarrier to <b>0</b> effectivelycontainer disables pre-charging optimization for this beancounter in order for the changes kernel, which leads to take effect. Note acontainer has default set of capabilities, thus anyoperation on capabilities is &quot;logical and&quot; withthe held value being precise butthe default capability maskcould slightly degrade file open performance.</p>
<p style="margin-left:2211%; margin-top: 1em">You can use thefollowing values for <i>capname</i>: <b>chown--numflock</b>,<bi>dac_overrideitems</bi>, [:<bi>dac_read_searchitems</b>, <b>fowner</b>,<b>fsetid</b>, <b>kill</b>, <b>setgid</b>, <b>setuid</b>,<b>setpcap</b>, <b>linux_immutable</b>,<b>net_bind_service</b>, <b>net_broadcast</b>,<b>net_admin</b>, <b>net_raw</b>, <b>ipc_lock</b>,<b>ipc_owner</b>, <b>sys_module</b>, <b>sys_rawio</b>,<b>sys_chroot</b>, <b>sys_ptrace</b>, <b>sys_pacct</b>,<b>sys_admin</b>, <b>sys_boot</b>, <b>sys_nice</b>,<b>sys_resource</b>, <b>sys_time</b>, <b>sys_tty_config</b>,<b>mknod</b>, <b>lease</b>, <b>setveid</b>, <b>ve_admin</b>.For detailed description, see <b>capabilities</bi>(7).]</p>
<p style="margin-left:22%; ">Maximum number of file locks.Safety gap should be between barrier and limit.</p> <p style="margin-topleft: 1em11%;"><b>WARNING--numpty</b>:setting some of those capabilities may have far reachingsecurity implications, so do not do it unless you know whatyou are doing. Also note that setting <bi>items</i>setpcap[:on<i>items</bi> fora container will most probably lead to inability to startit.]</p>
<p style==== Device access management ===="margin-left:22%;">Number of pseudo-terminals(PTY). Note that in OpenVZ each container can have not morethan 255 PTYs. Setting the barrier and the limit todifferent values does not make practical sense.</p>
<p style="margin-left:11%;"><b>--devnodesnumsiginfo</b><i>deviceitems</i>[:[<bi>ritems</b>][<b>w</bi>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:22%;">Give Number of siginfo structures.Setting the container an access(<b>r</b> - read, <b>w</b> - write, <b>q</b> - disk quotamanagement, <b>none</b> - no access) barrier and the limit to a device designatedby the special file /dev/<i>device</i>. Device file iscreated in a container by <b>vzctl</b>. Example: <b>vzctldifferent values doesset 777 --devnodes sdb:rwq</b>not make practical sense.</p>
<p style="margin-left:11%;"><b>--devicesbdcachesize</b>|<b>c</b>:<i>majorbytes</i>[:<i>minorbytes</i>|<b>all</b>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:22%;">Give the container an access Maximum size offilesystem-related caches, such as directory entry and inodecaches. Exists as a separate parameter toimpose a <b>b</b>lock or <b>c</b>haracter device designated by itslimit<i>major</i> causing file operations to sense memory shortage and <i>minor</i> numbersreturnan errno to applications, protecting from memory shortagesduring critical operations that should not fail. Device file have toSafety gapshould be created manuallybetween barrier and limit.</p>
<p style==== PCI device management ===="margin-left:11%;"><b>--numiptent</b><i>num</i>[:<i>num</i>]</p>
<p style="margin-left:1122%;"><b>--pci_add</b>Number of iptables (netfilter)entries. Setting the barrier and the limit to different[<i>domain</i>:]<i>bus</i>:<i>slot</i>values does not make practical sense.<i>func</i></p>
<p style="margin-left:2211%;">Give the container an access toa specified PCI device. All numbers are hexadecimal (asprinted by <b>lspci--physpages</b>(8) in the first column).<i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:1122%;">On VSwap-enabled kernels, thislimits the amount of physical memory (RAM) available to acontainer. The barrier should be set to <b>--pci_del0</b>, and thelimit to a total size of RAM that can be used used by a[<i>domain</i>:]<i>bus</i>:<i>slot</i>container.<i>func</i></p>
<p style="margin-left:22%;margin-top: 1em">Delete a PCI device from For olderkernels, this is an accounting-only parameter, showing theusage of RAM by this container. Barrier should be set to<b>0</b>, and limit should be set to <b>unlimited</b>.</p>
<p style="margin-left:2211%; margin-top: 1em">Note that<b>vps-pci-swappages</b> configuration script is executed by<bi>vzctlpages</bi> then configuring PCI devices. The script isusually located at [:<bi>/usr/lib[64]/vzctl/scripts/pages</bi>.]</p>
<p style==== Features management ===="margin-left:22%;">For VSwap-enabled kernels(042stab042 or greater), this parameter limits the amount ofswap space available to a container. The barrier should beset to <b>0</b>, and the limit to a total size of swap thatcan be used by a container.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>For older(pre--features</b>VSwap) kernels, the limit is used to show a totalamount of swap space available inside the container. Thebarrier of this parameter is ignored. The default value is<i>name</i>:<b>on</b>|<b>offunlimited</b>, meaning total swap will be reported as0.</p>
<p style="margin-left:22%;">Enable or disable a specificcontainer feature. Known features are: <b>sysfs</b>,<b>nfs</b>, <b>sit</b>, <b>ipip</b>, <b>ppp</b>,<b>ipgre</b>, <b>bridge</b>, <b>nfsd</b>.</p>=== CPU fair scheduler parameters ====
<p style==== Apply config ===="margin-left:11%; margin-top: 1em">Theseparameters control CPU usage by container. <b><br>--cpuunits</b> <i>num</i></p>
<p style="margin-left:11%;"><b>--applyconfig</b><i>name</i></p> <p style="margin-left:22%;">Read CPU weight for a container parameters from.the container sample configuration file<tt>/etc/vz/conf/ve-</tt><i>name</i><tt>.confArgument is positive non-sample</tt>zero number,passed to and apply them, if <b>--save</b> option specified save toused inthe container config filekernel fair scheduler. The following parameters are notlarger the number is, thechanged: <b>HOSTNAME</b>, <b>IP_ADDRESS</b>more CPU time this container gets. Maximum value is 500000,minimal is 8. Number is relative to weights of all the otherrunning containers. If <b>OSTEMPLATE</b>, <b>VE_ROOTcpuunits</b>are not specified, and<b>VE_PRIVATE</b>default value of 1000 is used.</p>
<p style="margin-left:1122%;margin-top: 1em">You can set CPUweight for CT0 (host system itself) as well (use <b>vzctlset 0 --applyconfig_mapcpuunits</b><i>groupnum</i>). Usually, OpenVZ initscript(<b>/etc/init.d/vz</b>) takes care of setting this.</p>
<p style="margin-left:2211%;">Apply container configparameters selected by <ib>group--cpulimit</ib>. Now the only possiblevalue for <i>groupnum</i> is [<b>name%</b>: to restore containername based on <b>NAME</b> variable in containerconfiguration file.]</p>
<p style==== I"margin-left:22%;">Limit of CPU usage for thecontainer, in per cent. Note if the computer has 2 CPUs, ithas total of 200% CPU time. Default CPU limit is <b>0</b>(no CPU limit).</O priority management ====p>
<p style="margin-left:11%;"><b>--iopriocpus</b><i>prioritynum</i></p>
<p style="margin-left:22%;">Assigns I/O priority tocontainer. <i>Priority</i> range is <b>0-7</b>. The greatersets number of CPUs available<i>priority</i> is, in the more time for I/O activity containerhas. By default each container has <i>priority</i> of<b>4</b>.</p>
<p style=== Checkpointing and restore ==="margin-left:11%;"><b>--cpumask</b> <i>cpus</i> |<b>auto</b> | <b>all</b></p>
<p style="margin-topleft: 1em22%;">Checkpointing Sets list of allowed CPUs forthe container. Input format is a feature comma-separated list ofOpenVZ kernel which allows decimal numbers and/or ranges. Consecutively set bits areshown as two hyphen-separated decimal numbers, the smallestand largest bit numbers set in the range. For example, ifyou want the container to save a complete state of aexecute on CPUs 0, 1, 2, 7, youshould pass <b>0-2,7</b>. Default value is <b>all</b> (therunning containercan execute on any CPU). If used with the<b>--nodemask</b> option, and value of <b>auto</b> assigns allCPUs from the specified NUMA node to restore it latera container.</p>
<p style="margin-left:11%;"><b>chkpnt--nodemask</b> <i>CTIDnodes</i>[| <b>--dumpfileall</b> <i>name</i>]</p>
<p style="margin-left:1722%;">This command saves a completeSets list of allowed NUMA nodesstate of a running for the container to a dump file, and stops . Input format is thesame as forcontainer. If an option <b>--dumpfilecpumask</b> is not set,default dump file name . Note that <b>/vz/dump/Dump.--nodemask</b>must be usedwith the <ib>CTID--cpumask</ib> isusedoption.</p>
<p style="margin-left:11%;"><b>restore</b> <i>CTID</i>[<b>--dumpfile</b> <i>name</i>]</p>=== Memory output parameters ====
<p style="margin-left:1711%;margin-top: 1em">This command restores ForVSwap-enabled kernels (042stab042 or greater), thisparameter is ignored. For older kernels, it controls theoutput of /proc/meminfo inside acontainer from the dump file created by the . <b>chkpnt<br>--meminfo none</b>command.</p>
<p style=== Performing container actions ==="margin-left:22%;">No /proc/meminfo virtualization(the same as on host system).</p>
<p style="margin-left:11%;"><b>create</b> <i>CTID</i>[<b>--ostemplate</b> <i>name</i>] [<b>--config</b><i>name</i>] [<b>--privatememinfo</b> <i>path</i>] <br>[<b>--root</b> <i>path</i>] [<b>--ipaddmode</b> <i>addr</i>][<b>--hostname</b> :<i>namevalue</i>]</p>
<p style="margin-left:1722%;">Creates Configure total memory outputin a new container area.Reported free memory is evaluatedThis operation should be done once, before accordingly to the first startmode being set. Reported swap isevaluated according to the settings of the container<b>--swappages</b>parameter.</p>
<p style="margin-left:1722%; margin-top: 1em">If You can use thefollowing modes for <bi>--configmode</bi>: <br> option is specified, values from exampleconfiguration file&bull; <b>/etc/vz/conf/ve-pages</b>:<i>namevalue</i><b>.conf-sample</b> aresets total memory input into the container configuration file. If this containerconfiguration file already exists, it will be removed.pages; </pbr<p style="margin-left:17%&bull; margin-top: 1em">You can use<b>--rootprivvmpages</b> :<i>pathvalue</i> option to - sets the path to themount point for the container root directory (default istotal memoryas <b>VE_ROOTprivvmpages</b> specified in [[Man/vz.conf.5|* <bi>vz.confvalue</bi>(5)]] file).Argument can contain literal string <b>$VEID</b>, which willbe substituted with the numeric CT ID.</p>
<p style="margin-left:1722%; margin-top: 1em">You can use<b>--private</b> <i>path</i> option to set the path todirectory in which all the files and directories specific tothis very container are stored (default Default is <b>VE_PRIVATE</b>specified in [[Man/vz.conf.5|<b>vz.confprivvmpages:1</b>(5)]] file). Argument can containliteral string <b>$VEID</b>, which will be substituted withthe numeric CT ID.</p>
<p style="margin-left:17%; margin-top: 1em">You can use<b>--ipadd</b> <i>addr</i> option to assign an IP address toa container. Note that this option can be used multipletimes.</p>=== Netfilter (iptables) control parameters ====
<p style="margin-left:1711%; margin-top: 1em">You can use<b>--hostnamenetfilter&nbsp;disabled</b>|<b>stateless</b> |<ib>namestateful</ib>|<b>full</b> option to set a host name fora container.</p>
<p style="margin-left:1122%;"><b>destroy<Restrict access tonetfilter/b> |iptables modules for a container. This optionreplaces obsoleted <b>delete--iptables</b>.</p>
<p style="margin-left:1722%;margin-top: 1em">Removes a Note thatchanging this parameter requires container privatearea by deleting all filesrestart, directories and thesoconfiguration file of this containerconsider using <b>--setmode</b> option.</p>
<p style="margin-left:1122%;margin-top: 1em">The followingarguments can be used: <b>start</b> [<bbr>--wait</b>][<b>--force&bull; disabled</b>]</p>
<p style="margin-left:1732%;">Mounts (if necessary) andstarts a container. Unless <b>--waitno modules are allowed</bp> option isspecified, <bp style="margin-left:22%;">vzctl</b> will return immediately&bull; otherwisean attempt to wait till the default runlevel is reached willbe made by <b>vzctlstateless</b>.</p>
<p style="margin-left:1732%; margin-top: 1em">Specifyall modules except NAT and<b>--force</b> if you want to start a container which conntracks are allowed (i.e. filter and mangle); this isthedisabled (see <b>--disabled</b>).default</p>
<p style="margin-left:1722%; margin-top: 1em">Note that thiscommand can lead to execution of <b>premount</b>,<b>mount</b> and <b>start</b> action scripts (see <b>ACTIONSCRIPTS&bull; stateful</b> below).</p>
<p style="margin-left:1132%;"><b>stop</b> [<b>--fast</b>]all modules except NAT areallowed</p>
<p styletable width="margin-left:17100%;" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0">Stops and unmounts a container.Normally, <btr valign="top" align="left">halt</b>(8) is executed inside a container;option <b>--fast</btd width="22%"> makes <b>vzctl</btd> use <b>reboot</b>(2)syscall instead which is faster but can lead to uncleancontainer shutdown.</ptd width="9%">
<p style="margin-left:17%; margin-top: 1em">Note that thiscommand can lead to execution of <b>stop&bull; full</b>, <b/p>umount</btd>and <btd width="1%">postumount</b> action scripts (see <btd>ACTIONSCRIPTS</b> below).</ptd width="36%">
<p style>all modules are allowed</p></td><td width="margin-left:1132%;"><b/td>restart</btr></ptable>
<p style="margin-left:1711%;">Restarts a container, i.e.stops it if it is running, and starts again. Accepts all the<b>start--iptables</b> and <i>name</i>[<b>stop,</b> options...]</p>
<p style="margin-left:1722%; margin-top: 1em"><b>Note that </b> thisoption iscommand can lead to execution of some action scripts (seeobsoleted, <b>ACTION SCRIPTS--netfilter</b> below)should be used instead.</p>
<p style="margin-left:1122%;margin-top: 1em">Allow to usethe functionality of <bi>statusname</bi>iptables module inside thecontainer. Multiple comma-separated <i>name</i>s can bespecified.</p>
<p style="margin-left:1722%;margin-top: 1em">Shows a container status. ThisThe defaultlist of enabled iptables modules is a line with five or six words, separated defined by spacesthe<b>IPTABLES</b> variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]].</p>
<p style="margin-left:1722%; margin-top: 1em">First word isYou can use theliterally following values for <i>name</i>: <b>iptable_filter</b>,<b>iptable_mangle</b>, <b>ipt_limit</b>,<b>ipt_multiport</b>, <b>ipt_tos</b>, <b>ipt_TOS</b>,<b>ipt_REJECT</b>, <b>ipt_TCPMSS</b>, <b>ipt_tcpmss</b>,<b>ipt_ttl</b>, <b>ipt_LOG</b>, <b>ipt_length</b>,<b>ip_conntrack</b>, <b>ip_conntrack_ftp</b>,<b>ip_conntrack_irc</b>, <b>ipt_conntrack</b>,<b>ipt_state</b>, <b>ipt_helper</b>, <b>iptable_nat</b>,<b>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>ipt_REDIRECT</b>,<b>xt_mac</b>, <b>ipt_recent</b>, <b>CTIDipt_owner</b>.</p>
<p style="margin-left:17%; margin-top: 1em">Second word isthe numeric <i>CT ID</i>.</p>=== Network devices control parameters ====
<p style="margin-left:1711%; margin-top: 1em">Third word isshowing whether this container exists or not, it can beeither <b>exist--netdev_add</b> or <bi>deletedname</bi>.</p>
<p style="margin-left:1722%; ">move network device from thehost system to a specified container</p> <p style="margin-topleft: 1em11%;">Fourth word isshowing the status of the container filesystem, it can beeither <b>mounted--netdev_del</b> or <bi>unmountedname</bi>.</p>
<p style="margin-left:1722%; margin-top: 1em">Fifth worddelete network device from ashows if the specified container is running, it can be either<b>running</b> or <b>down</b>.</p>
<p style="margin-left:17%; margin-top: 1em">Sixth word, ifexists, is <b>suspended</b>. It appears if both a containerand its dump file exist (see <b>chkpnt</b>).</p>=== Disk quota parameters ====
<p style="margin-left:1711%; margin"><b>-top: 1em"-diskquota yes</b>This command|can also be usable from scripts.<b>no</b></p>
<p style="margin-left:1122%;">allows to enable or disabledisk quota for a container. By default, a global value(<b>mountDISK_QUOTA</b>) from [[Man/vz.conf.5|<b>vz.conf</b>(5)]] is used.</p>
<p style="margin-left:1722%;margin-top: 1em">Mounts container private area.Note that this command can lead to execution of<b>premount</b> and <b>mount</b> action scripts (seeparameter is ignored for <b>ACTION SCRIPTSploop</b> below)layout.</p>
<p style="margin-left:11%;"><b>umount--diskspace</b><i>num</i>[:<i>num</i>]</p>
<p style="margin-left:1722%;">Unmounts container privatearea. Note that this command can lead to execution ofFor <b>umountsimfs</b> layout, setssoft and <b>postumount</b> action scripts (seehard disk quota limits. First parameter is soft<b>ACTION SCRIPTS</b> below)limit, second is hard limit.</p>
<p style="margin-left:1722%; margin-top: 1em">Note thatFor<b>stopploop</b> does layout, initiates the procedure of resizing theploop image file to the new size. Since there is nosoft/hard limit concept in ploop, second <bi>umountnum</bi> automatically, ifspecified, is ignored.</p>
<p style="margin-left:1122%;margin-top: 1em">By default,ploop resize is done online, i.e. on a mounted ploop. Thisis a preferred way of doing resize. Although, in a rare casea container was using lots of disk space and should now beresized to a much smaller size, an offline resize might bemore appropriate. In this case, make sure the container isstopped and unmounted and use additional<b>quotaon--offline-resize</b> <i>ctid</i>option</p>
<p style="margin-left:1722%;margin-top: 1em">Turn disk quota Note that ploopresize is NOT performed on. Not thatcontainer start, so forconsistency <b>mount--diskspace</b> and must be used together with<b>start--save</b> does that automaticallyflag.</p>
<p style="margin-left:1122%;margin-top: 1em">Suffixes<b>quotaoffG</b> , <ib>M</b>, <b>K</b> can also be specified (see<b>ctidResource limits</ib>section for more info on suffixes).If suffix is not specified, value is in kilobytes.</p>
<p style="margin-left:1711%;">Turn disk quota off. Not that<b>umount--diskinodes</b> and <bi>num</i>[:<i>stopnum</bi> does that automatically.]</p>
<p style="margin-left:1122%;"><b>quotainit</b>sets soft and hard disk quota<limits, in i>ctid</i>-nodes. First parameter is soft limit, second ishard limit.</p>
<p style="margin-left:1722%;margin-top: 1em">Initialize disk quota (i.e. runNote that thisparameter is ignored for <b>vzquota initploop</b>) with the parameters taken from the CTconfiguration file [[Man/ctid.conf.5|<b>ctid.conf</b>(5)]]layout.</p>
<p style="margin-left:11%;"><b>exec--quotatime</b> <i>CTIDcommandseconds</i></p>
<p style="margin-left:1722%;">Executes <i>command</i> in asets quota grace period.container. Environment variables are not set inside Container is permitted to exceed its soft limits for thecontainer. Signal handlers may differ from default settings.If <i>command</i> grace period, but once it has expired, the soft limit is <b>-</b>, commands are read fromstdinenforced as a hard limit.</p>
<p style="margin-left:1122%;margin-top: 1em">Note that thisparameter is ignored for <b>exec2ploop</b> <i>CTIDcommand</i>layout.</p>
<p style="margin-left:1711%;">The same as <b>exec--quotaugidlimit</b>, butreturn code is that of <i>commandnum</i>.</p>
<p style="margin-left:1122%;">Enables or disablesin-container per-user and per-group disk quotas. If thevalue is set to <b>runscript0</b> <i>CTIDor not set, disk quotas inside thescript</i>container is disabled and not accounted.</p>
<p style="margin-left:1722%;margin-top: 1em">Run specified shell script inthe container. Argument <i>script</i> is a file on the hostsystem which contents is read by vzctl and executed in thecontext of the container. For a running container, thecommand jumps into the container and executes the script.For a stopped container, it enters the container, mountscontainer&rsquo;s root filesystem, executes the script, andunmounts CT root. In the latter case, the container is notreally started, no file systems other than root (such as<b>/procsimfs</b>) are mountedlayout containers, no startup scripts are executednon-zero value sets maximumetc. Thus the environment in number of user/group IDs for which the script is running isfar from normal and disk quota is only usable for very basicoperationsaccounted.</p>
<p style="margin-left:1122%;margin-top: 1em">For<b>enterploop</b> [<b>layout containers, any non--exec<zero value enablesdisk quota inside the container; the number of user/b>group<i>command</i> [<i>arg</i> ..IDs used by disk quota is not limited by OpenVZ.]]</p>
<p style="margin-left:1722%;margin-top: 1em">Enters into a Note thatenabling or disabling in-container (givingdisk quotas requiresa container&rsquo;s root shell). This option is a back-doorfor host root only. The proper way to have CT root shell isto use restart, so consider using <b>ssh--setmode</b>(1)option.</p>
<p style="margin-left:17%; margin-top: 1em">Option<b>--exec</b> is used to run <i>command</i> with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so <b>vzctl exec</b> can not beused) and for some reason you can not use <b>ssh</b>(1).</p>=== Capability option ====
<p style="margin-left:1711%; margin-top: 1em">You need to logout manually from the shell to finish session (even if youspecified <b>--execcapability</b><i>capname</i>:<b>on</b>)|<b>off</b>[<b>,</b>...]</p>
<p style=== Other options ==="margin-left:22%;">Sets a capability for acontainer. Multiple comma-separated capabilities can bespecified.</p>
<p style="margin-left:1122%;margin-top: 1em">Note thatsetting a capability when the container is running does nottake immediate effect; restart the container in order forthe changes to take effect (consider using <b>--helpsetmode</b>option).</p>
<p style="margin-left:1722%;margin-top: 1em">Prints help message A container hasthe default set of capabilities, thus any operation oncapabilities is &quot;logical AND&quot; with athe defaultbrief list of possible optionscapability mask.</p>
<p style="margin-left:1122%;margin-top: 1em">You can use thefollowing values for <i>capname</i>: <b>chown</b>,<b>dac_override</b>, <b>dac_read_search</b>, <b>fowner</b>,<b>fsetid</b>, <b>kill</b>--version, <b>setgid</b>, <b>setuid</b>,<b>setpcap</b>, <b>linux_immutable</b>,<b>net_bind_service</b>, <b>net_broadcast</b>,<b>net_admin</b>, <b>net_raw</b>, <b>ipc_lock</b>,<b>ipc_owner</b>, <b>sys_module</b>, <b>sys_rawio</b>,<b>sys_chroot</b>, <b>sys_ptrace</b>, <b>sys_pacct</b>,<b>sys_admin</b>, <b>sys_boot</b>, <b>sys_nice</pb>,<b>sys_resource</b>, <b>sys_time</b>, <b>sys_tty_config</b>,<p style="margin-left:17%;"b>mknod</b>, <b>lease</b>, <b>setveid</b>Prints , <b>vzctlve_admin</b>.versionFor detailed description, see <b>capabilities</b>(7).</p> == ACTION SCRIPTS ==
<p style="margin-left:1122%; margin-top: 1em"><b>vzctlWARNING</b>:setting some of those capabilities may have far reachinghas an ability to execute user-defined scripts when asecurity implications, so do not do it unless you know whatspecific you are doing. Also note that setting <b>vzctlsetpcap:on</b> command is run for a container. Thefollowing <b>vzctl</b> commands can trigger execution ofaction scripts: <b>will most probably lead to inability to start</b>, <b>stop</b>, <b>restart</b>,<b>mount</b> and <b>umount</b>it.</p>
<p style="margin-left:11%; margin-top: 1em">Action scriptsare located in the <b>/etc/vz/conf/</b> directory. There areglobal and per-CT scripts. Global scripts have a literalprefix of <b>vps.</b> and are executed for all containers.Per-CT scripts have a <i>CTID</i> numeric prefix and areexecuted for the given container only.</p>=== Device access management ====
<p style="margin-left:11%; margin"><b>-top: 1em"-devnodes</b>There are 8action scripts currently defined<i>device</i>: [<b>r</b>][<brb>vps.premountw</b>, ][<ib>CTIDq</ib>]|<b>.premountnone</b></p>
<p style="margin-left:22%;">Global and perGive the container an access(<b>r</b> - read, <b>w</b> -CT mount scriptswrite, <b>q</b> - disk quotawhich are executed for management, <b>none</b> - no access) to a container before it is mounted.device designatedScripts are executed in by the host OS context, while a CT isnot yet mounted or runningspecial file /dev/<i>device</i>. Global script, if exists, Device file isexecuted firstcreated in a container by <b>vzctl</b>.Example:</p>
<p pre style="margin-left:1122%;"><b>vps.mount</b>,<i>CTID</i><b>.mount</b> vzctl set 777 --devnodes sdb:rwq</ppre>
<p style="margin-left:2211%;">Global and per<b>-CT mount scripts-deviceswhich are executed for a container right after it ismounted. Otherwise they are the same as b</b>|<b>c</b>:<i>major</i>:<i>minor</i>|<b>all</b>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>.premountnone</b>scripts.</p>
<p style="margin-left:1122%;">Give the container an access toa <b>b</b>lock or <b>c</b>haracter device designated by its<i>CTIDmajor</i>and <bi>.startminor</bi>numbers. Device file have tobe created manually.</p>
<p style="margin-left:22%;">Right after <b>vzctl</b> hasstarted a container, it executes this script in a containercontext.</p>=== PCI device management ====
<p style="margin-left:11%;"><b>--pci_add</b>[<i>CTIDdomain</i>:]<bi>bus</i>:<i>slot</i>.stop<i>func</bi></p>
<p style="margin-left:22%;">Right before Give the container an access toa specified PCI device. All numbers are hexadecimal (asprinted by <b>vzctllspci</b> has(8) in the first column).</p>stopped a container, it executes this script in a containercontext<p style="margin-left:11%;"><b>--pci_del</b>[<i>domain</i>:]<i>bus</i>:<i>slot</i>.<i>func</i></p>
<p style="margin-left:1122%;"><b>vps.umount</b>,Delete a PCI device from the<i>CTID</i><b>container.umount</b></p>
<p style="margin-left:22%;margin-top: 1em">Global and perNote that<b>vps-CT umountscripts which are executed for a container before it pci</b> configuration script isunmounted. Scripts are executed in the host OS context,bywhile a CT is mounted<b>vzctl</b> then configuring PCI devices. Global The script, if exists, is executedfirstusually located at <b>/usr/libexec/vzctl/scripts/</b>.</p>
<p style="margin-left:11%;"><b>vps.postumount</b>,<i>CTID</i><b>.postumount</b></p>=== Features management ====
<p style="margin-left:2211%;">Global and per<b>-CT umount-features</b>scripts which are executed for a container right after it isunmounted. Otherwise they are the same as <i>name</i>:<b>on</b>|<b>off</b>[<b>.umount,</b>scripts...]</p>
<p style="margin-left:22%; margin-top: 1em">The environmentEnable or disable a specificpassed to all the container feature. Known features are: <b>*mountsysfs</b> scripts is the standard,environment of the parent (i.e. <b>vzctlnfs</b>, <b>sit</b>) with twoadditional variables: , <b>$VEIDipip</b> and , <b>$VE_CONFFILEppp</b>.The first one holds the ID of the container, and the secondone holds the full path to the container configuration file.If the script needs to get other CT configurationparameters<b>ipgre</b>, such as <b>$VE_ROOTbridge</b>, it needs to get those<b>nfsd</b>. A few features canfrom global and perbe specified at once, comma-CT configuration filesseparated.</p>
<p style="margin-left:22%; margin-top: 1em">Here is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container(s). Script name can eitherbe <b>/etc/vz/conf/vps.mount</b> or<b>/etc/vz/conf/</b><i>CTID</i><b>.mount</b>.</p>=== Apply config ====
<pre p style="margin-left:11%; margin-top: 1em"> # If one of these files does not exist then something # is really broken [ <b>-f /etc/sysconfig/vz ] || exit 1 [ -f $VE_CONFFILE ] || exit 1 # Source both files. Note the order is important. . applyconfig</etc/vz/vz.confb> . $VE_CONFFILE mount -n --bind <i>name</mnt/disk $VE_ROOT/mnt/diski></prep>
<p style== EXIT STATUS =="margin-left:22%;">Read container parameters fromthe container sample configuration file<tt>/etc/vz/conf/ve-</tt><i>name</i><tt>.conf-sample</tt>,and apply them, if <b>--save</b> option specified save tothe container config file. The following parameters are notchanged: <b>HOSTNAME</b>, <b>IP_ADDRESS</b>,<b>OSTEMPLATE</b>, <b>VE_ROOT</b>, and<b>VE_PRIVATE</b>.</p>
<p style="margin-left:11%; margin"><b>--top: 1em"applyconfig_map</b>Returns 0 uponsuccess, or an appropriate error code in case of anerror:<i>group</i></p>
<table widthp style="100margin-left:22%;" border="0" rules="none" frame="void">Apply container config cellspacing="0" cellpadding="0"parameters selected by <i>group</i>. Now the only possiblevalue for <tr valign="top" align="left"i>group</i> is <b>name</b>: to restore containername based on <td width="11%"b>NAME</tdb>variable in containerconfiguration file.<td width="4%"/p>
<p>1<==== I/p></td><td widthO scheduling ==="7%"></td><td width="78%">
<pstyle="margin-left:11%;">Failed to set a UBC parameter</pb>--ioprio</td></trb><tr valign="top" align="left"i>priority<td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:22%;">2Assigns disk I/O priority tocontainer. <i>Priority</pi> range is <b>0-7</tdb>. The greater<td width="7%"i>priority</i> is, the more time for I/O activity containerhas. By default each container has <i>priority</tdi>of<td width="78%"b>4</b>.</p>
<pstyle="margin-left:11%;"><b>--iolimit</b><i>Failed to set a fair scheduler parameterlimit</pi>[<b>B</tdb>|<b>K</trb>|<b>M<tr valign="top" align="left"/b>|<td width="11%"b>G</tdb>]<td width="4%"/p>
<pstyle="margin-left:22%;">3Assigns disk I/O bandwidthlimit for a container. Value is either a number with anoptional suffix, or a literal string </pb>unlimited</tdb>. Valueof <td width="7%"b>0</tdb>means &quot;unlimited&quot;. By default acontainer has no I/O limit. Maximum allowed limit is 2gigabytes per second; values exceeding the limit aretruncated.<td width="78%"/p>
<pstyle="margin-left:22%; margin-top: 1em">If no suffix isprovided, the <i>Generic system errorlimit</pi> is assumed to be in megabytes persecond. Available suffixes are: <br>&bull; <b>b</tdb>, <b>B</trb> -- bytes per second; <br>&bull; <b>k</b>, <b>K</b> -- kilobytes per second; <tr valign="top" align="left"br>&bull; <td width="11%"b>m</b>, <b>M</tdb> -- megabytes per second (default);<br>&bull; <td width="4%"b>g</b>, <b>G</b> -- gigabytes per second;</p>
<pstyle="margin-left:11%;">5</pb>--iopslimit</tdb><td width="7%"i>iops</tdi><td width="78%"/p>
<pstyle="margin-left:22%;">The running kernel Assigns IOPS limit for acontainer, in number of input/output operations per second.Value is not an OpenVZ kernel (a number or someOpenVZ modules are not loaded)a literal string </p></tdb>unlimited</tr><tr valign="top" align="left"b>.Value of <td width="11%"b>0</tdb>means &quot;unlimited&quot;. By default acontainer has no IOPS limit.<td width="4%"/p>
<p>6</p></td><td width="7%"></td><td width="78%">= Suspending and resuming ===
<p>Not enough system resources</p></td></tr><tr valignstyle="margin-top" align="left: 1em">Checkpointing is a feature ofOpenVZ kernel which allows to save a complete in-kernel<td width="11%">state of a running container, and to restore it later.</td><td width="4%"p>
<pstyle="margin-left:11%;"><b>suspend</b>|<b>chkpnt</b><i>CTID</i> [<b>--dumpfile</b> <i>7name</pi>]</tdp> <td widthp style="7margin-left:17%;">This command suspends acontainer to a dump file If an option <b>--dumpfile</tdb>isnot set, default dump file name<td width="78%"b>/vz/dump/Dump.</b><i>CTID</i> is used.</p>
<pstyle="margin-left:11%;"><b>ENV_CREATEresume</b> ioctl failed|<b>restore</pb><i>CTID</tdi>[</trb>--dumpfile<tr valign="top" align="left"/b><td width="11%"i>name</tdi>]<td width="4%"/p>
<p>8</p></td><td widthstyle="7margin-left:17%;">This command restores acontainer from the dump file created by the <b>suspend</tdb>command.<td width="78%"/p>
<p>Command executed by <b>vzctl exec</b> returned non-zeroexit code</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td widthSnapshotting ==="4%">
<p>9</p></td><td widthstyle="7%margin-top: 1em">Snapshotting is a feature basedon checkpointing and ploop shapshots. It allows to save acomplete state of container file system. Plus, if thecontainer is running, it&rsquo;s in-memory state (as incheckpointing). Note that snapshot functionality is onlyworking for containers on ploop device.</td><td width="78%"p>
<pstyle="margin-left:11%;">Container is locked by another <b>vzctlsnapshot</b> <i>CTID</i>invocation[<b>--id</b> <i>uuid</pi>] [<b> --name</tdb><i>name</tri>][<b>--description</b> <tr valign="top" align="left"i>desc</i>] <br>[<b>--skip-suspend<td width="11%"/b>] [<b>--skip-config</tdb>]<td width="4%"/p>
<p>10</p></td><td widthstyle="7margin-left:17%;">Creates a container snapshot,i.e. saves the current container state, including its filesystem state, running processes state, and configurationfile.</td><td width="78%"p>
<pstyle="margin-left:17%; margin-top: 1em">Global OpenVZ configuration file [[Man/vz.conf.5|If a containeris running, and <b>vz.conf--skip-suspend</b>(5)]] option is notfoundspecified, a container is checkpointed and then restored,and CT memory dump becomes the part of snapshot.</p> </td></tr> <tr valignp style="margin-left:17%; margin-top" align="left: 1em">Unless<td width="11%"b>--skip-config</tdb>option is given, containerconfiguration file is saved to the snapshot.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">If <i>uuid</i>11is not specified, it is auto-generated. Options<b>--name</pb> and <b>--description</tdb>can be used tospecify the snapshot name and description, respectively.Name is displayed by <td width="7%"b>snapshot-list</tdb>.<td width="78%"/p>
<pstyle="margin-left:11%;"><b>snapshot-switch</b><i>A vzctl helper script file not foundCTID</pi> [<b>--skip-resume</tdb> | <b>--must-resume</trb>][<b>--skip-config</b>] <b><tr valign="top" align="left"br>--id</b> <td width="11%"i>uuid</tdi><td width="4%"/p>
<p>12</p></td><td widthstyle="7margin-left:17%;">Switches the container to asnapshot identified by <i>uuid</tdi>, restoring its filesystem state, configuration (if available) and its runningstate (if available).<td width="78%"/p>
<p>Permission denied</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em"><td width="11%"b>Note thatthe current state of a container (including its file systemstate and its configuration file) is lost!</tdb><td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">13Option</pb>--skip-resume</tdb>is used to ignore a CT memory dump filein a snapshot, as a result the container will end up beingin a stopped state (same as if a snapshot has been takenwith <td width="7%"b>--skip-suspend</tdb>).<td width="78%"/p>
<p>Capability setting failed</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">If option<td width="11%"b>--must-resume</tdb>is set, absense of a memory dump istreated as an error, and the inability to restore from thememory dump is treated as an error rather than warning.<td width="4%"/p>
<p>14</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Option option<b>--skip-config</tdb>is used to ignore the CT configurationfile in a snapshot, i.e. the current configuration file willbe left as is.<td width="78%"/p>
<pstyle="margin-left:11%;">Container configuration file [[Man/ctid.conf.5|<b>ctid.confsnapshot-delete</b>(5)]] notfound</pi> CTID</tdi></trb>--id<tr valign="top" align="left"/b><td width="11%"i>uuid</tdi><td width="4%"/p>
<p>15</p></td><td widthstyle="7margin-left:17%;">Removes a specifiedsnapshot.</td><td width="78%"p>
<pstyle="margin-left:11%;">Timeout on <b>vzctl execsnapshot-mount</b><i>CTID</pi> <b>--id</tdb> <i>uuid</tri><tr valign="top" align="left"b>--target</b><td width="11%"i>directory</tdi><td width="4%"/p>
<pstyle="margin-left:17%;">16Mounts a snapshot specified by</pi>uuid</tdi>to a <td width="7%"i>directory</tdi>. Note this mount isread-only.<td width="78%"/p>
<pstyle="margin-left:11%;">Error during <b>vzctl chkpntsnapshot-umount</b></pi>CTID</tdi></trb>--id<tr valign="top" align="left"/b><td width="11%"i>uuid</tdi><td width="4%"/p>
<p>17</p></td><td widthstyle="7margin-left:17%;">Unmounts a specifiedsnapshot.</td><td width="78%"p>
<pstyle="margin-left:11%;">Error during <b>vzctl restoresnapshot-list</b><i>CTID</pi> [<b>-H</tdb>] [<b>-o</trb><tr valign="top" align="left"i>field</i>[,<i>field</i>...] [<b>--id</b><td width="11%"i>uuid</tdi>]<td width="4%"/p>
<p>18</p></td><td widthstyle="7margin-left:17%;">List container&rsquo;ssnapshots.</td><td width="78%"p>
<pstyle="margin-left:17%; margin-top: 1em">Error from You cansuppress displaying header using <b>setluid()-H</b> syscalloption.</p> </tdp style="margin-left:17%; margin-top: 1em">You can use the<b>-o</trb>option to display only the specified<tr valign="top" align="left"i>field</i>(s). List of available fields can be obtainedusing <td width="11%"b>-L</tdb>option.<td width="4%"/p>
<p>20</p></td><td width="7%"></td><td width="78%">= Performing container actions ===
<p>Invalid command line parameter</p></td></trtable width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="49%">
<pstyle="margin-top: 1em"><b>create</b>21</p></td><td width="72%"></td>
<td width="78%">
<pstyle="margin-top: 1em"><i>CTID</i>[<b>--ostemplate&nbsp;</b><i>name</i>][<b>--config&nbsp;</b><i>name</i>][<b>--layout&nbsp;simfs</b>|<b>ploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]][<b>--diskspace&nbsp;</b><i>kbytes</i>][<b>--diskinodes&nbsp;</b><i>num</i>][<b>--private&nbsp;</b><i>path</i>][<b>--root&nbsp;</b><i>path</i>][<b>--ipadd&nbsp;</b><i>Invalid value for command line parameteraddr</pi>][<b>--hostname&nbsp;</b><i>name</i>][<b>--name&nbsp;</tdb><i>name</tri>][<tr valign="top" align="left"b>--local_uid&nbsp;</b><i>uid</i>][<b>--local_gid&nbsp;</b><i>gid</i>]</p> </td width="11%"></tdtr><td width/table> <p style="4margin-left:17%; margin-top: 1em">Creates a newcontainer area. This operation should be done once, beforethe first start of the container.</p>
<pstyle="margin-left:17%; margin-top: 1em">By default, anOS template denoted by <b>22DEF_OSTEMPLATE</pb> parameter of[[Man/vz.conf.5|<b>vz.conf</tdb>(5)]] is used to create a container. This can beoverwritten by <td width="7%"b>--ostemplate</tdb>option.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container root directory (By default, anew container configuration file is created from a sampleconfiguration denoted by value of <b>VE_ROOTCONFIGFILE</b>) not set<parameter of [[Man/p>vz.conf.5|</tdb>vz.conf</trb>(5)]]. If the container<tr valign="top" align="left">configuration file already exists, it will not be<td width="11%">modified.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">23The value of<b>CONFIGFILE</pb> can be overwritten by using the<b>--config</tdb><td width="7%"i>name</tdi>option. This option can not beused if the container configuration file already exists.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container private directory (A new containercan either be created using <b>VE_PRIVATEsimfs</b>) notfilesystem or on a<b>ploop</b> device. The default is setby value of<b>VE_LAYOUT</b> parameter of [[Man/vz.conf.5|<b>vz.conf</pb>(5)]] and can beoverwritten by <b> --layout</tdb>option. In case <b>ploop</trb>is used, one can additionally specify ploop disk imageformat after a colon. Possible ploop formats are<b>expanded</b>, <b>plain</b> and <tr valign="top" align="left"b>raw</b>. Default is<td width="11%"b>expanded</b>. Using value other than <b>expanded</tdb>isnot recommended and is currently not supported.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">24You can use<b>--diskspace</pb> and <b>--diskinodes</tdb>options tospecify container file system size. Note that for<td width="7%"b>ploop</tdb>layout, you will not be able to change inodesvalue later.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container template directory (If<b>TEMPLATEDISKSPACE</b>) is notspecified either in the samplesetconfiguration file used for creation or in globalconfiguration file [[Man/vz.conf.5|</pb> vz.conf</tdb>(5)]], </trb>--diskspace<tr valign="top" align="left"/b>parameter is required for <td width="11%"b>ploop</tdb>layout.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">28Suffixes<b>G</pb>, <b>M</b>, <b>K</tdb>can also be specified (see<td width="7%"b>Resource limits</tdb>section for more info onsuffixes).<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">You can use<b>Not all required UBC parameters are set, unable --root</b> <i>path</i> option to sets the path to startthemount point for the containerroot directory (default is</pb> VE_ROOT</tdb>specified in [[Man/vz.conf.5|</trb>vz.conf<tr valign="top" align="left"/b>(5)]] file).Argument can contain literal string <td width="11%"b>$VEID</tdb>, which willbe substituted with the numeric CT ID.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">You can use<b>--private</b> <i>path</i> option to set the path todirectory in which all the files and directories specific tothis very container are stored (default is <b>29VE_PRIVATE</pb>specified in [[Man/vz.conf.5|<b>vz.conf</tdb>(5)]] file). Argument can containliteral string <td width="7%"b>$VEID</tdb>, which will be substituted withthe numeric CT ID.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">OS template is not specified, unable to createYou can usecontainer<b>--ipadd</pb> </tdi>addr</tri>option to assign an IP address to<tr valign="top" align="left">a container. Note that this option can be used multiple<td width="11%">times.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">31You can use</pb>--hostname</tdb><td width="7%"i>name</tdi>option to set a host name fora container.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container not When runningwith an upstream Linux Kernel that supports user namespaces(&gt;= 3.8), the parameters <b>--local_uid</b> and<b>--local_gid</pb> can be used to select which <i>uid</i>and <i>gid</tdi> respectively will be used as a base user inthe host system. Note that user namespaces provide a 1:1mapping between container users and host users. If theseoptions are not specified, the values <b>LOCAL_UID</trb>and<tr valign="top" align="left"b>LOCAL_GID</b>from global configuration file[[Man/vz.conf.5|<b>vz.conf</b>(5)]] are used. An explicit <td width="11%"b>--local_uid</tdb>value of 0 will disable user namespace support, and run thecontainer as a privileged user. In this case,<b>--local_gid</b> is ignored.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em"><b>32Warning:</pb>use <b>--local_uid</tdb>and <td width="7%"b>--local_gid</tdb>with care,specially when migrating containers. In all situations, thecontainer&rsquo;s files in the filesystem needs to becorrectly owned by the host-side users.<td width="78%"/p>
<pstyle="margin-left:11%;">Container already running</pb>destroy</tdb>| </trb>delete<tr valign="top" align="left"/b><td width="11%"i>CTID</tdi><td width="4%"/p>
<p>33</p></td><td widthstyle="7margin-left:17%;">Removes a container privatearea by deleting all files, directories and theconfiguration file of this container.</td><td width="78%"p>
<pstyle="margin-left:11%;">Unable to stop container<b>start</pb> <i>CTID</i>[<b>--wait</tdb>] [<b>--force</trb>] [<b>--skip-fsck<tr valign="top" align="left"/b>][<td width="11%"b>--skip-remount</tdb>]<td width="4%"/p>
<pstyle="margin-left:17%;">Mounts (if necessary) andstarts a container. Unless <b>34--wait</pb> option isspecified, <b>vzctl</tdb>will return immediately; otherwisean attempt to wait till the default runlevel is reached willbe made by <td width="7%"b>vzctl</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to add IP address to containerSpecify</pb>--force</td></trb>if you want to start a container which isdisabled (see <tr valign="top" align="left"b>--disabled<td width="11%"/b>).</td><td width="4%"p>
<p>40</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Specify<b>--skip-fsck</tdb>to skip fsck for ploop-based containerfilesystem (this option is used by vz initscript).<td width="78%"/p>
<p>Container not mounted</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">By default, ifa container to be started happens to be already mounted, itis unmounted and mounted again. This behavior can be turnedoff by using <td width="11%"b>--skip-remount</tdb>flag.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Note that thiscommand can lead to execution of <b>41premount</pb>,<b>mount</tdb>and <td width="7%"b>start</tdb> action scripts (see <b>ACTIONSCRIPTS<td width="78%"/b> below).</p>
<pstyle="margin-left:11%;"><b>Container already mountedstop</pb></tdi>CTID</tri>[<b>--fast<tr valign="top" align="left"/b>] [<td width="11%"b>--skip-umount</tdb>]<td width="4%"/p>
<pstyle="margin-left:17%;">Stops a container and unmountsit (unless <b>43--skip-umount</pb> is given). Normally,<b>halt</tdb>(8) is executed inside a container; option<td width="7%"b>--fast</b> makes <b>vzctl</b> use <b>reboot</tdb>(2)syscall instead which is faster but can lead to uncleancontainer shutdown.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Note that<b>Container private area vzctl stop</b> is not foundasyncronous, in other words vzctlwaits for container&rsquo;s init to exit (unless<b>--fast</pb> is given), which can take up to a few minutes.Default wait timeout is 120 seconds; it can be changedglobally, by setting <b>STOP_TIMEOUT</b> in[[Man/vz.conf.5|<b>vz.conf</tdb>(5)]], or per container (<b>STOP_TIMEOUT</trb>in[[Man/ctid.conf.5|<tr valign="top" align="left"b>ctid.conf</b>(5)]], see <td width="11%"b>--stop-timeout</tdb>).<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">44Note that thiscommand can lead to execution of <b>stop</pb>, <b>umount</tdb>and <td width="7%"b>postumount</tdb> action scripts (see <b>ACTIONSCRIPTS</b> below).<td width="78%"/p>
<pstyle="margin-left:11%;">Container private area already exists<b>restart</pb> <i>CTID</i>[<b>--wait</tdb>] [<b>--force</trb>] [<b>--fast<tr valign="top" align="left"/b>][<td width="11%"b>--skip-fsck</tdb>]<td width="4%"/p>
<pstyle="margin-left:17%;">46Restarts a container, i.e.stops it if it is running, and starts again. Accepts all the</pb>start</tdb>and <td width="7%"b>stop</tdb>options.<td width="78%"/p>
<p>Not enough disk space</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">Note that thiscommand can lead to execution of some action scripts (see<td width="11%"b>ACTION SCRIPTS</tdb>below).<td width="4%"/p>
<pstyle="margin-left:11%;">47</pb>status</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p>Bad/broken container (<b>/sbin/init</b> or<b>/bin/sh</b> not found)</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Shows a container status. This<td width="11%">is a line with five or six words, separated by spaces.</td><td width="4%"p>
<p>48</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">First word isliterally <b>CTID</tdb>.<td width="78%"/p>
<p>Unable to create a new container private area</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">Second word isthe numeric <td width="11%"i>CT ID</tdi>.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">49Third word isshowing whether this container exists or not, it can beeither </pb>exist</tdb>or <td width="7%"b>deleted</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to create a new Fourth word isshowing the status of the container root areafilesystem, it can beeither </pb>mounted</tdb>or </trb>unmounted<tr valign="top" align="left"><td width="11%"/b>.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">50Fifth wordshows if the container is running, it can be either</pb>running</tdb>or <td width="7%"b>down</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to mount container</p>Sixth word, ifexists, is </tdb>suspended</tr><tr valign="top" align="left"b>. It appears if a dump fileexists for a stopped container (see <td width="11%"b>suspend</tdb>).<td width="4%"/p>
<p>51</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">This commandcan also be usable from scripts.</td><td width="78%"p>
<pstyle="margin-left:11%;">Unable to unmount container</pb>mount</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">52Mounts container private area.Note that this command can lead to execution of<b>premount</pb> and <b>mount</tdb>action scripts (see<td width="7%"b>ACTION SCRIPTS</tdb>below).<td width="78%"/p>
<pstyle="margin-left:11%;">Unable to delete a container</pb>umount</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">53Unmounts container privatearea. Note that this command can lead to execution of<b>umount</pb> and <b>postumount</tdb>action scripts (see<td width="7%"b>ACTION SCRIPTS</tdb>below).<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container private area not existNote that</pb>stop</tdb>does </trb>umount<tr valign="top" align="left"><td width="11%"/b>automatically.</td><td width="4%"p>
<pstyle="margin-left:11%;">60<b>convert</pb> <i>CTID</tdi>[<td width="7%"b>--layoutploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</tdb>}]]<td width="78%"/p>
<p><b>vzquota on</b> failed</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Convert CT private area toreside on a ploop device (available in kernel version042stab052.8 and greater). Conversion should be performedwhen a container is stopped, plus disk space quota should be<td width="11%">set.</td><td width="4%"p>
<pstyle="margin-left:11%;">61</pb>compact</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p><b>vzquota init</b> failed</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Compact container image. This<td width="11%">only makes sense for ploop layout.</td><td width="4%"p>
<pstyle="margin-left:11%;">62</pb>quotaon</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Turn disk quota on. Not that<b>vzquota setlimitmount</b> failedand </pb>start</tdb>does that automatically.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:11%;">63</pb>quotaoff</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Parameter Turn disk quota off. Not that<b>DISKSPACEumount</b> not setand </pb>stop</tdb>does that automatically.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:11%;">64</pb>quotainit</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Parameter Initialize disk quota (i.e. run<b>DISKINODESvzquota init</b> not set<) with the parameters taken from the CTconfiguration file [[Man/p>ctid.conf.5|</tdb>ctid.conf</tr><tr valign="top" align="left"><td width="11%"b>(5)]].</td><td width="4%"p>
<pstyle="margin-left:11%;">66</pb>exec</tdb><td width="7%"i>CTIDcommand</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Executes <bi>vzquota offcommand</bi> failedin acontainer. Environment variables are not set inside thecontainer. Signal handlers may differ from default settings.If </pi>command</tdi>is </trb>-<tr valign="top" align="left"/b>, commands are read from<td width="11%">stdin.</td><td width="4%"p>
<pstyle="margin-left:11%;">67</pb>exec2</tdb><td width="7%"i>CTIDcommand</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">ugid quota not initialized</p>The same as </tdb>exec</trb>, butreturn code is that of <tr valign="top" align="left"i>command<td width="11%"/i>.</td><td width="4%"p>
<pstyle="margin-left:11%;">71</pb>runscript</tdb><td width="7%"i>CTIDscript</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Incorrect IP address formatRun specified shell script inthe container. Argument </pi>script</td></tri>is a file on the hostsystem which contents is read by vzctl and executed in thecontext of the container. For a running container, thecommand jumps into the container and executes the script.For a stopped container, it enters the container, mountscontainer&rsquo;s root filesystem, executes the script, andunmounts CT root. In the latter case, the container is not<tr valign="top" align="left">really started, no file systems other than root (such as<td width="11%"b>/proc</tdb>) are mounted, no startup scripts are executedetc. Thus the environment in which the script is running isfar from normal and is only usable for very basicoperations.<td width="4%"/p>
<pstyle="margin-left:11%;"><b>74enter</pb> <i>CTID</tdi>[<b>--exec</b> <i>command</i> [<td width="7%"i>arg</tdi>...]]<td width="78%"/p>
<p style="margin-left:17%;">Enters into a container (givinga container&rsquo;s root shell). This option is a back-doorfor host root only. The proper way to have CT root shell isto use <b>ssh</b>(1).</p> <p style="margin-left:17%; margin-top: 1em">Option<b>--exec</b> is used to run <i>command</i> with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so <b>vzctl exec</b> can not beused) and for some reason you can not use <b>ssh</b>(1).</p> <p style="margin-left:17%; margin-top: 1em">You need to logout manually from the shell to finish session (even if youspecified <b>--exec</b>).</p> <p style="margin-left:11%;"><b>console</b> <i>CTID</i>[<i>ttynum</i>]</p> <p style="margin-left:17%;">Attach to a container console.Optional <i>ttynum</i> argument is tty number (such as<b>4</b> for <b>tty4</b>), default is <b>1</b> which is usedfor container&rsquo;s <b>/dev/console</b>.</p> <p style="margin-left:17%; margin-top: 1em">Note theconsoles are persistent, meaning that: <br>&bull; it can be attached to even if the container is notrunning; <br>&bull; there is no automatic detachment upon the containerstop; <br>&bull; detaching from the console leaves anything running inthis console as is.</p> <p style="margin-left:17%; margin-top: 1em">The followingescape sequences are recognized by <b>vzctl console</b>.Note that these sequences are only recognized at thebeginning of a line.</p> <p style="margin-left:17%; margin-top: 1em">&bull;<b>Esc</b> then <b>.</b> to detach from the console.</p> <p style="margin-left:17%; margin-top: 1em">&bull;<b>Esc</b> then <b>!</b> to kill anything running on theconsole (SAK). This is helpful when one expects a loginprompt but there isn&rsquo;t one.</p> === Other options === <p style="margin-left:11%;"><b>--help</b></p> <p style="margin-left:17%;">Prints help message with abrief list of possible options.</p> <p style="margin-left:11%;"><b>--version</b></p> <p style="margin-left:17%;">Prints <b>vzctl</b>version.</p> == ACTION SCRIPTS == <p style="margin-left:11%; margin-top: 1em"><b>vzctl</b>has an ability to execute user-defined scripts when aspecific <b>vzctl</b> command is run for a container. Thefollowing <b>vzctl</b> commands can trigger execution ofaction scripts: <b>start</b>, <b>stop</b>, <b>restart</b>,<b>mount</b> and <b>umount</b>.</p> <p style="margin-left:11%; margin-top: 1em">Action scriptsare located in the <b>/etc/vz/conf/</b> directory. There areglobal and per-CT scripts. Global scripts have a literalprefix of <b>vps.</b> and are executed for all containers.Per-CT scripts have a <i>CTID</i><b>.</b> numeric prefix andare executed for the given container only.</p> <p style="margin-left:11%; margin-top: 1em">Please notescripts are executed in a host system (CT0) context, withthe exception of <b>.start</b> and <b>.stop</b> scripts,which are executed in a container context.</p> <p style="margin-left:11%; margin-top: 1em">The followingaction scripts are currently defined: <b><br>vps.premount</b>, <i>CTID</i><b>.premount</b></p> <p style="margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container before it is mounted.Scripts are executed in the host system context, while a CTis not yet mounted or running. Global script, if exists, isexecuted first.</p> <p style="margin-left:11%;"><b>vps.mount</b>,<i>CTID</i><b>.mount</b></p> <p style="margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container right after it ismounted. Otherwise they are the same as <b>.premount</b>scripts.</p> <p style="margin-left:11%;"><i>CTID</i><b>.start</b></p> <p style="margin-left:22%;">Right after <b>vzctl</b> hasstarted a container, it executes this script in a containercontext.</p> <p style="margin-left:11%;"><i>CTID</i><b>.stop</b></p> <p style="margin-left:22%;">Right before <b>vzctl</b> hasstopped a container, it executes this script in a containercontext.</p> <p style="margin-left:11%;"><b>vps.umount</b>,<i>CTID</i><b>.umount</b></p> <p style="margin-left:22%;">Global and per-CT umountscripts which are executed for a container before it isunmounted. Scripts are executed in the host system context,while a CT is mounted. Global script, if exists, is executedfirst.</p> <p style="margin-left:11%;"><b>vps.postumount</b>,<i>CTID</i><b>.postumount</b></p> <p style="margin-left:22%;">Global and per-CT umountscripts which are executed for a container right after it isunmounted. Otherwise they are the same as <b>.umount</b>scripts.</p> <p style="margin-left:11%; margin-top: 1em">The environmentpassed to all the <b>*mount</b> scripts is the standardenvironment of the parent (i.e. <b>vzctl</b>) with twoadditional variables: <b>$VEID</b> and <b>$VE_CONFFILE</b>.The first one holds the ID of the container, and the secondone holds the full path to the container configuration file.If the script needs to get other CT configurationparameters, such as <b>$VE_ROOT</b>, it needs to get thosefrom global and per-CT configuration files.</p> <p style="margin-left:11%; margin-top: 1em">Here is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container(s). Script name can eitherbe <b>/etc/vz/conf/vps.mount</b> or<b>/etc/vz/conf/</b><i>CTID</i><b>.mount</b>.</p> <pre style="margin-left:11%; margin-top: 1em"> # If one of these files does not exist then something # is really broken [ -f /etc/vz/vz.conf ] || exit 1 [ -f $VE_CONFFILE ] || exit 1 # Source both files. Note the order is important. . /etc/vz/vz.conf . $VE_CONFFILE SRC=/mnt/disk DST=/mnt/disk mount -n -t simfs $SRC ${VE_ROOT}${DST} -o $SRC</pre> == EXIT STATUS == <p style="margin-left:11%; margin-top: 1em">Returns 0 uponsuccess, or an appropriate error code in case of anerror:</p> <table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>1</p></td><td width="7%"></td><td width="78%"> <p>Failed to set a UBC parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>2</p></td><td width="7%"></td><td width="78%"> <p>Failed to set a fair scheduler parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>3</p></td><td width="7%"></td><td width="78%"> <p>Generic system error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>5</p></td><td width="7%"></td><td width="78%"> <p>The running kernel is not an OpenVZ kernel (or someOpenVZ modules are not loaded)</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>6</p></td><td width="7%"></td><td width="78%"> <p>Not enough system resources</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>7</p></td><td width="7%"></td><td width="78%"> <p><b>ENV_CREATE</b> ioctl failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>8</p></td><td width="7%"></td><td width="78%"> <p>Command executed by <b>vzctl exec</b> returned non-zeroexit code</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>9</p></td><td width="7%"></td><td width="78%"> <p>Container is locked by another <b>vzctl</b>invocation</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>10</p></td><td width="7%"></td><td width="78%"> <p>Global OpenVZ configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]] notfound</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>11</p></td><td width="7%"></td><td width="78%"> <p>A vzctl helper script file not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>12</p></td><td width="7%"></td><td width="78%"> <p>Permission denied</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>13</p></td><td width="7%"></td><td width="78%"> <p>Capability setting failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>14</p></td><td width="7%"></td><td width="78%"> <p>Container configuration file [[Man/ctid.conf.5|<b>ctid.conf</b>(5)]] notfound</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>15</p></td><td width="7%"></td><td width="78%"> <p>Timeout on <b>vzctl exec</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>16</p></td><td width="7%"></td><td width="78%"> <p>Error during <b>vzctl suspend</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>17</p></td><td width="7%"></td><td width="78%"> <p>Error during <b>vzctl resume</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>18</p></td><td width="7%"></td><td width="78%"> <p>Error from <b>setluid()</b> syscall</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>20</p></td><td width="7%"></td><td width="78%"> <p>Invalid command line parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>21</p></td><td width="7%"></td><td width="78%"> <p>Invalid value for command line parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>22</p></td><td width="7%"></td><td width="78%"> <p>Container root directory (<b>VE_ROOT</b>) not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>23</p></td><td width="7%"></td><td width="78%"> <p>Container private directory (<b>VE_PRIVATE</b>) notset</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>24</p></td><td width="7%"></td><td width="78%"> <p>Container template directory (<b>TEMPLATE</b>) notset</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>28</p></td><td width="7%"></td><td width="78%"> <p>Not all required UBC parameters are set, unable to startcontainer</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>29</p></td><td width="7%"></td><td width="78%"> <p>OS template is not specified, unable to createcontainer</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>31</p></td><td width="7%"></td><td width="78%"> <p>Container not running</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>32</p></td><td width="7%"></td><td width="78%"> <p>Container already running</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>33</p></td><td width="7%"></td><td width="78%"> <p>Unable to stop container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>34</p></td><td width="7%"></td><td width="78%"> <p>Unable to add IP address to container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>40</p></td><td width="7%"></td><td width="78%"> <p>Container not mounted</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>41</p></td><td width="7%"></td><td width="78%"> <p>Container already mounted</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>43</p></td><td width="7%"></td><td width="78%"> <p>Container private area not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>44</p></td><td width="7%"></td><td width="78%"> <p>Container private area already exists</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>46</p></td><td width="7%"></td><td width="78%"> <p>Not enough disk space</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>47</p></td><td width="7%"></td><td width="78%"> <p>Bad/broken container (<b>/sbin/init</b> or<b>/bin/sh</b> not found)</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>48</p></td><td width="7%"></td><td width="78%"> <p>Unable to create a new container private area</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>49</p></td><td width="7%"></td><td width="78%"> <p>Unable to create a new container root area</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>50</p></td><td width="7%"></td><td width="78%"> <p>Unable to mount container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>51</p></td><td width="7%"></td><td width="78%"> <p>Unable to unmount container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>52</p></td><td width="7%"></td><td width="78%"> <p>Unable to delete a container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>53</p></td><td width="7%"></td><td width="78%"> <p>Container private area not exist</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>60</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota on</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>61</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota init</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>62</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota setlimit</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>63</p></td><td width="7%"></td><td width="78%"> <p>Parameter <b>DISKSPACE</b> not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>64</p></td><td width="7%"></td><td width="78%"> <p>Parameter <b>DISKINODES</b> not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>65</p></td><td width="7%"></td><td width="78%"> <p>Error setting in-container disk quotas</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>66</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota off</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>67</p></td><td width="7%"></td><td width="78%"> <p>ugid quota not initialized</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>71</p></td><td width="7%"></td><td width="78%"> <p>Incorrect IP address format</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>74</p></td><td width="7%"></td><td width="78%"> <p>Error changing password</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>78</p></td><td width="7%"></td><td width="78%"> <p>IP address already in use</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>79</p></td><td width="7%"></td><td width="78%"> <p>Container action script returned an error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>82</p></td><td width="7%"></td><td width="78%"> <p>Config file copying error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>86</p></td><td width="7%"></td><td width="78%"> <p>Error setting devices (<b>--devices</b> or<b>--devnodes</b>)</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>89</p></td><td width="7%"></td><td width="78%"> <p>IP address not available</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>91</p></td><td width="7%"></td><td width="78%"> <p>OS template not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>99</p></td><td width="7%"></td><td width="78%"> <p>Ploop is not supported by either the running kernel orvzctl.</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>100</p></td><td width="7%"></td><td width="78%"> <p>Unable to find container IP address</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>104</p></td><td width="7%"></td><td width="78%"> <p><b>VE_NETDEV</b> ioctl error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>105</p></td><td width="7%"></td><td width="78%"> <p>Container start disabled</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>106</p></td><td width="7%"></td><td width="78%"> <p>Unable to set iptables on a running container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>107</p></td><td width="7%"></td><td width="78%"> <p>Distribution-specific configuration file not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>109</p></td><td width="7%"></td><td width="78%"> <p>Unable to apply a config</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>129</p></td><td width="7%"></td><td width="78%"> <p>Unable to set meminfo parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>130</p></td><td width="7%"></td><td width="78%"> <p>Error setting veth interface</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>131</p></td><td width="7%"></td><td width="78%"> <p>Error setting container name</p></td></tr><tr valign="top" align="left"><td width="11%"></td>
<td width="4%">
<p>78133</p></td>
<td width="7%"></td>
<td width="78%">
<p>IP address already in useWaiting for container start failed</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>79139</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container action script returned an errorError saving container configuration file</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>82148</p></td>
<td width="7%"></td>
<td width="78%">
<p>Config file copying error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>86</p></td><td width="7%"></td><td width="78%"> <p>Error setting devices container IO parameters (<b>--devices</b> or<b>--devnodes</b>ioprio)</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>89</p></td><td width="7%"></td><td width="78%"> <p>IP address not available</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>91</p></td><td width="7%"></td><td width="78%"> <p>OS template not found</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>100150</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to find container IP addressPloop image file not found</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>104151</p></td>
<td width="7%"></td>
<td width="78%">
<p><b>VE_NETDEV</b> ioctl errorError creating ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>105152</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container start disabledError mounting ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>106153</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to set iptables on a running containerError unmounting ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>107154</p></td>
<td width="7%"></td>
<td width="78%">
<p>Distribution-specific configuration file not foundError resizing ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>109155</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable Error converting container to apply a configploop layout</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>129156</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to set meminfo parameterError creating ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>130157</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting veth interfacemerging ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>131158</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting container namedeleting ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>133159</p></td>
<td width="7%"></td>
<td width="78%">
<p>Waiting for container start failedError switching ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>139166</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error saving container configuration filecompacting ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>148167</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting container IO parameters (ioprio)listing ploop snapsots</p></td></tr>
</table>
== FILES ==
<p pre style="margin-left:11%; margin-top: 1em">/etc/vz/vz.conf<br>/etc/vz/conf/<i>CTID</i>.conf <br>/etc/vz/conf/vps.{premount,mount,umount,postumount} <br> 
/etc/vz/conf/<i>CTID</i>.{premount,mount,start,stop,umount,postumount}
<br>/proc/vz/veinfo <br>/proc/vz/vzquota <br>/proc/user_beancounters <br>/proc/bc/* <br>/proc/fairsched</ppre>
== SEE ALSO ==
[[Man/vzifup-post.8|<b>vzifup-post</b>(8)]], [[Man/vzlist.8|<b>vzlist</b>(8)]],
[[Man/vzmemcheck.8|<b>vzmemcheck</b>(8)]], [[Man/vzmigrate.8|<b>vzmigrate</b>(8)]], [[Man/vzpid.8|<b>vzpid</b>(8)]],
[[Man/vzquota.8|<b>vzquota</b>(8)]], [[Man/vzsplit.8|<b>vzsplit</b>(8)]], [[Man/vzubc.8|<b>vzubc</b>(8)]],
<b>[[UBC]]</b>.</p>
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2000-20112013, Parallels, Inc. Licensed under GNU GPL.</p>
2,253
edits

Navigation menu