Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Man/vzctl.8

16,263 bytes added, 18:21, 23 April 2015
Automated import of articles *** existing text overwritten ***
<p style="margin-top: 1em">[<i>flags</i>] <b>create</b>
<i>CTID --parameter value </i> [...]</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<p>[<i>flags</i>] <b>start</b> <i>CTID</i> [<b>--wait</b>]
[<b>--force</b>] [<b>--skip-fsck</b>][<b>--skip-remount</b>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>stop</b> <i>CTID</i>[<b>--fast</b>][<b>--fastskip-umount</b>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<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="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>chkpntsuspend</b> | <b>restoreresume</b><i>CTID</i> [<b>--dumpfile&nbsp;</b><i>name</i>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="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="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>snapshot-switch</b> <i>CTID</i>[<b>--skip-resume</b> |<b>--must-resume</b>][<b>snapshot-delete -skip-config</b>] <b>--id</b> <i>uuid</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>snapshot-listdelete</b> <i>CTID</i><b>--id</b> <i>uuid</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>setsnapshot-mount</b> <i>CTID --parameter value[...]</i> [<b>--saveid</b>] [<bi>--forceuuid</bi>][<b>--setmode&nbsp;restarttarget</b>|<bi>ignoredir</bi>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>destroy</b> | <b>delete</b> |<b>mount</b> | <b>snapshot-umount</b> | <bi>statusCTID</bi> |<b>quotaon</b> | <b>quotaoff</b> | <b>quotainit</b> |<b>console--id</b> <i>CTIDuuid</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>convertsnapshot-list</b> <i>CTID</i>[<b>--layout&nbsp;ploopH</b>] [<b>:-o</b>{<bi>field</i>[,<i>expandedfield</bi>|...][<b>plain--id</b>|<bi>rawuuid</bi>}]]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>execset</b> | <i>CTID --parameter value</i>[...] [<b>exec2--save</b> ] [<b>--force<i/b>CTID]command[<b>--setmode&nbsp;restart</ib> [|<ib>argignore</ib> ...]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>enterset</b> <i>CTID</i>[<b>--exec&nbsp;reset_ub</b><i>command&nbsp;</i>[<i>arg&nbsp;</i>...]]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>runscriptdestroy</b> | <b>delete</b> |<b>mount</b> | <b>umount</b> | <b>status</b> |<b>quotaon</b> | <b>quotaoff</b> | <b>quotainit</b><i>CTID script</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>--helpconsole</b> | <bi>CTID</i>[<i>--versionttynum</bi>]</p></td></tr><tr valign="top" align="left"><td width="11%"></tabletd><td width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width= DESCRIPTION =="80%">
<p style="margin>[<i>flags</i>] <b>convert</b> <i>CTID</i>[<b>--left:11%layout&nbsp; margin-topploop</b>[<b>: 1em"</b>{<b>expanded</b>|<b>plain</b>Utility|<b>vzctlraw</b> runs on the host system (otherwise known as}]]</p> </td></tr>Hardware Node, or HN) and performs direct manipulations with<tr valign="top" align="left">containers (CTs).<td width="11%"></ptd><td width="7%">
<p style="margin-left:11%; margin-top: 1em">Containers canbe referred to by either numeric <ib>vzctl</b></p>CTID</itd> or by name (see<btd width="2%">--name</btd> option). Note that CT ID &lt;= 100 arereserved for OpenVZ internal purposes.</ptd width="80%">
<p>[<i>flags</i>] <b>compact</b> <i>CTID</i></p></td></tr><tr valign="top" align= OPTIONS "left"><td width="11%"></td><td width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width== Flags ==="80%">
<p style="margin-top: 1em">These [<i>flags come before a</i>] <b>exec</b> | <b>exec2</b> <i>CTIDcommand, and can be used with any command</i> [<i>arg</i> ... They affect]</p></td></tr>logging to console (terminal) only, and do not affect<tr valign="top" align="left">logging to a log file.<td width="11%"></ptd><td width="7%">
<p style="margin-left:11%;"><b>--quietvzctl</b></p></td><td width="2%"></td><td 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%;">Disables output. Note that</td>scripts run by vzctl are still able to produce someoutput.</ptd width="7%">
<p style="margin-left:11%;"><b>--verbosevzctl</b></p></td><td width="2%"></td><td width="80%">
<p style="margin-left:17%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of [<bi>VERBOSEflags</bi> parameter in theglobal configuration file [[Man/vz.conf.5|] <b>vz.confrunscript</b>(5)]], or to <bi>0CTID script</bi>if not set by <b/p>VERBOSE</btd> parameter.</p> === Setting container parameters === <table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="47%">
<p style="margin-top: 1em"><b>setvzctl</b></p></td>
<td width="2%"></td>
<td width="8380%"> <p><b>--help</b> | <b>--version</b></p></td></tr></table> == DESCRIPTION ==
<p style="margin-left:11%; margin-top: 1em"><i>CTID</i>Utility[<b>--onboot&nbsp;yesvzctl</b>|<b>no</b>]runs on the host system (otherwise known as[<b>--bootorder&nbsp;</b><i>number</i>]Hardware Node, or HN) and performs direct manipulations with[<b>--root&nbsp;containers (CTs).</bp><i>path</i>][<b>--private&nbsp;</b><i>path</i>][<b>-p style="margin-userpasswd&nbsp;</b><i>user</i>left:<i>pass</i>][<b>--disabled&nbsp11%;yes</b>|<b>no</b>][<b>margin--name&nbsp;</btop: 1em"><i>name</i>]Containers can[<b>--description&nbsp;</b>be referred to by either numeric <i>string</i>][<b>--ipadd&nbsp;</b><i>addr</i>][<b>--ipdel&nbsp;</b><i>addr</i>|<b>all</b>][<b>--hostname&nbsp;CTID</b><i>or by name</i>][<b>--nameserver&nbsp;</b><i>addr</i>](see[<b>--searchdomain&nbsp;</b><i>name</i>][<b>--netif_add&nbsp;</b><i>dev</i>[,<i>params</i>.option)..]][<b>--netif_delNote that CT ID &nbsplt;</b><i>dev</i>|<b>all</b>]= 100 are[<b>--ifname</b> <i>dev</i>reserved for OpenVZ internal purposes. A numeric ID should[not be more than <b>--mac&nbsp;2147483644</b><i>hwaddr.</ip>][<b>--host_ifname&nbsp;</b><i>dev</i>][<b>--host_mac&nbsp;</b><i>hwaddr</i>]== OPTIONS ==[<b>--bridge&nbsp;</b><i>name</i>][<b>--mac_filter&nbsp;on</b>|<b>off</b>]]=== Flags ===[<b>--numproc&nbsp;</b><i>items</i>][<b>p style="margin--numtcpsock&nbsp;</b><i>items</itop: 1em">]These flags come before a[<b>--numothersock&nbsp;</b><i>items</i>]command, and can be used with any command. They affect[<b>--vmguarpages&nbsp;</b><i>pages</i>]logging to console (terminal) only, and do not affect[<b>--kmemsize&nbsp;logging to a log file.</bp><i>bytes</i>][<b>--tcpsndbuf&nbsp;</b><i>bytes</i>][<b>p style="margin--tcprcvbuf&nbspleft:11%;</b"><i>bytes</i>][<b>--othersockbuf&nbsp;quiet</b><i>bytes</ip>][<b>--dgramrcvbuf&nbsp;</b><i>bytes</i>][<b>p style="margin--oomguarpages&nbspleft:17%;</b"><i>pages</i>]Disables output. Note that[<b>--lockedpages&nbsp;</b><i>pages</i>]scripts run by vzctl are still able to produce some[<b>--privvmpages&nbsp;output.</bp><i>pages</i>][<b>--shmpages&nbsp;</b><i>pages</i>][<b>p style="margin--numfile&nbspleft:11%;</b><i>items</i">][<b>--numflock&nbsp;verbose</b><i>items</ip>][<b>--numpty&nbsp;</b><i>items</i>][<b>p style="margin--numsiginfo&nbspleft:17%;</b"><i>items</i>]Increments logging level up[<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>]from the default. Can be used multiple times. Default value[<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>all</b>][<b>--meminfo&nbsp;none</b>|<i>mode</i>:<i>is set to the value</i>][of <b>--iptables&nbsp;VERBOSE</b><i>name</i>]parameter in theglobal configuration file [<b>--netdev_add&nbsp;</b><i>ifname</i>][<b>--netdev_del&nbsp;<Man/b><i>ifname</i>][<b>--diskquota&nbsp;yes</b>vz.conf.5|<b>no</b>][<b>--diskspace&nbsp;vz.conf</b><i>num</i>(5)][<b>--diskinodes&nbsp;</b><i>num</i>][, or to <b>--quotatime&nbsp;0</b><i>seconds</i>][if not set by <b>--quotaugidlimit&nbsp;VERBOSE</b><i>numparameter.</ip>][<b>--noatime&nbsp;yes</b>|<b>no</b>][<b>--capability&nbsp;</b><i>capname</i>:<b>on</b>|<b>off</b>]=== Setting container parameters ===[<b>--devnodes&nbsp;</b><i>param</i>][<b>--devices&nbsp;</b><i>param</i>]table width="100%" border="0" rules="none" frame="void"[<b>--pci_add&nbsp;</b><i>dev</i>][<b>--pci_del&nbsp;</b><i>dev</i>][<b>--features&nbsp;</b><i>param</i>:<b>on</b>|<b>off</b>][<b>--applyconfig&nbsp;</b><i>name</i>][<b>--applyconfig_map&nbsp;</b><i>group</i>][<b>--ioprio&nbsp;</b><i>num</i>] [<b>--save</b>][<b>--force</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>]</p> </td></tr cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
 <p style="margin-top: 1em"><b>set</b></p></td>
<td width="2%"></td>
<td width="83%">
<pstyle="margin-top: 1em"><i>This command sets various container parameters.CTID</pi>[<b>--onboot&nbsp;yes</tdb>|<b>no</trb>][<b>--bootorder&nbsp;</b><i>number</tablei>][<b>--root&nbsp;</b><i>path</i>][<p style="marginb>--left:17%private&nbsp; margin</b><i>path</i>][<b>--top: 1em"mount_opts&nbsp;</b><i>options</i>If a][<b>--saveuserpasswd&nbsp;</b> flag is given, parameters are saved in<i>user</i>:<i>pass</i>]container configuration file [[Man<b>--disabled&nbsp;yes</ctid.conf.5b>|<b>ctid.confno</b>(5)][<b>--name&nbsp;</b><i>name</i>]. Use[<b>--forcedescription&nbsp;</b> to save the parameters even if the current<i>string</i>]kernel doesn[<b>--ostemplate&rsquonbsp;t support OpenVZ.</pb><i>string</i>][<b>--stop-timeout&nbsp;</b><i>seconds</i>][<p style="marginb>--left:17%ipadd&nbsp; margin</b><i>addr</i>][<b>--top: 1em"ipdel&nbsp;</b><i>addr</i>|<b>all</b>If the]container is currently running, [<b>vzctl--hostname&nbsp;</b> applies these<i>name</i>]parameters to the container.[<b>--nameserver&nbsp;</b><i>addr</pi>][<b>--searchdomain&nbsp;</b><i>name</i>][<p style="marginb>--left:17%netif_add&nbsp; margin</b><i>dev</i>[,<i>params</i>...]][<b>--top: 1em"netif_del&nbsp;</b><i>dev</i>|<b>all</b>Note that a few]parameters can only be applied by restarting the container.[<b>--ifname</b> <i>dev</i>By default, [<b>vzctl--mac&nbsp;</b> warns if such parameters are<i>hwaddr</i>]present and a container is running. Use [<b>--setmodehost_ifname&nbsp;</b><i>dev</i>]restart[<b>--host_mac&nbsp;</b> to restart a container in such a case, or<i>hwaddr</i>][<b>--setmode ignorebridge&nbsp;</b> to suppress the above mentioned<i>name</i>]warning.[<b>--mac_filter&nbsp;on</b>|<b>off</pb>]][<b>--numproc&nbsp;</b><i>items</i>][<p style="marginb>--left:17%numtcpsock&nbsp; margin</b><i>items</i>][<b>--top: 1em"numothersock&nbsp;</b><i>items</i>The following]parameters can be used with [<b>set--vmguarpages&nbsp;</b> command.<i>pages</pi>][<b>--kmemsize&nbsp;</b><i>bytes</i>]==== Miscellaneous ====[<b>--tcpsndbuf&nbsp;</b><i>bytes</i>][<b>--tcprcvbuf&nbsp;</b><i>bytes</i>][<p style="marginb>--left:11%othersockbuf&nbsp;"</b><i>bytes</i>][<b>--onboot yesdgramrcvbuf&nbsp;</b> |<i>bytes</i>][<b>no--oomguarpages&nbsp;</b><i>pages</pi>][<b>--lockedpages&nbsp;</b><i>pages</i>][<p style="marginb>--left:17%privvmpages&nbsp;"</b><i>pages</i>Sets whether the container will]be started during system boot. The container will not be[<b>--shmpages&nbsp;</b><i>pages</i>]auto[<b>--started unless this parameter is set to numfile&nbsp;</b><i>items</i>][<b>yes--numflock&nbsp;</b>.<i>items</pi>][<b>--numpty&nbsp;</b><i>items</i>][<p style="marginb>--left:11%numsiginfo&nbsp;"</b><i>items</i>][<b>--bootorderdcachesize&nbsp;</b><i>bytes</i>][<b>--numiptent&nbsp;</b><i>num</i>number][<b>--physpages&nbsp;</b><i>pages</pi>][<b>--swappages&nbsp;</b><i>pages</i>][<p style="marginb>--left:17%ram&nbsp;"</b><i>bytes</i>Sets the boot order priority]for this CT. The higher the [<b>--swap&nbsp;</b><i>numberbytes</i> is, the earlier in]the boot process this container starts. By default this[<b>--vm_overcommit&nbsp;</b><i>float</i>]parameter is unset, which is considered to be the lowest[<b>--cpuunits&nbsp;</b><i>num</i>]priority, so containers with unset [<b>bootorder--cpulimit&nbsp;</b> will<i>num</i>]start last.[<b>--cpus&nbsp;</b><i>num</pi>][<b>--cpumask&nbsp;</b><i>cpus</i>|<b>auto</b>|<b>all</b>][<p style="marginb>--left:11%nodemask&nbsp;"</b><i>nodes</i>|<b>all</b>][<b>--rootmeminfo&nbsp;none</b> |<i>pathmode</i>:<i>value</pi>][<b>--iptables&nbsp;</b><i>name</i>[<b>,</b>...]][<p style="marginb>--left:17%netfilter&nbsp;"disabled</b>|<b>stateless</b>|<b>stateful</b>|<b>full</b>Sets the path to root directory]([<b>VE_ROOT--netdev_add&nbsp;</b>) for this container. This is essentially a<i>ifname</i>]mount point for container[<b>--netdev_del&rsquonbsp;s root directory. Argument</b><i>ifname</i>]can contain literal string [<b>--diskquota&nbsp;yes</b>|<b>$VEIDno</b>, which will be]substituted with the numeric CT ID.[<b>--diskspace&nbsp;</b><i>num</pi>][<b>--diskinodes&nbsp;</b><i>num</i>][<p style="marginb>--left:11%quotatime&nbsp;"</b><i>seconds</i>][<b>--privatequotaugidlimit&nbsp;</b><i>num</i>][<b>--capability&nbsp;</b><i>pathcapname</i>:<b>on</pb>|<b>off</b>[<b>,</b>...]][<b>--devnodes&nbsp;</b><i>param</i>][<p style="marginb>--left:17%devices&nbsp;"</b><i>param</i>Sets the path to private]directory ([<b>VE_PRIVATE--pci_add&nbsp;</b>) for this container. This is a<i>dev</i>]directory in which all the container[<b>--pci_del&rsquonbsp;s files are</b><i>dev</i>]stored. Argument can contain literal string [<b>--features&nbsp;</b><i>name</i>:<b>on</b>|<b>$VEIDoff</b>[<b>,</b>...]]which will be substituted with the numeric CT ID.[<b>--applyconfig&nbsp;</b><i>name</pi>][<b>--applyconfig_map&nbsp;</b><i>group</i>][<p style="marginb>--left:11%ioprio&nbsp;"</b><i>num</i>][<b>--userpasswdiolimit&nbsp;</b><i>usermbps</i>:][<b>--iopslimit&nbsp;</b><i>passwordiops</i>] [<b>--save</pb>][<b>--force</b>] [<b>--reset_ub</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>]</p style> </td></tr><tr valign="top" align="margin-left:17"><td width="11%"></td><td width="4%"></td><td width="2%"></td><td width="83%;">Sets password for the givenuser in a <p>This command sets various container, creating parameters. If the user if it does notexists. Note that this option container is not saved in configurationfile at all (so currently running, <b>--savevzctl</b> flag is useless), it isapplies theseapplied parameters to the container (by modifying its . The following options can beused with <b>set</etcb> command.</passwd andp></etctd></shadow files).tr></ptable>
<p style="margin-left:17%; margin-top: 1em">In casecontainer root filesystem is not mounted, it isautomatically mounted, then all the appropriate file changesare applied, then it is unmounted.</p>=== Flags ====
<p style="margin-left:1711%; margin"><b>-top: 1em"-save</b>Note thatcontainer should be created before using this option.</p>
<p style="margin-left:1117%;"><b>--disabled yes<If this flag is given,parameters are saved in container configuration file[[Man/b> ctid.conf.5|<b>noctid.conf</b>(5)]].</p>
<p style="margin-left:1711%;">Disable container start. Toforce the start of a disabled container, use <b>vzctl start--force</b>.</p>
<p style="margin-left:1117%;">If this flag is given togetherwith <b>--namesave</b> , parameters are saved even if the currentkernel doesn&rsquo;t support OpenVZ. Note this flag does notmake sense without <b>--save</b>, so <ib>name--save</ib>isrequired.</p>
<p style="margin-left:1711%;">Add a name for a container. The<i>name</i> can later be used in subsequent calls to<b>vzctl--reset_ub</b> in place of <i>CTID</i>.</p>
<p style="margin-left:1117%;">If this flag is given,<b>--descriptionvzctl</b>applies all User Beancounter parameters from<the configuration file to a running container. This ishelpful in case configuration file is modified manually.Please note this flag is exclusive, i>string</i>.e. it can not becombined with any other options or flags.</p>
<p style="margin-left:1711%;">Add a textual description for a<b>--setmode restart</b> |container.<b>ignore</b></p>
<p style==== Networking ===="margin-left:17%;">A 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. Use <b>--setmoderestart</b> together with <b>--save</b> flag to restart acontainer in such a case, or <b>--setmode ignore</b> tosuppress the warning.</p>
<p style="margin-left:11%;"><b>--ipadd</b> <i>addr</i></p>=== Miscellaneous ====
<p style="margin-left:1711%;">Adds an IP address <ib>addr--onboot yes</ib>|to a given container. Address can optionally have a netmaskspecified in the CIDR notation (e.g. <b>10.1.2.3/25no</b>).Note that this option is incremental, so <i>addr</i> areadded to already existing ones.</p>
<p style="margin-left:1117%;">Sets whether the container willbe started during system boot. The container will be startedon boot by <b>--ipdelvz</b> initscript if either this parameter isset to <ib>addryes</ib> |, or the container was running just beforelast reboot, and this parameter is not set to <b>allno</b>.Default value is unset, meaning the container will bestarted if it was running before the last reboot.</p>
<p style="margin-left:1711%;">Removes IP address <ib>addr--bootorder</ib>from a container. If you want to remove all the addresses,use <bi>--ipdel allnumber</bi>.</p>
<p style="margin-left:17%;">Sets the boot order priorityfor this CT. The higher the <i>number</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</b> willstart last.</p> <p style="margin-left:11%;"><b>--hostnameroot</b><i>namepath</i></p>
<p style="margin-left:17%;">Sets the path to root directory(<b>VE_ROOT</b>) for this container hostname.This is essentially amount point for container&rsquo;s root directory. Argumentcan contain literal string <b>vzctl$VEID</b> writes it to , which will besubstituted with the appropriate file inside acontainer (distribution-dependent)numeric CT ID.</p>
<p style="margin-left:11%;"><b>--nameserverprivate</b><i>addrpath</i></p>
<p style="margin-left:17%;">Sets DNS server IP address fora container. If you want the path to set several nameservers, youprivateshould do it at once, so use directory (<b>--nameserverVE_PRIVATE</b> option) for this container. This is amultiple times directory in one call to <b>vzctl</b>, as which all the namecontainer&rsquo;s files areserver values set in previous calls to stored. Argument can contain literal string <b>vzctl$VEID</b> are,overwrittenwhich will be substituted with the numeric CT ID.</p>
<p style="margin-left:11%;"><b>--searchdomainmount_opts</b><i>nameoption</i>[<b>,</b><i>option</i>...]</p>
<p style="margin-left:17%;">Sets DNS search domains additional mount optionsfor acontainerfile system. If you want to set several search domains, youshould do it at once, so use Only applicable for <b>--searchdomainploop</b> optionmultiple times in one call to <b>vzctl</b>layout, as all thesearch domain values set in previous calls to <b>vzctl</b>are overwrittenignored otherwise.</p>
<p style="margin-left:11%;"><b>--netif_adduserpasswd</b><i>ifname[user</i>,:<i>mac</i>,<i>host_ifname</i>,<i>host_mac</i>,<i>bridge]password</i></p>
<p style="margin-left:17%;">Adds a virtual Ethernet deviceSets password for the given(veth) to user in a given container, creating the user if it does notexists. Here <i>ifname</i> Note that this option is thenot saved in configurationEthernet device name in the container, file at all (so <ib>mac--save</ib> flag is its MACaddressuseless), <i>host_ifname</i> it is the Ethernet device name onapplied directly to the hostcontainer, and <i>host_mac</i> is its MAC address. MACby runningaddresses should be in distribution-specific programs inside the format like XX:XX:XX:XX:XX:XXcontainer.<i>bridge</i> It is an optional parameter which can be used incustom network start scripts to automatically add theinterface not recommended to a bridge. All parameters except <i>ifname</i>are optional and are automatically generated if notcombine this option with any otherspecifiedoptions.</p>
<p style="margin-left:1117%;margin-top: 1em"><b>--netif_del</b>In casecontainer was not running, it is automatically started then<i>dev_name</i> | <b>all</b>the appropriate changes are applied, then it isstopped.</p>
<p style="margin-left:17%;margin-top: 1em">Removes virtual Ethernet deviceNote thatfrom a container. If you want to remove all devices, use<b>all</b>should be created before using this option.</p>
<p style==== veth interface configuration ===="margin-left:11%;"><b>--disabled yes</b> |<b>no</b></p>
<p style="margin-left:1117%; margin-top: 1em">The followingoptions can be used to reconfigure the already-createdvirtual Ethernet interfaceDisable container start. To select force the interface toconfigurestart of a disabled container, use <b>vzctl start--ifnameforce</b> <i>name</i> option. <b><br>--mac</b> <i>XX:XX:XX:XX:XX:XX</i></p>
<p style="margin-left:2211%;">MAC address of interface insidea container.<b>--name</b> <i>name</i></p>
<p style="margin-left:1117%;">Add a name for a container. The<i>name</i> can later be used in subsequent calls to<b>--host_ifnamevzctl</b>in place of <i>nameCTID</i>. Note this option cannot be used without <b>--save</b>.</p>
<p style="margin-left:2211%;">interface name for virtual<b>--description</b>interface in the host system.<i>string</i></p>
<p style="margin-left:1117%;"><b>--host_mac</b>Add a textual description for a<i>XX:XX:XX:XX:XX:XX</i>container.</p>
<p style="margin-left:2211%;">MAC address of interface in the<b>--ostemplate</b>host system.<i>string</i></p>
<p style="margin-left:1117%;">Sets a new value of<b>--bridgeOSTEMPLATE</b> parameter in container configuration file[[Man/ctid.conf.5|<b>ctid.conf</b> (5)]]. Requires <ib>name--save</ib>flag. Usefulafter a change/upgrade of a distribution running insidecontainer, as vzctl uses the value of OSTEMPLATE to rundistribution-specific scripts.</p>
<p style="margin-left:2211%;">Bridge name. Custom network<b>--stop-timeout</b>start scripts can use this value to automatically add theinterface to a bridge.<i>seconds</i></p>
<p style="margin-left:1117%;">Sets a time to wait forcontainer to stop on <b>--mac_filter onvzctl stop</b> |before forciblykilling it, in seconds. Note this option can not be usedwithout <b>off--save</b>flag.</p>
<p style="margin-left:2217%;margin-top: 1em">Enables/disables MAC addressfiltering for the Container veth device and the possibilitySpecial valueof configuring the MAC address of this device from insidethe 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); 0<br/b>&bull; it is impossible means to modify the veth MAC address frominside the Containeruse compiled-in default.</p>
<p style="margin-left:22%; margin-top: 1em">By default,this functionality is enabled for all veth devices existinginside the Container.</p>=== Networking ====
<p style==== VSwap limits ===="margin-left:11%;"><b>--ipadd</b> <i>addr</i></p>
<p style="margin-left:1117%; margin-top: 1em">The followingAdds an IP address <i>addr</i>options sets memory and swap limits for VSwap-enabledto a given container. Address can optionally have a netmaskkernels specified in the CIDR notation (kernel version 042stab042 or greatere.g. <b>10.1.2.3/25</b>).Note that this option is incremental, so <i>addr</i> areadded to already existing ones.</p>
<p style="margin-left:11%; margin"><b>-top: 1em"-ipdel</b> <i>addr</i>Argument is in|bytes, unless otherwise specified by an optional suffix.Available suffixes are:<b>all</b></p>
<p style="margin-left:1117%; margin-top: 1em">&bull;Removes IP address <bi>Taddr</b>, <b>t</b> - terabytes; <bri>&bull; <b>G</b>from a container. If you want to remove all the addresses, <b>g</b> - gigabytes; <br>&bull; use <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 (arch-specific,usually 4KB); <br>&bull; <b>Bipdel all</b>, <b>b</b> - bytes. <b><br>--ram</b> <i>bytes</i></p>
<p style="margin-left:2211%;">Sets physical memory (RAM)available to a container. Actually, the option is a shortcutfor setting <b>--physpageshostname</b> limit (the barrier is set to0).<i>name</i></p>
<p style="margin-left:1117%;">Sets container hostname.<b>--swapvzctl</b> <i>bytes</i>writes it to the appropriate file inside acontainer (distribution-dependent).</p>
<p style="margin-left:2211%;">Set swap space available to acontainer. Actually, the option is a shortcut for setting<b>--swappagesnameserver</b> limit (the barrier is set to 0).<i>addr</i></p>
<p style="margin-left:1117%; margin-top: 1em">Here is anSets DNS server IP address forexample of setting a container 777 . If you want to set several nameservers, youshould do it at once, so use <b>--nameserver</b> optionmultiple times in one call to have 512 megabytes of<b>vzctl</b>, as all the nameserver values set in previous calls to <b>vzctl</b> areRAM and 1 gigabyte of swap:overwritten.</p>
<pre p style="margin-left:1117%;margin-top: 1em"> vzctl set 777 A special valueof <b>inherit</b> can be used to auto--ram 512M --swap 1G --savepropagate nameservervalue(s) from the host system&rsquo;s<b>/etc/resolv.conf</b> file.</prep>
<p style==== User Beancounter limits ===="margin-left:11%;"><b>--searchdomain</b><i>name</i></p>
<p style="margin-left:1117%; margin">Sets DNS search domains for acontainer. If you want to set several search domains, youshould do it at once, so use <b>--top: 1em"searchdomain</b> optionmultiple times in one call to <b>vzctl</b>The following, as all theoptions sets barrier and limit for various usersearch domain values set in previous calls to <b>vzctl</b>beancountersare overwritten.</p>
<p style="margin-left:1117%; margin-top: 1em">Note that forA special valueVSwap-enabled kernels (version 042stab042 or greater) theselimits are optional, you must only set of <b>--raminherit</b> andcan be used to auto-propagate searchdomain value(s) from the host system&rsquo;s<b>--swap/etc/resolv.conf</b> (see above). For older kernels, these limitsare obligatoryfile.</p>
<p style="margin-left:11%; margin-top: 1em">Each optionrequires one or two arguments. In case of one argument,<b>vzctl--netif_add</b> sets barrier and limit to the same value. Incase of two colon-separated arguments<i>ifname[</i>, the first is abarrier<i>mac</i>, and the second is a limit. Each argument is eithera number<i>host_ifname</i>, a number with a suffix<i>host_mac</i>, or a special value<bi>unlimitedbridge]</bi>.</p>
<p style="margin-left:1117%; margin-top: 1em">Arguments areAdds a virtual Ethernet device(veth) to a given container. Here <i>ifname</i> is theEthernet device name in itemsthe container, pages or bytes. Note that page size <i>mac</i> isits MACarchitecture-specificaddress, it <i>host_ifname</i> is 4096 bytes the Ethernet device name on x86 the host, and x86_64<i>host_mac</i> is its MAC address. MACplatformsaddresses 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>--netif_del</b><i>dev_name</i> | <b>all</b></p>
<p style="margin-left:1117%; margin-top: 1em">You can alsoRemoves virtual Ethernet devicespecify different suffixes for User Beancounter parameters(except for those which names start with <b>num</b>)from a container. ForexampleIf you want to remove all devices, <b>vzctl set</b> <i>CTID</i> <b>--privvmpagesuse5M:6M</b> should set <b>privvmpagesall</b>&rsquo; barrier to 5megabytes and its limit to 6 megabytes.</p>
<p style="margin-left:11%; margin-top: 1em">Availablesuffixes are:</p>=== veth interface configuration ====
<p style="margin-left:11%; margin-top: 1em">&bull;The following<b>T</b>, <b>t</b> options can be used to reconfigure the already- terabytes; <br>createdvirtual Ethernet interface. To select the interface to&bull; <b>G</b>configure, use <b>g--ifname</b> - gigabytes; <bri>&bull; <b>Mname</b>, <bi>moption. </b> - megabytes; <br>&bull; <b>K--mac</b>, <bi>kXX:XX:XX:XX:XX:XX</bi> - kilobytes; <br/p>&bull; <b>P</b>, <b>p</b> - memory pages (archstyle="margin-specific,usually 4KB)left:22%; <br">MAC address of interface inside&bull; <b>B</b>, <b>b</b> - bytesa container.</p>
<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>--numprochost_ifname</b> <i>items</i>[:<i>itemsname</i>]</p>
<p style="margin-left:22%;">Maximum number of processes andinterface name for virtualkernel-level threads. Setting interface in the barrier and the limit todifferent values does not make practical sensehost system.</p>
<p style="margin-left:11%;"><b>--numtcpsockhost_mac</b><i>items</i>[XX:XX:XX:XX:XX:<i>itemsXX</i>]</p>
<p style="margin-left:22%;">Maximum number MAC address of TCP sockets.This parameter limits the number of TCP connections and,thus, the number of clients the server application canhandle interface in parallel. Setting the barrier and the limit todifferent values does not make practical sensehost system.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>--numothersock</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 non<b>-TCPsockets (local sockets, UDP and other types of sockets).Setting the barrier and the limit to different values doesnot make practical sense.-bridge</b> <i>name</i></p>
<p style="margin-left:1122%;"><b>--vmguarpages</b>Bridge name. Custom networkstart scripts can use this value to automatically add the<i>pages</i>[:<i>pages</i>]interface to a bridge.</p>
<p style="margin-left:2211%;">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;<b>--mac_filter on</b> |it should be set to <b>unlimitedoff</b>.</p>
<p style="margin-left:1122%;"><b>--kmemsize<Enables/b>disables MAC address<i>bytes</i>[:<i>bytes</i>]</p>filtering for the Container veth device and the possibility <p style="margin-left:22%;">Maximum amount of kernel memoryconfiguring the MAC address of this device from insideusedthe Container. This parameter If the filtering is related to turned on: <bbr>--numproc</b>. Eachprocess consumes certain amount of kernel memory - 16 KB atleast, 30-50 KB typically. Very large processes may consume&bull; the veth device accepts only those packets that havea bit more. It is important MAC address in their headers corresponding to have a certain safety gapbetween the barrier and the limit that of this parameter: equalbarrier device (excluding all broadcast and limit may lead to the situation where the kernelmulticast packets); <br>will need to kill container&rsquobull;s applications it is impossible to keep modify theveth MAC address from<b>kmemsize</b> usage under inside the limitContainer.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>--tcpsndbuf</b>By default,this functionality is enabled for all veth devices existing<i>bytes</i>[:<i>bytes</i>]inside the Container.</p>
<p style="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>=== VSwap limits ====
<p style="margin-left:11%;margin-top: 1em"><b>The followingoptions sets memory and swap limits for VSwap--tcprcvbuf</b>enabled<i>bytes</i>[:<i>bytes</i>]kernels (kernel version 042stab042 or greater).</p>
<p style="margin-left:2211%;margin-top: 1em">Maximum size of TCP receiveArgument is inbuffers. Barrier should be not less than 64 KBbytes, anddifference between barrier and limit should be equal to ormore than value of <b>numtcpsock</b> multiplied unless otherwise specified by 2an optional suffix.5KB.Available suffixes are:</p>
<p style="margin-left:11%;margin-top: 1em">&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> -othersockbufkilobytes; <br>&bull; <b>P</b>, <b>p</b> - memory pages (arch-specific,usually 4KB); <br>&bull; <b>B</b>, <ib>b</b>- bytes(this is the default).<b><br>--ram</ib>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">Maximum size of other Sets physical memory (non-TCPRAM)socket send buffersavailable to a container. If container&rsquo;s processes needs tosend very large datagramsActually, the barrier should be setoption is a shortcutaccordingly. Increased for setting <b>--physpages</b> limit (the barrier is necessary for highset toperformance of communications through local (UNIX-domain0)sockets.</p>
<p style="margin-left:11%;"><b>--dgramrcvbufswap</b><i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">Maximum size of other Set swap space available to acontainer. Actually, the option is a shortcut for setting<b>--swappages</b> limit (nonthe barrier is set to 0).</p> <p style="margin-left:11%;"><b>--vm_overcommit</b><i>float</i></p> <p style="margin-TCPleft:22%;">Set VM overcommitment value to<i>float</i>. If set, it is used to calculate<b>privmmpages</b> parameter in case it is not setexplicitly (see below). Default value is <b>0</b>, meaningsocket receive buffersunlimited privvmpages. If container&rsquo</p> <p style="margin-left:11%;s processes needsmargin-top: 1em"><b>vzctl</b>checks if running kernel is VSwap capable, and refuses to receive very large datagramsuse these parameters otherwise. This behavior can beoverriden by using <b>--force</b> flag beforeparameters.</p> <p style="margin-left:11%; margin-top: 1em">In VSwap mode, the barrier should be all beancounters other than RAM and swap become optional.Note though that if some optional beancounters are not set,accordingly. The difference between the barrier they are calculated and set by vzctl implicitly, using thelimit is not needed.following formulae:</p>
<p style="margin-left:11%;margin-top: 1em"><b>--&bull;lockedpages.barrier = oomguarpages.barrier = ram</b><i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:2211%;margin-top: 1em">Guarantees against OOM kill.Under this beancounter the kernel accounts the total amountof memory and swap space used by the container<b>&rsquobull;sprocesseslockedpages. The barrier of this parameter is theout-of-memory guarantee. If the <b>limit = oomguarpages</b> 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 <b>= unlimited</b>.</p>
<p style="margin-left:11%;margin-top: 1em"><b>--lockedpages&bull;vmguarpages.barrier = vmguarpages.limit = ram + swap</b><i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:2211%;margin-top: 1em">Maximum number of pagesacquired by <b>mlock&bull;privvmpages.barrier = privvmpages.limit = (ram + swap) *vm_overcommit</b>(2).</p>
<p style="margin-left:11%;margin-top: 1em">(if<b>--privvmpagesvm_overcommit</b>is <ib>pages0</ib>[:or not set,<ib>pagesprivvmpages</ib>]is set to &quot;unlimited&quot;)</p>
<p style="margin-left:2211%;margin-top: 1em">Allows controlling the amountHere is anexample of memory allocated by the applications. For shared (mappedas <b>MAP_SHARED</b>) pages, each setting container really using amemory page is charged for the fraction 777 to have 512 megabytes of the page(depending on the number RAM and 1 gigabyte 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 pre style="margin-left:2211%; 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> vzctl set 777 --ram 512M --swap 1G --vmguarpages</b> guarantee.save</ppre>
<p style="margin-left:11%;"><b>--shmpages</b><i>pages</i>[:<i>pages</i>]</p>=== User Beancounter limits ====
<p style="margin-left:2211%;margin-top: 1em">Maximum IPC SHM segment size.The followingSetting the options sets barrier and the limit to different values doesfor various usernot make practical sensebeancounters.</p>
<p style="margin-left:11%;margin-top: 1em">Note that forVSwap-enabled kernels (version 042stab042 or greater) theselimits are optional, you must only set <b>--numfileram</b>and<ib>items--swap</ib>[:<i>items</i>](see above). For older kernels, these limitsare obligatory.</p>
<p style="margin-left:2211%;margin-top: 1em">Maximum number Each optionrequires one or two arguments. In case of open files.one argument,In most cases the <b>vzctl</b> sets barrier and the limit should be set to thesame value. Setting Incase of two colon-separated arguments, the first is abarrier to , and the second is a limit. Each argument is eithera number, a number with a suffix, or a special value<b>0unlimited</b> effectivelydisables pre-charging optimization for this beancounter inthe kernel, which leads to the held value being precise butcould slightly degrade file open performance.</p>
<p style="margin-left:11%;margin-top: 1em"><b>-Arguments arein items, pages or bytes. Note that page size isarchitecture-numflock</b>specific, it is 4096 bytes on x86 and x86_64<i>items</i>[:<i>items</i>]platforms.</p>
<p style="margin-left:2211%;margin-top: 1em">Maximum number of file locksYou can alsospecify different suffixes for User Beancounter parameters(except for those which names start with <b>num</b>).ForSafety gap example, <b>vzctl set</b> <i>CTID</i> <b>--privvmpages5M:6M</b> should be between set <b>privvmpages</b>&rsquo; barrier to 5megabytes and its limitto 6 megabytes.</p>
<p style="margin-left:11%;margin-top: 1em"><b>--numpty</b>Available<i>items</i>[suffixes are:<i>items</i>]</p>
<p style="margin-left:2211%;margin-top: 1em">Number of pseudo&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> -terminalskilobytes; <br>&bull; <b>P</b>, <b>p</b> - memory pages (PTYarch-specific,usually 4KB); <br>&bull; <b>B</b>, <b>b</b> - bytes. Note </p> <p style="margin-left:11%; margin-top: 1em">You can alsospecify the literal word <b>unlimited</b> in place of anumber. In that in OpenVZ each container 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%;">Maximum number of processes andkernel-level threads. Setting the barrier and the limit todifferent values does not make practical sense.</p> <p style="margin-left:11%;"><b>--numtcpsock</b><i>items</i>[:<i>items</i>]</p> <p style="margin-left:22%;">Maximum number of TCP sockets.This parameter limits the number of TCP connections and,thus, the number of clients the server application can have not morethan 255 PTYshandle in parallel. Setting the barrier and the limit to
different values does not make practical sense.</p>
<p style="margin-left:11%;"><b>--numsiginfonumothersock</b>
<i>items</i>[:<i>items</i>]</p>
<p style="margin-left:22%;">Number Maximum number of siginfo structuresnon-TCPsockets (local sockets, UDP and other types of sockets).
Setting the barrier and the limit to different values does
not make practical sense.</p>
<p style="margin-left:11%;"><b>--dcachesizevmguarpages</b><i>pages</i>[:<i>pages</i>]</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> <p style="margin-left:11%;"><b>--kmemsize</b>
<i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">Maximum size amount ofkernel memoryfilesystem-related caches, such as directory entry and inodecachesused. Exists as a separate This parameter is related to impose a limit<b>--numproc</b>. Eachcausing file operations to sense process consumes certain amount of kernel memory shortage and return- 16 KB atan errno to applicationsleast, protecting from memory shortages30-50 KB typically. Very large processes may consumeduring critical operations that should not faila bit more. Safety It is important to have a certain safety gapshould be between 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<b>kmemsize</b> usage under the limit.</p>
<p style="margin-left:11%;"><b>--numiptenttcpsndbuf</b><i>numbytes</i>[:<i>numbytes</i>]</p>
<p style="margin-left:22%;">Number Maximum size of iptables (netfilter)TCP sendentriesbuffers. Setting the Barrier should be not less than 64 KB, anddifference between barrier and the limit should be equal to differentorvalues does not make practical sensemore than value of <b>numtcpsock</b> multiplied by 2.5KB.</p>
<p style="margin-left:11%;"><b>--physpagestcprcvbuf</b><i>pagesbytes</i>[:<i>pagesbytes</i>]</p>
<p style="margin-left:22%;">On VSwap-enabled kernels, thislimits the amount Maximum size of physical memory (RAM) available to aTCP receivecontainerbuffers. The Barrier should be not less than 64 KB, anddifference between barrier and limit should be set equal to ormore than value of <b>0numtcpsock</b>, and thelimit to a total size of RAM that can be used used multiplied by a2.5containerKB.</p>
<p style="margin-left:2211%; margin-top: 1em">For olderkernels, this is an accounting<b>--only parameter, showing theusage of RAM by this container. Barrier should be set toothersockbuf</b><bi>0bytes</bi>, and limit should be set to [:<bi>unlimitedbytes</bi>.]</p>
<p style="margin-left:1122%;"><b>Maximum size of other (non-TCP)socket send buffers. If container&rsquo;s processes needs tosend very large datagrams, the barrier should be setaccordingly. Increased limit is necessary for highperformance of communications through local (UNIX-swappages</b>domain)<i>pages</i>[:<i>pages</i>]sockets.</p>
<p style="margin-left:2211%;">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--dgramrcvbuf</b>, and the limit to a total size of swap thatcan be used by a container.<i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%; margin-top: 1em">For olderMaximum size of other (prenon-VSwapTCP) kernelssocket receive buffers. If container&rsquo;s processes needsto receive very large datagrams, the limit is used to show a totalbarrier should be setamount of swap space available inside the containeraccordingly. Thedifference between the barrier and thebarrier of this parameter limit is ignored. The default value is<b>unlimited</b>, meaning total swap will be reported as0not needed.</p>
<p style==== CPU fair scheduler parameters ===="margin-left:11%;"><b>--oomguarpages</b><i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:1122%; margin-top: 1em">TheseGuarantees against OOM kill.Under this beancounter the kernel accounts the total amountparameters control CPU usage of memory and swap space used by the container&rsquo;sprocesses. The barrier of this parameter is theout-of-memory guarantee. If the <b>oomguarpages<br/b>usage isbelow the barrier, processes of this container areguaranteed not to be killed in out-of-cpuunitsmemory situations. Themeaning of limit is currently unspecified; it should be setto </b> <i>numunlimited</ib>.</p>
<p style="margin-left:2211%;">CPU weight for a container.Argument is positive non-zero number, passed to and used inthe kernel fair scheduler. The larger the number is, themore CPU time this container gets. Maximum value is 500000,minimal is 8. Number is relative to weights of all the otherrunning containers. If <b>cpuunits--lockedpages</b> are not specified,default value of 1000 is used.<i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:22%; margin-top: 1em">You can set CPUMaximum number of pagesweight for CT0 (host system itself) as well (use acquired by <b>vzctlset 0 --cpuunitsmlock</b> <i>num</i>). Usually, OpenVZ initscript(<b>/etc/init.d/vz</b>2) takes care of setting this.</p>
<p style="margin-left:11%;"><b>--cpulimitprivvmpages</b><i>numpages</i>[:<bi>%pages</bi>]</p>
<p style="margin-left:22%;">Limit Allows controlling the amountof CPU usage for memory allocated by theapplications. For shared (mappedas <b>MAP_SHARED</b>) pages, each container, in per cent. Note if really using amemory page is charged for the fraction of the computer has 2 CPUs, itpagehas total (depending on the number of 200% CPU timeothers using it). Default CPU limit is For&quot;potentially private&quot; pages (mapped as<b>0MAP_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 in(no CPU limit)memory, 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>--cpusvmguarpages</b> <i>num</i>guarantee.</p>
<p style="margin-left:2211%;">sets number of CPUs available<b>--shmpages</b>in the container.<i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:1122%;"><b>--cpumask</b> <i>cpus</i> |Maximum IPC SHM segment size.Setting the barrier and the limit to different values does<b>all</b>not make practical sense.</p>
<p style="margin-left:2211%;">sets list of allowed CPUs forthe container. Input format is a comma<b>-separated list ofdecimal numbers and ranges. Consecutively set bits are shownas two hyphen-separated decimal numbers, the smallest andnumfile</b>largest bit numbers set in the range. For example, if youwant the container to execute on CPUs 0, 1, 2, 7, you shouldpass <bi>0-2,7items</bi>. Default value is [:<bi>allitems</bi> (thecontainer can execute on any CPU).]</p>
==== Memory output parameters ==== <p style="margin-left:1122%; margin-top: 1em">ForMaximum number of open files.VSwap-enabled kernels (042stab042 or greater), thisIn most cases the barrier and the limit should be set to theparameter is ignoredsame value. For older kernels, it controls Setting theoutput of /proc/meminfo inside a container. barrier to <b>0<br/b>effectivelydisables pre--meminfo none</b>charging optimization for this beancounter inthe kernel, which leads to the held value being precise butcould slightly degrade file open performance.</p>
<p style="margin-left:2211%;">No <b>--numflock</procb><i>items</meminfo virtualization(the same as on host system).i>[:<i>items</i>]</p>
<p style="margin-left:1122%;"><b>--meminfo</b>Maximum number of file locks.<i>mode</i>:<i>value</i>Safety gap should be between barrier and limit.</p>
<p style="margin-left:2211%;">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>--swappagesnumpty</b>parameter.<i>items</i>[:<i>items</i>]</p>
<p style="margin-left:22%; margin-top: 1em">You can use thefollowing modes for <i>mode</i>: <br>Number of pseudo-terminals&bull; <b>pages</b>:<i>value</i> - sets total memory (PTY). Note that inOpenVZ each container can have not morepages; <br>than 255 PTYs. Setting the barrier and the limit to&bull; <b>privvmpages</b>:<i>value</i> - sets total memoryas <b>privvmpages</b> * <i>value</i>different values does not make practical sense.</p>
<p style="margin-left:2211%; margin"><b>--top: 1em"numsiginfo</b>Default is<bi>items</i>privvmpages[:1<i>items</bi>]</p> <p style="margin-left:22%;">Number of siginfo structures.Setting the barrier and the limit to different values doesnot make practical sense.</p>
<p style==== iptables control parameters ===="margin-left:11%;"><b>--dcachesize</b><i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:1122%;"><b>Maximum size offilesystem--iptables</b>related caches, such as directory entry and inodecaches. Exists as a separate parameter to impose a limitcausing file operations to sense memory shortage and returnan errno to applications, protecting from memory shortagesduring critical operations that should not fail. Safety gap<i>name</i>should be between barrier and limit.</p>
<p style="margin-left:2211%;">Allow to use the functionality<b>--numiptent</b>of <i>namenum</i> iptables module inside the container. Tospecify multiple [:<i>namenum</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 defaultlist Number of enabled iptables modules is specified by (netfilter)entries. Setting the barrier and thelimit to different<b>IPTABLES</b> variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]]values does 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--physpages</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>
<p style==== Network devices control parameters ===="margin-left:22%;">On VSwap-enabled kernels, thislimits the amount of physical memory (RAM) available to acontainer. The barrier should be set to <b>0</b>, and thelimit to a total size of RAM that can be used used by acontainer.</p>
<p style="margin-left:1122%;margin-top: 1em">For olderkernels, this is an accounting-only parameter, showing theusage of RAM by this container. Barrier should be set to<b>--netdev_add0</b>, and limit should be set to <ib>nameunlimited</ib>.</p>
<p style="margin-left:2211%;">move network device from the<b>--swappages</b>host system to a specified container<i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:1122%;">For VSwap-enabled kernels(042stab042 or greater), this parameter limits the amount ofswap space available to a container. The barrier should beset to <b>--netdev_del0</b>, and the limit to a total size of swap that<i>name</i>can be used by a container.</p>
<p style="margin-left:22%;margin-top: 1em">delete network device from For older(pre-VSwap) kernels, the limit is used to show atotalspecified amount of swap space available inside the container. Thebarrier of this parameter is ignored. The default value is<b>unlimited</b>, meaning total swap will be reported as0.</p>
==== Disk quota CPU fair scheduler parameters ====
<p style="margin-left:11%;margin-top: 1em">Theseparameters control CPU usage by container. <b><br>--diskquota yescpuunits</b> |<bi>nonum</bi></p>
<p style="margin-left:22%;">allows to enable or disabledisk quota CPU weight for a container. By defaultArgument is positive non-zero number, passed to and used inthe kernel fair scheduler. The larger the number is, a global themore CPU time this container gets. Maximum valueis 500000,(<b>DISK_QUOTA</b>) from [[Man/vzminimal is 8.confNumber is relative to weights of all the otherrunning containers.5|If <b>vz.confcpuunits</b>(5)]] are not specified,default value of 1000 is used.</p>
<p style="margin-left:22%; margin-top: 1em">Note that thisYou can set CPUparameter is ignored weight for CT0 (host system itself) as well (use <b>ploopvzctlset 0 --cpuunits</b> layout<i>num</i>). Usually, OpenVZ initscript(<b>/etc/init.d/vz</b>) takes care of setting this.</p>
<p style="margin-left:11%;"><b>--diskspacecpulimit</b><i>num</i>[:<ib>num%</ib>]</p>
<p style="margin-left:22%;">For 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>simfs0</b> layout, setssoft and hard disk quota limits, in blocks. First parameteris soft limit, second is hard (no CPU limit. One block is currentlyequal to 1Kb).</p>
<p style="margin-left:2211%; margin-top: 1em">For<b>ploop--cpus</b> layout, sets the size of the ploop image file,in kilobytes.<i>num</i></p>
<p style="margin-left:22%; margin-top: 1em">Suffixessets number of CPUs available<b>G</b>, <b>M</b>, <b>K</b> can also be specified (see<b>Resource limits</b> section for more info onsuffixes)in the container.</p>
<p style="margin-left:11%;"><b>--diskinodescpumask</b><i>numcpus</i>[:|<ib>auto</b> | <b>numall</ib>]</p>
<p style="margin-left:22%;">sets soft Sets list of allowed CPUs forthe container. Input format is a comma-separated list ofdecimal numbers and hard disk quota/or ranges. Consecutively set bits arelimitsshown as two hyphen-separated decimal numbers, the smallestand largest bit numbers set in ithe range. For example, ifyou want the container to execute on CPUs 0, 1, 2, 7, youshould pass <b>0-nodes2,7</b>. First parameter Default value is soft limit<b>all</b> (thecontainer can execute on any CPU). If used with the<b>--nodemask</b> option, second isvalue of <b>auto</b> assigns allhard limitCPUs from the specified NUMA node to a container.</p>
<p style="margin-left:2211%; margin"><b>--top: 1em"nodemask</b> <i>nodes</i>Note that thisparameter is ignored for | <b>ploopall</b> layout.</p>
<p style="margin-left:1122%;">Sets list of allowed NUMA nodesfor the container. Input format is the same as for<b>--quotatimecpumask</b>. Note that <b>--nodemask</b> must be usedwith the <ib>seconds--cpumask</ib>option.</p>
<p style="margin-left:22%;">sets quota grace period.Container is permitted to exceed its soft limits for thegrace period, but once it has expired, the soft limit isenforced as a hard limit.</p>=== Memory output parameters ====
<p style="margin-left:2211%; margin-top: 1em">Note that ForVSwap-enabled kernels (042stab042 or greater), thisparameter is ignored for . For older kernels, it controls theoutput of /proc/meminfo inside a container. <b>ploop<br>--meminfo none</b> layout</p> <p style="margin-left:22%;">No /proc/meminfo virtualization(the same as on host system).</p> <p style="margin-left:11%;"><b>--meminfo</b><i>mode</i>:<i>value</i></p>
<p style="margin-left:1122%;">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>--quotaugidlimitswappages</b><i>num</i>parameter.</p>
<p style="margin-left:22%;margin-top: 1em">sets maximum number ofYou can use theuserfollowing modes for <i>mode</group IDs i>: <br>&bull; <b>pages</b>:<i>value</i> - sets total memory in a container for which disk quota insidethe container will be accounted. If this pages; <br>&bull; <b>privvmpages</b>:<i>value is set to</i> - sets total memoryas <b>0privvmpages</b>, user and group quotas inside the container willnot be accounted* <i>value</i>.</p>
<p style="margin-left:22%; margin-top: 1em">Note that ifDefault isyou have previously set value of this parameter to <b>0privvmpages:1</b>,changing it while the container is running will not takeeffect.</p>
==== Mount option Netfilter (iptables) control parameters ====
<p style="margin-left:11%;"><b>--noatime yesnetfilter&nbsp;disabled</b> |<b>nostateless</b>|<b>stateful</b>|<b>full</b></p>
<p style="margin-left:22%;">Sets noatime flag (do notRestrict access toupdate inode access times) on filesystemnetfilter/iptables modules for a container. This optionreplaces obsoleted <b>--iptables</b>.</p>
<p style==== Capability "margin-left:22%; margin-top: 1em">Note thatchanging this parameter requires container restart, soconsider using <b>--setmode</b> option ====.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>--capability</b>The following<i>capname</i>arguments can be used:<b>on</b>|<bbr>off&bull; disabled</b></p>
<p style="margin-left:2232%;">Sets a capability for acontainer. Note that setting capability when the containeris running does not take immediate effect; restart thecontainer in order for the changes to take effect. Note acontainer has default set of capabilities, thus anyoperation on capabilities is &quot;logical and&quot; withthe default capability mask.no modules are allowed</p>
<p style="margin-left:22%; 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>, <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&bull; stateless</b>(7).</p>
<p style="margin-left:2232%; margin-top: 1em"><b>WARNING</b>:all modules except NAT andsetting some of those capabilities may have far reachingsecurity implications, so do not do it unless you know whatyou conntracks are doingallowed (i.e. Also note that setting <b>setpcap:on</b> forfilter and mangle); this is thea container will most probably lead to inability to startit.default</p>
<p style==== Device access management ===="margin-left:22%;"><b>&bull; stateful</b></p>
<p style="margin-left:1132%;"><b>--devnodes</b>all modules except NAT are<i>device</i>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>none</b>allowed</p>
<p styletable width="margin-left:22100%;">Give the container an accessborder="0" rules="none" frame="void"(<b>r</b cellspacing="0" cellpadding="0"> - read, <b>w</b> - write, <b>q</b> - disk quotamanagement, <btr valign="top" align="left">none</b> - no access) to a device designatedby the special file /dev/<itd width="22%">device</itd>. Device file iscreated in a container by <b>vzctl</b>. Example:</ptd width="9%">
<pre stylep><b>&bull; full</b></p></td><td width="margin-left:221%;"> vzctl set 777 --devnodes sdb:rwq</pretd><td width="36%">
<p style="margin-left:11%;"><b>--devicesb</b>|<b>c</b>:<i>major</i>:<i>minor</i>|<b>allmodules are allowed</bp>:[<b>r</btd>][<btd width="32%">w</b>][<btd>q</btr>]|<b>none</b></ptable>
<p style="margin-left:2211%;">Give the container an access toa <b>b--iptables</b>lock or <b>c</b>haracter device designated by its<i>majorname</i> and [<ib>minor,</ib> numbers. Device file have tobe created manually..]</p>
<p style==== PCI device management ===="margin-left:22%;"><b>Note</b> this option isobsoleted, <b>--netfilter</b> should be used instead.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>--pci_add</b>Allow to use[the functionality of <i>domainname</i>:]iptables module inside thecontainer. Multiple comma-separated <i>bus</i>:<i>slotname</i>s can bespecified.<i>func</i></p>
<p style="margin-left:22%;margin-top: 1em">Give The defaultlist of enabled iptables modules is defined by the container an access toa specified PCI device<b>IPTABLES</b> variable in [[Man/vz. All numbers are hexadecimal (asprinted by conf.5|<b>lspcivz.conf</b>(8) in the first column5)]].</p>
<p style="margin-left:1122%;margin-top: 1em">You can use thefollowing values for <i>name</i>: <b>iptable_filter</b>,<b>iptable_mangle</b>, <b>ipt_limit</b>,<b>--pci_delipt_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>,[<ib>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>domainipt_REDIRECT</ib>:],<ib>busxt_mac</ib>:, <ib>slotipt_recent</ib>., <ib>funcipt_owner</ib>.</p>
<p style="margin-left:22%;">Delete a PCI device from thecontainer.</p>=== Network devices control parameters ====
<p style="margin-left:2211%; margin-top: 1em">Note that<b>vps-pci-netdev_add</b> configuration script is executed by<bi>vzctlname</bi> then configuring PCI devices. The script isusually located at <b/p>/usr/lib[64]/vzctl/scripts/ </bp style="margin-left:22%;">.move network device from thehost system to a specified container</p>
<p style==== Features management ===="margin-left:11%;"><b>--netdev_del</b><i>name</i></p>
<p style="margin-left:1122%;"><b>--features</b>delete network device from a<i>name</i>:<b>on</b>|<b>off</b>specified container</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>=== Disk quota parameters ====
<p style==== Apply config ===="margin-left:11%;"><b>--diskquota yes</b> |<b>no</b></p>
<p style="margin-left:1122%;">allows to enable or disabledisk quota for a container. By default, a global value(<b>--applyconfigDISK_QUOTA</b>) from [[Man/vz.conf.5|<ib>namevz.conf</ib>(5)]] is used.</p>
<p style="margin-left:22%;">Read container parameters fromthe container sample configuration file<tt>/etc/vz/conf/vemargin-</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 notchangedtop: <b>HOSTNAME</b>, <b>IP_ADDRESS</b>,<b>OSTEMPLATE</b>, <b>VE_ROOT</b1em">, andNote that thisparameter is ignored for <b>VE_PRIVATEploop</b>layout.</p>
<p style="margin-left:11%;"><b>--applyconfig_mapdiskspace</b><i>groupnum</i>[:<i>num</i>]</p>
<p style="margin-left:22%;">Apply container configparameters selected by <i>group</i>. Now the only possiblevalue for <i>group</i> is For <b>namesimfs</b>: to restore containerlayout, setsname based on <b>NAME</b> variable in containersoft and hard disk quota limits. First parameter is softconfiguration filelimit, second is hard limit.</p>
<p style==== I"margin-left:22%; margin-top: 1em">For<b>ploop</b> layout, initiates the procedure of resizing theploop image file to the new size. Since there is nosoft/hard limit concept in ploop, second <i>num</i>, ifspecified, is ignored.</O priority management ====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>--iopriooffline-resize</b><i>priority</i>option</p>
<p style="margin-left:22%;margin-top: 1em">Assigns I/O priority toNote that ploopresize is NOT performed on container. <i>Priority</i> range is start, so forconsistency <b>0-7-diskspace</b>. The greater<i>priority</i> is, the more time for I/O activity containerhas. By default each container has <i>priority</i> ofmust be used together with<b>4--save</b>flag.</p>
<p style=== Checkpointing and restore ==="margin-left:22%; margin-top: 1em">Suffixes<b>G</b>, <b>M</b>, <b>K</b> can also be specified (see<b>Resource limits</b> section for more info on suffixes).If suffix is not specified, value is in kilobytes.</p>
<p style="margin-topleft: 1em11%;">Checkpointing is a feature of<b>--diskinodes</b>OpenVZ kernel which allows to save a complete state of arunning container, and to restore it later.<i>num</i>[:<i>num</i>]</p>
<p style="margin-left:1122%;"><b>chkpnt</b> <sets soft and hard disk quotalimits, in i>CTID</i>-nodes. First parameter is soft limit, second is[<b>--dumpfile</b> <i>name</i>]hard limit.</p>
<p style="margin-left:1722%;margin-top: 1em">This command saves a completeNote that thisstate of a running container to a dump file, and stops thecontainer. If an option <b>--dumpfile</b> parameter is not set,default dump file name ignored for <b>/vz/dump/Dump.ploop</b><i>CTID</i> isusedlayout.</p>
<p style="margin-left:11%;"><b>restore</b> <i>CTID</i>[<b>--dumpfilequotatime</b> <i>nameseconds</i>]</p>
<p style="margin-left:1722%;">This command restores asets quota grace period.container from Container is permitted to exceed its soft limits for the dump file created by grace period, but once it has expired, the <b>chkpnt</b>soft limit iscommandenforced as a hard limit.</p>
<p style=== Snapshotting ==="margin-left:22%; margin-top: 1em">Note that thisparameter is ignored for <b>ploop</b> layout.</p>
<p style="margin-topleft: 1em11%;">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<b>--memory state (as inquotaugidlimit</b>checkpointing). Note that snapshot functionality is onlyworking for containers on ploop device.<i>num</i></p>
<p style="margin-left:1122%;"><b>snapshot</b> |Enables or disables<b>snapshotin-container per-user and per-creategroup disk quotas. If thevalue is set to </b> <i>CTID</i> [<b>--id0</b>or not set, disk quotas inside the<i>uuid</i>]container is disabled and not accounted.</p>
<p style="margin-left:1722%;margin-top: 1em">Creates a container snapshot.ForIf <ib>uuidsimfs</ib> is not specifiedlayout containers, it is autonon-generated. If azero value sets maximumcontainer is running, it&rsquo;s checkpointed and thenrestored. If a container number of user/group IDs for which disk quota is not running, only file systemstate is savedaccounted.</p>
<p style="margin-left:1122%;margin-top: 1em">For<b>snapshot-switchploop</b>layout containers, any non-zero value enables<i>CTID<disk quota inside the container; the number of user/i> <b>--id</b> <i>uuid</i>groupIDs used by disk quota is not limited by OpenVZ.</p>
<p style="margin-left:1722%;margin-top: 1em">Switches the Note thatenabling or disabling in-container to adisk quotas requiressnapshot identified by container restart, so consider using <ib>uuid--setmode</ib>. Note that the currentcontainer state and its file system state is lost! If givensnapshot contains CT memory dump, it is restored, otherwiseit is stoppedoption.</p>
<p style="margin-left:11%;"><b>snapshot-delete</b><i>CTID</i> <b>--id</b> <i>uuid</i></p>=== Capability option ====
<p style="margin-left:1711%;">Removes a specified<b>--capability</b>snapshot<i>capname</i>:<b>on</b>|<b>off</b>[<b>,</b>...]</p>
<p style="margin-left:1122%;"><b>snapshotSets a capability for acontainer. Multiple comma-list</b>separated capabilities can be<i>CTID</i>specified.</p>
<p style="margin-left:1722%;margin-top: 1em">Lists all snapshots. ActiveNote thatsnapshot setting a capability when the container is marked with running does nottake immediate effect; restart the container in order forthe changes to take effect (consider using <b>*--setmode</b> signoption).</p>
<p style=== Performing "margin-left:22%; margin-top: 1em">A container actions ===hasthe default set of capabilities, thus any operation oncapabilities is &quot;logical AND&quot; with the defaultcapability mask.</p>
<table widthp style="100margin-left:22%; margin-top: 1em" border="0" rules="none" frame="void">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>, <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>, cellspacing="0" cellpadding="0"<b>sys_admin</b>, <b>sys_boot</b>, <b>sys_nice</b>,<tr valign="top" align="left"b>sys_resource</b>, <b>sys_time</b>, <b>sys_tty_config</b>,<td width="11%"b>mknod</b>, <b>lease</b>, <b>setveid</b>, <b>ve_admin</tdb>.For detailed description, see <b>capabilities</b>(7).<td width="9%"/p>
<p style="margin-left:22%; margin-top: 1em"><b>createWARNING</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 </pb>setpcap:on</tdb>fora container will most probably lead to inability to start<td width="2%">it.</td><td width="78%"p>
<p style="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>--private&nbsp;</b><i>path</i>][<b>--root&nbsp;</b><i>path</i>][<b>--ipadd&nbsp;</b><i>addr</i>][<b>--hostname&nbsp;</b><i>name</i>][<b>--name&nbsp;</b><i>name</i>]</p> </td></tr></table>=== Device access management ====
<p style="margin-left:1711%; margin"><b>-top-devnodes</b><i>device</i>: 1em"[<b>r</b>][<b>w</b>][<b>q</b>]|<b>none</b>Creates a newcontainer area. This operation should be done once, beforethe first start of the container.</p>
<p style="margin-left:1722%; margin-top: 1em">By default, Give the container anaccessOS template denoted by (<b>r</b> - read, <b>w</b> - write, <b>DEF_OSTEMPLATEq</b> parameter of- disk quota[[Man/vz.conf.5|management, <b>vz.confnone</b>(5- no access)]] is used to create a containerdevice designatedby the special file /dev/<i>device</i>. This can beDevice file isoverwritten created in a container by <b>--ostemplatevzctl</b> option.Example:</p>
<p pre style="margin-left:1722%; margin"> vzctl set 777 --topdevnodes sdb: 1em">By default, anew container configuration file is created from a sampleconfiguration denoted by value of <b>CONFIGFILE</b>parameter of [[Man/vz.conf.5|<b>vz.conf</b>(5)]]. If the containerconfiguration file already exists, it will not bemodified.rwq</ppre>
<p style="margin-left:1711%; margin-top: 1em">The value of<b>CONFIGFILE--devicesb</b> can be overwritten by using the|<b>--configc</b> :<i>major</i>name:<i>minor</i> option. This option can not beused if the container configuration file already exists.|<b>all</b>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:1722%; margin-top: 1em">A new Give the containeran access tocan either be created using a <b>simfsb</b> filesystem lock or on a<b>ploopc</b> haracter device. The default is set designated by value ofits<b>VE_LAYOUT</b> parameter of [[Man/vz.conf.5|<bi>vz.confmajor</bi>(5)]] and can beoverwritten by <b>--layout</b> option. In case <bi>ploopminor</bi>is used, one can additionally specify ploop disk imageformat after a colonnumbers. Possible ploop formats areDevice file have to<b>expanded</b>, <b>plain</b> and <b>raw</b>. Default is<b>expanded</b>. Using <b>raw</b> is not recommended and isnot supportedbe created manually.</p>
<p style="margin-left:17%; margin-top: 1em">You can use<b>--diskspace</b> option to specify container file systemsize. Suffixes <b>G</b>, <b>M</b>, <b>K</b> can also bespecified (see <b>Resource limits</b> section for more infoon suffixes).</p>=== PCI device management ====
<p style="margin-left:1711%; margin-top: 1em">You can use<b>--rootpci_add</b> [<i>pathdomain</i> option to sets the path to themount point for the container root directory (default is:]<bi>VE_ROOTbus</bi> specified in [[Man/vz.conf.5|:<bi>vz.confslot</bi>(5)]] file).Argument can contain literal string <bi>$VEIDfunc</bi>, 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 Give the path container an access todirectory in which all the files and directories specific tothis very container a specified PCI device. All numbers are stored hexadecimal (default is <b>VE_PRIVATE</b>asspecified in [[Man/vz.conf.5|printed by <b>vz.conflspci</b>(58)]] filein the first column). Argument can containliteral string <b>$VEID</b>, which will be substituted withthe numeric CT ID.</p>
<p style="margin-left:1711%; margin-top: 1em">You can use<b>--ipaddpci_del</b> [<i>domain</i>:]<i>bus</i>:<i>addrslot</i> option to assign an IP address toa container. Note that this option can be used multipletimes.<i>func</i></p>
<p style="margin-left:1722%; margin-top: 1em">You can use<b>--hostname</b> <i>name</i> option to set Delete a host name forPCI device from thea container.</p>
<p style="margin-left:1122%;margin-top: 1em">Note that<b>destroyvps-pci</b> | configuration script is executed by<b>deletevzctl</b>then configuring PCI devices. The script isusually located at <ib>CTID/usr/libexec/vzctl/scripts/</ib>.</p>
<p style="margin-left:17%;">Removes a container privatearea by deleting all files, directories and theconfiguration file of this container.</p>=== Features management ====
<p style="margin-left:11%;"><b>start--features</b> <i>CTIDname</i>[:<b>on</b>|<b>--waitoff</b>] [<b>--force,</b>...]</p>
<p style="margin-left:1722%;">Mounts (if necessary) andEnable or disable a specificstarts a containerfeature. Unless Known features are: <b>--waitsysfs</b> option is,specified<b>nfs</b>, <b>sit</b>, <b>ipip</b>, <b>vzctlppp</b> will return immediately; otherwise,an attempt to wait till the default runlevel is reached willbe made by <b>vzctlipgre</b>, <b>bridge</b>, <b>nfsd</b>. A few features canbe specified at once, comma-separated.</p>
<p style="margin-left:17%; margin-top: 1em">Specify<b>--force</b> if you want to start a container which isdisabled (see <b>--disabled</b>).</p>=== Apply config ====
<p style="margin-left:1711%; margin-top: 1em">Note that thiscommand can lead to execution of <b>premount--applyconfig</b>,<bi>mountname</b> and <b>start</b> action scripts (see <b>ACTIONSCRIPTS</bi> below).</p>
<p style="margin-left:1122%;">Read container parameters fromthe container sample configuration file<btt>stop/etc/vz/conf/ve-</btt> <i>CTIDname</i><tt>.conf-sample</tt>,[and apply them, if <b>--fastsave</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:1711%;">Stops and unmounts a container.Normally, <b>halt</b>(8) is executed inside a container;option <b>--fastapplyconfig_map</b> makes <bi>vzctlgroup</b> use <bi>reboot</b>(2)syscall instead which is faster but can lead to uncleancontainer shutdown.</p>
<p style="margin-left:1722%; margin-top: 1em">Note that thisApply container configcommand can lead to execution of parameters selected by <bi>stopgroup</bi>, . Now the only possiblevalue for <bi>umountgroup</bi>and is <b>postumountname</b> action scripts (see : to restore containername based on <b>ACTIONSCRIPTSNAME</b> below)variable in containerconfiguration file.</p>
<p style="margin-left:11%;"><b>restart<=== I/b> <i>CTID</i>[<b>--wait</b>] [<b>--force</b>] [<b>--fast</b>]</p>O scheduling ====
<p style="margin-left:1711%;">Restarts a container, i.e.stops it if it is running, and starts again. Accepts all the<b>start--ioprio</b> and <bi>stoppriority</bi> options.</p>
<p style="margin-left:1722%; margin">Assigns disk I/O priority tocontainer. <i>Priority</i> range is <b>0-top: 1em"7</b>Note that this. The greatercommand can lead to execution <i>priority</i> is, the more time for I/O activity containerhas. By default each container has <i>priority</i> of some action scripts (see<b>ACTION SCRIPTS4</b> below).</p>
<p style="margin-left:11%;"><b>status--iolimit</b> <i>CTIDlimit</i>[<b>B</b>|<b>K</b>|<b>M</b>|<b>G</b>]</p>
<p style="margin-left:1722%;">Shows Assigns disk I/O bandwidthlimit for a container status. ThisValue is either a line number with five anoptional suffix, or six words, separated by spacesa literal string <b>unlimited</b>. Valueof <b>0</b> means &quot;unlimited&quot;. By default acontainer has no I/O limit. Maximum allowed limit is 2gigabytes per second; values exceeding the limit aretruncated.</p>
<p style="margin-left:1722%; margin-top: 1em">First word If no suffix isliterally provided, the <i>limit</i> is assumed to be in megabytes persecond. Available suffixes are: <br>&bull; <b>CTIDb</b>., <b>B</b> -- bytes per second; <br>&bull; <b>k</b>, <b>K</b> -- kilobytes per second; <br>&bull; <b>m</b>, <b>M</b> -- megabytes per second (default);<br>&bull; <b>g</b>, <b>G</b> -- gigabytes per second;</p>
<p style="margin-left:1711%; margin"><b>--top: 1em"iopslimit</b>Second word isthe numeric <i>CT IDiops</i>.</p>
<p style="margin-left:1722%; margin-top: 1em">Third word isAssigns IOPS limit for ashowing whether this container exists or not, it can bein number of input/output operations per second.either Value is a number or a literal string <b>existunlimited</b> or .Value of <b>deleted0</b>means &quot;unlimited&quot;. By default acontainer has no IOPS limit.</p>
<p style="margin-left:17%; margin-top: 1em">Fourth word isshowing the status of the container filesystem, it can beeither <b>mounted</b> or <b>unmounted</b>.</p>== Suspending and resuming ===
<p style="margin-top: 1em">Checkpointing is a feature ofOpenVZ kernel which allows to save a complete in-kernelstate of a running container, and to restore it later.</p> <p style="margin-left:1711%; "><b>suspend</b>|<b>chkpnt</b><i>CTID</i> [<b>--dumpfile</b> <i>name</i>]</p> <p style="margin-topleft: 1em17%;">Fifth wordThis command suspends ashows if the container to a dump file If an option <b>--dumpfile</b> is runningnot set, it can be eitherdefault dump file name<b>running/vz/dump/Dump.</b> or <bi>downCTID</bi>is used.</p>
<p style="margin-left:1711%; margin-top: 1em">Sixth word, ifexists, is <b>suspendedresume</b>|<b>restore</b>. It appears if both a containerand its dump file exist (see <i>CTID</i> [<b>chkpnt--dumpfile</b>).<i>name</i>]</p>
<p style="margin-left:17%; margin-top: 1em">This commandrestores acan also be usable container from scriptsthe dump file created by the <b>suspend</b>command.</p>
<p style="margin-left:11%;"><b>mount</b> <i>CTID</i></p>== Snapshotting ===
<p style="margin-lefttop:17%;1em">Mounts container private areaSnapshotting is a feature basedon checkpointing and ploop shapshots.It allows to save aNote that this command can lead to execution complete state ofcontainer file system. Plus, if the<b>premount</b> and <b>mount</b> action scripts container is running, it&rsquo;s in-memory state (seeas in<b>ACTION SCRIPTS</b> belowcheckpointing). Note that snapshot functionality is onlyworking for containers on ploop device.</p>
<p style="margin-left:11%;"><b>umountsnapshot</b> <i>CTID</i>[<b>--id</b> <i>uuid</i>] [<b>--name</b> <i>name</i>][<b>--description</b> <i>desc</i>] <br>[<b>--skip-suspend</b>] [<b>--skip-config</b>]</p>
<p style="margin-left:17%;">Unmounts Creates a container privatesnapshot,areai. Note that this command can lead to execution ofe. saves the current container state, including its file<b>umount</b> system state, running processes state, and <b>postumount</b> action scripts (seeconfiguration<b>ACTION SCRIPTS</b> below)file.</p>
<p style="margin-left:17%; margin-top: 1em">Note thatIf a containeris running, and <b>stop--skip-suspend</b> does <b>umount</b> automaticallyoption is notspecified, a container is checkpointed and then restored,and CT memory dump becomes the part of snapshot.</p>
<p style="margin-left:1117%;margin-top: 1em"><b>convert</b> <i>CTID</i>Unless[<b>--layoutploopskip-config</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]]option is given, containerconfiguration file is saved to the snapshot.</p>
<p style="margin-left:17%;margin-top: 1em">Convert CT private area toIf <i>uuid</i>reside on a ploop device (available in kernel versionis not specified, it is auto-generated. Options042stab052.8 <b>--name</b> and greater). Conversion should <b>--description</b> can be performedused towhen a container is stoppedspecify the snapshot name and description, plus disk space quota should berespectively.setName is displayed by <b>snapshot-list</b>.</p> <p style="margin-left:11%;"><b>snapshot-switch</b><i>CTID</i> [<b>--skip-resume</b> | <b>--must-resume</b>][<b>--skip-config</b>] <b><br>--id</b> <i>uuid</i></p>
<p style="margin-left:1117%;"><b>quotaon</b> Switches the container to asnapshot identified by <i>CTIDuuid</i>, restoring its filesystem state, configuration (if available) and its runningstate (if available).</p>
<p style="margin-left:17%;margin-top: 1em">Turn disk quota on. Not that<b>mount</b> Note thatthe current state of a container (including its file systemstate and <b>startits configuration file) is lost!</b> does that automatically.</p>
<p style="margin-left:1117%;margin-top: 1em">Option<b>quotaoff--skip-resume</b> 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 <ib>CTID--skip-suspend</ib>).</p>
<p style="margin-left:17%;margin-top: 1em">Turn disk quota off. Not thatIf option<b>umount--must-resume</b> is set, absense of a memory dump istreated as an error, and <b>stop</b> does that automaticallythe inability to restore from thememory dump is treated as an error rather than warning.</p>
<p style="margin-left:1117%;margin-top: 1em">Option option<b>quotainit--skip-config</b>is used to ignore the CT configuration<file in a snapshot, i>CTID</i>.e. the current configuration file willbe left as is.</p>
<p style="margin-left:1711%;">Initialize disk quota (i.e. run<b>vzquota initsnapshot-delete</b>) with the parameters taken from the CTconfiguration file [[Man<i>CTID</ctid.conf.5|i> <b>ctid.conf--id</b>(5)]].<i>uuid</i></p>
<p style="margin-left:1117%;"><b>exec</b> <i>CTIDRemoves a specifiedcommand</i>snapshot.</p>
<p style="margin-left:1711%;">Executes <b>snapshot-mount</b><i>commandCTID</i> in acontainer. Environment variables are not set inside thecontainer. Signal handlers may differ from default settings.If <b>--id</b> <i>commanduuid</i> is <b>--target</b>, commands are read fromstdin.<i>directory</i></p>
<p style="margin-left:1117%;">Mounts a snapshot specified by<bi>exec2uuid</bi> to a <i>CTIDcommanddirectory</i>. Note this mount isread-only.</p>
<p style="margin-left:1711%;">The same as <b>execsnapshot-umount</b>, butreturn code is that of <i>commandCTID</i> <b>--id</b> <i>uuid</i>.</p>
<p style="margin-left:1117%;"><b>runscript</b> <i>CTIDUnmounts a specifiedscript</i>snapshot.</p>
<p style="margin-left:1711%;">Run specified shell script in<b>snapshot-list</b>the container. Argument <i>scriptCTID</i> is a file on the host[<b>-H</b>] [<b>-o</b>system which contents is read by vzctl and executed in thecontext of the container<i>field</i>[,<i>field</i>. 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>--id</procb> <i>uuid</bi>) 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.]</p>
<p style="margin-left:1117%;"><b>enter</b> <i>CTID</i>List container&rsquo;s[<b>--exec</b> <i>command</i> [<i>arg</i> ..snapshots.]]</p>
<p style="margin-left:17%;margin-top: 1em">Enters into a container (givinga container&rsquo;s root shell). This option is a back-doorYou canfor host root only. The proper way to have CT root shell isto use suppress displaying header using <b>ssh-H</b>(1)option.</p>
<p style="margin-left:17%; margin-top: 1em">OptionYou can use the<b>--execo</b> is used option to run display only the specified<i>commandfield</i> with argumentsafter entering into container(s). This is useful if command tobe run requires a terminal (so <b>vzctl exec</b> List of available fields can not beobtainedused) and for some reason you can not use using <b>ssh-L</b>(1)option.</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>== Performing container actions ===
<p styletable width="margin-left:11100%;" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><btr valign="top" align="left">console</btd width="11%"> <i>CTID</itd></ptd width="9%">
<p style="margin-lefttop:171em"><b>create</b></p></td><td width="2%;">Attach to the container&rsquo;sconsole. Note that the console is persistent, meaning it canbe attached to even if the container is not running, andthere is no automatic detachment when the container is</td>stopped.</ptd width="78%">
<p style="margin-lefttop:17%1em"><i>CTID</i>[<b>--ostemplate&nbsp; margin</b><i>name</i>][<b>--topconfig&nbsp;</b><i>name</i>][<b>--layout&nbsp;simfs</b>|<b>ploop</b>[<b>: 1em"</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]][<b>--diskspace&nbsp;</b><i>kbytes</i>][<b>--diskinodes&nbsp;</b><i>num</i>Type ][<b>Esc--private&nbsp;</b><i>path</i>]then [<b>.--root&nbsp;</b> to detach from the console. Type <i>path</i>][<b>Esc--ipadd&nbsp;</b><i>addr</i>]then [<b>,--hostname&nbsp;</b> to detach without killing anything. Note that<i>name</i>]these sequences are only recognized after [<b>Enter--name&nbsp;</b><i>name</i>][<b>--local_uid&nbsp;</b><i>uid</i>][<b>.--local_gid&nbsp;</b><i>gid</i>]</p> </td></tr></table>
<p style=== Other options ==="margin-left:17%; margin-top: 1em">Creates a newcontainer area. This operation should be done once, beforethe first start of the container.</p>
<p style="margin-left:1117%;margin-top: 1em">By default, anOS template denoted by <b>DEF_OSTEMPLATE</b> parameter of[[Man/vz.conf.5|<b>vz.conf</b>(5)]] is used to create a container. This can beoverwritten by <b>--helpostemplate</b>option.</p> <p style="margin-left:17%;margin-top: 1em">Prints help message with By default, anew container configuration file is created from asampleconfiguration denoted by value of <b>CONFIGFILE</b>parameter of [[Man/vz.conf.5|<b>vz.conf</b>(5)]]. If the containerconfiguration file already exists, it will not bemodified.</p> brief list <p style="margin-left:17%; margin-top: 1em">The value of possible options<b>CONFIGFILE</b> can be overwritten by using the<b>--config</b> <i>name</i> option. This option can not beused if the container configuration file already exists.</p>
<p style="margin-left:1117%;margin-top: 1em">A new containercan either be created using <b>simfs</b> filesystem or on a<b>ploop</b> device. The default is set by value of<b>VE_LAYOUT</b> parameter of [[Man/vz.conf.5|<b>vz.conf</b>(5)]] and can beoverwritten by <b>--versionlayout</b> option. In case <b>ploop</b>is used, one can additionally specify ploop disk imageformat after a colon. Possible ploop formats are<b>expanded</b>, <b>plain</b> and <b>raw</b>. Default is<b>expanded</b>. Using value other than <b>expanded</b>isnot recommended and is currently not supported.</p>
<p style="margin-left:17%;margin-top: 1em">Prints You can use<b>--diskspace</b> and <b>--diskinodes</b> options tospecify container file system size. Note that for<b>vzctlploop</b>layout, you will not be able to change inodesversionvalue later.</p>
<p style== ACTION SCRIPTS =="margin-left:17%; margin-top: 1em">If<b>DISKSPACE</b> is not specified either in the sampleconfiguration file used for creation or in globalconfiguration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]], <b>--diskspace</b>parameter is required for <b>ploop</b> layout.</p>
<p style="margin-left:1117%; 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. TheSuffixesfollowing <b>vzctl</b> commands can trigger execution ofaction scripts: <b>startG</b>, <b>stopM</b>, <b>restartK</b>,can also be specified (see<b>mount</b> and <b>umountResource limits</b>section for more info onsuffixes).</p>
<p style="margin-left:1117%; margin-top: 1em">Action scriptsYou can useare located in the <b>--root</etc/vz/confb> <i>path</i> option to sets the path to themount point for the container root directory (default is<b>VE_ROOT</b> directoryspecified in [[Man/vz. There areglobal and per-CT scriptsconf. Global scripts have a literalprefix of 5|<b>vpsvz.conf</b> and are executed for all containers(5)]] file).Per-CT scripts have a Argument can contain literal string <ib>CTID$VEID</ib> numeric prefix and are, which willexecuted for be substituted with the given container onlynumeric CT ID.</p>
<p style="margin-left:1117%; margin-top: 1em">Please noteYou can usescripts <b>--private</b> <i>path</i> option to set the path todirectory in which all the files and directories specific tothis very container are executed in a host system stored (CT0) context, withdefault is <b>VE_PRIVATE</b>the exception of specified in [[Man/vz.conf.5|<b>vz.startconf</b> and (5)]] file). Argument can containliteral string <b>.stop$VEID</b> scripts,which will be substituted withwhich are executed in a container contextthe numeric CT ID.</p>
<p style="margin-left:1117%; margin-top: 1em">The followingYou can useaction scripts are currently defined: <b><br>vps.premount--ipadd</b>, <i>CTIDaddr</i><b>option to assign an IP address toa container. Note that this option can be used multipletimes.premount</b></p>
<p style="margin-left:2217%;margin-top: 1em">Global and perYou can use<b>--CT mount scriptshostname</b> <i>name</i> option to set a host name forwhich 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:1117%;margin-top: 1em">When runningwith an upstream Linux Kernel that supports user namespaces(&gt;= 3.8), the parameters <b>--local_uid</b> and<b>vps.mount--local_gid</b>,can be used to select which <i>uid</i>and <i>CTIDgid</i>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</b>and<b>LOCAL_GID</b> from global configuration file[[Man/vz.conf.5|<b>vz.conf</b>(5)]] are used.mountAn explicit <b>--local_uid</b>value of 0 will disable user namespace support, and run thecontainer as a privileged user. In this case,<b>--local_gid</b> is ignored.</p>
<p style="margin-left:2217%;margin-top: 1em">Global <b>Warning:</b>use <b>--local_uid</b> and per-CT mount scriptswhich are executed for a container right after it ismounted. Otherwise they are the same as <b>.premount--local_gid</b>with care,scriptsspecially when migrating containers. In all situations, thecontainer&rsquo;s files in the filesystem needs to becorrectly owned by the host-side users.</p>
<p style="margin-left:11%;"><ib>CTIDdestroy</ib>| <b>.startdelete</b><i>CTID</i></p>
<p style="margin-left:2217%;">Right after <b>vzctl</b> hasstarted Removes a containerprivatearea by deleting all files, it executes directories and theconfiguration file of this script in a containercontext.</p>
<p style="margin-left:11%;"><b>start</b><i>CTID</i>[<b>--wait</b>] [<b>--force</b>] [<b>--skip-fsck</b>][<b>.stop--skip-remount</b>]</p>
<p style="margin-left:2217%;">Right before Mounts (if necessary) andstarts a container. Unless <b>--wait</b> option isspecified, <b>vzctl</b> will return immediately; otherwisean attempt to wait till the default runlevel is reached willbe made by <b>vzctl</b> has.</p>stopped a container, it executes this script in <p style="margin-left:17%; margin-top: 1em">Specify<b>--force</b> if you want to start a containerwhich iscontextdisabled (see <b>--disabled</b>).</p>
<p style="margin-left:1117%;margin-top: 1em">Specify<b>vps.umount--skip-fsck</b>,to skip fsck for ploop-based container<i>CTID</i><b>filesystem (this option is used by vz initscript).umount</b></p>
<p style="margin-left:2217%;margin-top: 1em">Global and per-CT umountBy default, ifscripts which are executed for a container before to be started happens to be already mounted, it isunmounted. Scripts are executed in the host system context,while a CT is and mountedagain. Global script, if exists, is executedThis behavior can be turnedfirstoff by using <b>--skip-remount</b> flag.</p>
<p style="margin-left:1117%;margin-top: 1em">Note that thiscommand can lead to execution of <b>vps.postumountpremount</b>,<ib>mount</b> and <b>CTIDstart</ib>action scripts (see <b>.postumountACTIONSCRIPTS</b>below).</p>
<p style="margin-left:2211%;">Global and per<b>stop</b> <i>CTID</i>[<b>--CT umountscripts which are executed for a container right after it isunmounted. Otherwise they are the same as fast</b>] [<b>.--skip-umount</b>scripts.]</p>
<p style="margin-left:1117%; margin-top: 1em">The environmentStops a container and unmountspassed to all the it (unless <b>*mount--skip-umount</b> scripts is the standardgiven). Normally,environment of the parent (i.e. <b>vzctlhalt</b>(8) with twois executed inside a container; optionadditional variables: <b>$VEID--fast</b> and makes <b>$VE_CONFFILEvzctl</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 use <b>$VE_ROOTreboot</b>, it needs (2)syscall instead which is faster but can lead to get thoseuncleanfrom global and per-CT configuration filescontainer shutdown.</p>
<p style="margin-left:1117%; margin-top: 1em">Here Note that<b>vzctl stop</b> is annot asyncronous, in other words vzctlexample of a mount script, which makes host systemwaits for container&rsquo;sinit to exit (unless<b>--fast</mnt/disk available b> is given), which can take up to container(s)a few minutes. Script name Default wait timeout is 120 seconds; it can eitherbe changedbe globally, by setting <b>STOP_TIMEOUT</etcb> in[[Man/vz/.conf/vps.mount5|<b>vz.conf</b> (5)]], orper container (<b>STOP_TIMEOUT</etc/vzb> in[[Man/ctid.conf/.5|</b><i>CTIDctid.conf</ib>(5)]], see <b>.mount--stop-timeout</b>).</p>
<pre p style="margin-left:1117%; margin-top: 1em"> # If one of these files does not exist then something # is really broken [ -f /etc/sysconfig/vz ] || exit 1 [ -f $VE_CONFFILE ] || exit 1 # Source both files. Note the order is important.that this . command can lead to execution of <b>stop</etcb>, <b>umount</vz/vz.confb> . $VE_CONFFILE SRC=and <b>postumount</mnt/diskb> action scripts (see <b>ACTION DST=SCRIPTS</mnt/disk mount -n -t simfs $SRC ${VE_ROOT}${DST} -o $SRCb> below).</prep>
<p style== EXIT STATUS =="margin-left:11%;"><b>restart</b> <i>CTID</i>[<b>--wait</b>] [<b>--force</b>] [<b>--fast</b>][<b>--skip-fsck</b>]</p>
<p style="margin-left:1117%; margin-top: 1em">Returns 0 uponRestarts a container, i.e.successstops it if it is running, or an appropriate error code in case of anand starts again. Accepts all theerror:<b>start</b> and <b>stop</b> options.</p>
<table widthp style="100margin-left:17%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0; margin-top: 1em">Note that this<tr valign="top" align="left">command 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%;">1</pb>status</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p>Failed to set a UBC parameter</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>2</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">First word isliterally <b>CTID</tdb>.<td width="78%"/p>
<p>Failed to set a fair scheduler parameter</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">3Third 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">Generic system errorFourth word isshowing the status of the container filesystem, 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">5Fifth 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">The running kernel Sixth word, ifexists, is not an OpenVZ kernel (or someOpenVZ modules are not loaded)</p></tdb>suspended</trb>. It appears if a dump fileexists for a stopped container (see <tr valign="top" align="left"b>suspend<td width="11%"/b>).</td><td width="4%"p>
<p>6</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%;">Not enough system resources</pb>mount</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">7Mounts 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%;"><b>ENV_CREATEumount</b> ioctl failed</pi>CTID</tdi></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:17%;">8Unmounts 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">Command executed by Note that<b>vzctl execstop</b> returned non-zeroexit codedoes </pb>umount</tdb>automatically.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:11%;">9<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>Container is locked by another <b>vzctl</b>invocation</p> </td></tr><tr valign="top" alignstyle="margin-left:17%;">Convert CT private area toreside on a ploop device (available in kernel version<td width="11%">042stab052.8 and greater). Conversion should be performedwhen a container is stopped, plus disk space quota should beset.</td><td width="4%"p>
<pstyle="margin-left:11%;">10</pb>compact</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p>Global OpenVZ configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]] notfound</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%;">11</pb>quotaon</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">A vzctl helper script file not foundTurn disk quota on. Not that</pb>mount</tdb>and </trb>start<tr valign="top" align="left"><td width="11%"/b>does that automatically.</td><td width="4%"p>
<pstyle="margin-left:11%;">12</pb>quotaoff</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Permission deniedTurn disk quota off. Not that</pb>umount</tdb>and </trb>stop<tr valign="top" align="left"><td width="11%"/b>does that automatically.</td><td width="4%"p>
<pstyle="margin-left:11%;">13</pb>quotainit</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Capability setting failedInitialize disk quota (i.e. run</pb>vzquota init</tdb><) with the parameters taken from the CTconfiguration file [[Man/tr>ctid.conf.5|<tr valign="top" align="left"b>ctid.conf<td width="11%"/b>(5)]].</td><td width="4%"p>
<pstyle="margin-left:11%;">14</pb>exec</tdb><td width="7%"i>CTIDcommand</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Container configuration file [[Man/ctid.conf.5|Executes <bi>ctid.confcommand</bi>(5)]] in acontainer. Environment variables are notset inside thecontainer. Signal handlers may differ from default settings.foundIf </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%;">15</pb>exec2</tdb><td width="7%"i>CTIDcommand</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Timeout on The same as <b>vzctl exec</b>, butreturn code is that of </pi>command</tdi>.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:11%;">16</pb>runscript</tdb><td width="7%"i>CTIDscript</tdi><td width="78%"/p>
<p>Error during <b>vzctl chkpnt</b></p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Run specified shell script inthe container. Argument <td width="11%"i>script</tdi>is a file on the hostsystem which contents is read by vzctl and executed in the<td width="4%">context 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<pb>17</p>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 basic<td width="7%">operations.</td><td width="78%"p>
<pstyle="margin-left:11%;">Error during <b>vzctl restoreenter</b><i>CTID</pi>[<b>--exec</tdb></tri>command<tr valign="top" align="left"/i>[<td width="11%"i>arg</tdi>...]]<td width="4%"/p>
<p>18</p></td><td widthstyle="7margin-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</tdb>(1).<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Error from Option<b>setluid()--exec</b> syscallis used to run </pi>command</tdi>with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so </trb>vzctl exec<tr valign="top" align="left"/b>can not beused) and for some reason you can not use <td width="11%"b>ssh</tdb>(1).<td width="4%"/p>
<p>20</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">You need to logout manually from the shell to finish session (even if youspecified <b>--exec</tdb>).<td width="78%"/p>
<pstyle="margin-left:11%;">Invalid command line parameter</pb>console</tdb></tri>CTID<tr valign="top" align="left"/i>[<td width="11%"i>ttynum</tdi>]<td width="4%"/p>
<pstyle="margin-left:17%;">Attach to a container console.Optional <i>ttynum</i> argument is tty number (such as<b>4</b> for <b>21tty4</pb>), default is <b>1</tdb>which is usedfor container&rsquo;s <td width="7%"b>/dev/console</tdb>.<td width="78%"/p>
<p>Invalid value for command line parameter</p></td></tr><tr valignstyle="margin-left:17%; margin-top: 1em" align="left">Note theconsoles are persistent, meaning that: <br>&bull; it can be attached to even if the container is notrunning; <td width="11%"br>&bull; there is no automatic detachment upon the containerstop; </tdbr>&bull; detaching from the console leaves anything running inthis console as is.<td width="4%"/p>
<p>22</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">The followingescape sequences are recognized by <b>vzctl console</tdb>.Note that these sequences are only recognized at thebeginning of a line.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container root directory (&bull;<b>VE_ROOTEsc</b>) not setthen </pb>.</tdb>to detach from the console.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">23&bull;</pb>Esc</tdb>then <td width="7%"b>!</tdb>to kill anything running on theconsole (SAK). This is helpful when one expects a loginprompt but there isn&rsquo;t one.<td width="78%"/p>
<p>Container private directory (<b>VE_PRIVATE</b>) notset</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td widthOther options ==="4%">
<p>24</p></td><td widthstyle="7margin-left:11%;"><b>--help</tdb><td width="78%"/p>
<p>Container template directory (<b>TEMPLATE</b>) notset</p> </td></tr><tr valign="top" alignstyle="margin-left:17%;">Prints help message with a<td width="11%">brief list of possible options.</td><td width="4%"p>
<p>28</p></td><td widthstyle="7margin-left:11%;"><b>--version</tdb><td width="78%"/p>
<p>Not all required UBC parameters are set, unable to startcontainer</p> </td></tr><tr valign="top" alignstyle="margin-left:17%;">Prints <td width="11%"b>vzctl</tdb>version.<td width="4%"/p>
<p>29</p></td><td width="7%"></td><td width="78%">ACTION SCRIPTS ==
<pstyle="margin-left:11%; margin-top: 1em"><b>vzctl</b>OS template is not specified, unable has an ability to createexecute user-defined scripts when aspecific <b>vzctl</b> command is run for a container. Thefollowing <b>vzctl</pb> commands can trigger execution ofaction scripts: <b>start</b>, <b> stop</tdb>, <b>restart</trb>,<tr valign="top" align="left"b>mount</b>and <td width="11%"b>umount</tdb>.<td width="4%"/p>
<pstyle="margin-left:11%; margin-top: 1em">Action scriptsare located in the <b>31/etc/vz/conf/</pb> directory. There areglobal and per-CT scripts. Global scripts have a literalprefix of <b>vps.</tdb>and are executed for all containers.Per-CT scripts have a <td width="7%"i>CTID</i><b>.</tdb>numeric prefix andare executed for the given container only.<td width="78%"/p>
<pstyle="margin-left:11%; margin-top: 1em">Container not runningPlease notescripts are executed in a host system (CT0) context, withthe exception of </pb>.start</tdb>and </trb>.stop<tr valign="top" align="left"/b>scripts,<td width="11%">which are executed in a container context.</td><td width="4%"p>
<pstyle="margin-left:11%; margin-top: 1em">32The followingaction scripts are currently defined: <b><br>vps.premount</pb>, <i>CTID</tdi><td width="7%"b>.premount</tdb><td width="78%"/p>
<p>Container already running</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container before it is mounted.<td width="11%">Scripts are executed in the host system context, while a CTis not yet mounted or running. Global script, if exists, isexecuted first.</td><td width="4%"p>
<pstyle="margin-left:11%;">33<b>vps.mount</pb>,<i>CTID</tdi><td width="7%"b>.mount</tdb><td width="78%"/p>
<p>Unable to stop container</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container right after it ismounted. Otherwise they are the same as <td width="11%"b>.premount</tdb>scripts.<td width="4%"/p>
<pstyle="margin-left:11%;">34</pi>CTID</tdi><td width="7%"b>.start</tdb><td width="78%"/p>
<p>Unable to add IP address to container</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Right after <td width="11%"b>vzctl</tdb>hasstarted a container, it executes this script in a containercontext.<td width="4%"/p>
<pstyle="margin-left:11%;">40</pi>CTID</tdi><td width="7%"b>.stop</tdb><td width="78%"/p>
<p>Container not mounted</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Right before <td width="11%"b>vzctl</tdb>hasstopped a container, it executes this script in a containercontext.<td width="4%"/p>
<pstyle="margin-left:11%;">41<b>vps.umount</pb>,<i>CTID</tdi><td width="7%"b>.umount</tdb><td width="78%"/p>
<p>Container already mounted</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT umountscripts which are executed for a container before it is<td width="11%">unmounted. Scripts are executed in the host system context,while a CT is mounted. Global script, if exists, is executedfirst.</td><td width="4%"p>
<pstyle="margin-left:11%;">43<b>vps.postumount</pb>,<i>CTID</tdi><td width="7%"b>.postumount</tdb><td width="78%"/p>
<p>Container private area not found</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT umountscripts which are executed for a container right after it isunmounted. Otherwise they are the same as <td width="11%"b>.umount</tdb>scripts.<td width="4%"/p>
<pstyle="margin-left:11%; margin-top: 1em">The environmentpassed to all the <b>*mount</b>44scripts is the standardenvironment of the parent (i.e. <b>vzctl</pb>) with twoadditional variables: <b>$VEID</b> and <b>$VE_CONFFILE</tdb>.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 <td width="7%"b>$VE_ROOT</tdb>, it needs to get thosefrom global and per-CT configuration files.<td width="78%"/p>
<pstyle="margin-left:11%; margin-top: 1em">Container private area already existsHere is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container(s). Script name can eitherbe <b>/petc/vz/conf/vps.mount</b> or<b>/etc/vz/conf/</tdb></tri>CTID<tr valign="top" align="left"/i><td width="11%"b>.mount</tdb>.<td width="4%"/p>
<ppre style="margin-left:11%; margin-top: 1em">46< # 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=/p><mnt/td>disk<td width DST="7%"></td>mnt/disk mount -n -t simfs $SRC ${VE_ROOT}${DST} -o $SRC<td width="78%"/pre>
== EXIT STATUS == <pstyle="margin-left:11%; margin-top: 1em">Not enough disk spaceReturns 0 uponsuccess, or an appropriate error code in case of anerror:</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="4%">
<p>471</p></td>
<td width="7%"></td>
<td width="78%">
<p>Bad/broken container (<b>/sbin/init</b> or<b>/bin/sh</b> not found)Failed to set a UBC parameter</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>482</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable Failed to create set a new container private areafair scheduler parameter</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>493</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to create a new container root areaGeneric system error</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>505</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to mount containerThe 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>516</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to unmount containerNot enough system resources</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>527</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to delete a container<b>ENV_CREATE</b> ioctl failed</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>538</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container private area not existCommand 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>609</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container is locked by another <b>vzquota onvzctl</b> failedinvocation</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>6110</p></td>
<td width="7%"></td>
<td width="78%">
<p>Global OpenVZ configuration file [[Man/vz.conf.5|<b>vzquota initvz.conf</b> failed(5)]] notfound</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>6211</p></td>
<td width="7%"></td>
<td width="78%">
<p><b>vzquota setlimit</b> failedA vzctl helper script file not found</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>6312</p></td>
<td width="7%"></td>
<td width="78%">
<p>Parameter <b>DISKSPACE</b> not setPermission denied</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>6413</p></td>
<td width="7%"></td>
<td width="78%">
<p>Parameter <b>DISKINODES</b> not setCapability setting failed</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>6514</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting second-level Container configuration file [[Man/ctid.conf.5|<b>ctid.conf</b>(ugid5) quota]] notfound</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>6615</p></td>
<td width="7%"></td>
<td width="78%">
<p>Timeout on <b>vzquota offvzctl exec</b> failed</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>6716</p></td>
<td width="7%"></td>
<td width="78%">
<p>ugid quota not initializedError during <b>vzctl suspend</b></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>7117</p></td>
<td width="7%"></td>
<td width="78%">
<p>Incorrect IP address formatError during <b>vzctl resume</b></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>7418</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error changing passwordfrom <b>setluid()</b> syscall</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>7820</p></td>
<td width="7%"></td>
<td width="78%">
<p>IP address already in useInvalid command line parameter</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>7921</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container action script returned an errorInvalid value for command line parameter</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>8222</p></td>
<td width="7%"></td>
<td width="78%">
<p>Config file copying errorContainer root directory (<b>VE_ROOT</b>) not set</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>8623</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting devices Container private directory (<b>--devicesVE_PRIVATE</b> or) not<b>--devnodes</b>)set</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>8924</p></td>
<td width="7%"></td>
<td width="78%">
<p>IP address Container template directory (<b>TEMPLATE</b>) not availableset</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>9128</p></td>
<td width="7%"></td>
<td width="78%">
<p>OS template not foundNot 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>10029</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable OS template is not specified, unable to find createcontainer IP address</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>10431</p></td>
<td width="7%"></td>
<td width="78%">
<p><b>VE_NETDEV</b> ioctl errorContainer not running</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>10532</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container start disabledalready running</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>10633</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to set iptables on a running stop container</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>10734</p></td>
<td width="7%"></td>
<td width="78%">
<p>Distribution-specific configuration file not foundUnable to add IP address to container</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>10940</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to apply a configContainer not mounted</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>12941</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to set meminfo parameterContainer already mounted</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>13043</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting veth interfaceContainer private area not found</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>13144</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting container nameContainer private area already exists</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>13346</p></td>
<td width="7%"></td>
<td width="78%">
<p>Waiting for container start failedNot enough disk space</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>13947</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error saving Bad/broken container configuration file(<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>14848</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting Unable to create a new container IO parameters (ioprio)private area</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>15049</p></td>
<td width="7%"></td>
<td width="78%">
<p>Ploop image file not foundUnable to create a new container root area</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>15150</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>Error creating ploop imageUnable to delete a container</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>15253</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error mounting ploop imageContainer private area not exist</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>15360</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error unmounting ploop image<b>vzquota on</b> failed</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>15461</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>133</p></td><td width="7%"></td><td width="78%"> <p>Waiting for container start failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>139</p></td><td width="7%"></td><td width="78%"> <p>Error saving container configuration file</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>148</p></td><td width="7%"></td><td width="78%"> <p>Error setting container IO parameters (ioprio)</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>150</p></td><td width="7%"></td><td width="78%"> <p>Ploop image file not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>151</p></td><td width="7%"></td><td width="78%"> <p>Error creating ploop image</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>152</p></td><td width="7%"></td><td width="78%"> <p>Error mounting ploop image</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>153</p></td><td width="7%"></td><td width="78%"> <p>Error unmounting ploop image</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>154</p></td><td width="7%"></td><td width="78%"> <p>Error resizing ploop image</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>155</p></td><td width="7%"></td><td width="78%"> <p>Error converting container to ploop layout</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>156</p></td><td width="7%"></td><td width="78%"> <p>Error creating ploop snapshot</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>157</p></td><td width="7%"></td><td width="78%"> <p>Error merging ploop snapshot</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>158</p></td><td width="7%"></td><td width="78%"> <p>Error deleting ploop snapshot</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>159</p></td><td width="7%"></td><td width="78%"> <p>Error switching ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>158166</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error deleting compacting ploop snapshotimage</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>159167</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error switching listing ploop snapshotsnapsots</p></td></tr>
</table>
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2000-20112013, Parallels, Inc. Licensed under GNU GPL.</p>
2,253
edits