Changes

Jump to: navigation, search

Man/vzctl.8

32,084 bytes added, 18:21, 23 April 2015
Automated import of articles *** existing text overwritten ***
<p style="margin-left:11%; margin-top: 1em">vzctl &minus;
utility to control perform various operations on an OpenVZ container.</p>
== SYNOPSIS ==
<p styletable width="margin-left:11100%; margin-top: 1em">vzctlborder="0" rules="none" frame="void"[<i>flags</i>] <b>create</b> <i>CTID</i cellspacing="0" cellpadding="0">[<b>--ostemplate</b> <i>name</i>] [<b>--config</btr valign="top" align="left"><i>name</i>] [<b>--private</b> <itd width="11%">path</i>] [<b>--root</btd><i>path</i>] [<b>--ipadd</b> <i>addr</i>] [<b>--hostname</b><i>name</i>]</ptd width="7%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<ib>flagsvzctl</i>] <b>set</bp> <i>CTID parameters</itd>[<btd width="2%">--save</btd>]</ptd width="80%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<i>flags</i>] <b>destroycreate</b> | <bi>mountCTID --parameter value</bi> | <b>umount[...]</bp>| <b>start</btd> | <b>stop</btr> | <b>restart</btr valign="top" align="left"> |<btd width="11%">status</btd> | <b>quotaon</b> | <b>quotaoff</b> |<b>quotainit</b> <i>CTID</i></ptd width="7%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<ib>flagsvzctl</i>] <b>exec</b> | <bp>exec2</b> <itd>CTIDcommand</i> [<itd width="2%">arg</itd> ...]</ptd width="80%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<i>flags</i>] <b>enterstart</b> <i>CTID</i> [<b>--execwait</b>][<ib>command--force</ib> ] [<ib>arg--skip-fsck</ib> ...][<b>--skip-remount</b>]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<ib>flagsvzctl</ib>] <b/p>runscript</btd> <itd width="2%">CTID script</itd></ptd width="80%">
<p style="margin-left:11%; margin-top: 1em">vzctl[<i>flags</i>] <b>stop</b> <i>CTID</i> [<b>--helpfast</b> | ][<b>--versionskip-umount</b>]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width= DESCRIPTION =="80%">
<p style="margin>[<i>flags</i>] <b>restart</b> <i>CTID</i>[<b>--wait</b>] [<b>--force</b>] [<b>-left:11%; margin-top: 1em"fast</b>Utility][<b>vzctl--skip-fsck</b> runs on the host system (otherwise known as] [<b>--skip-remount</b>]</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>suspend</b> | <b>resume</b><i>CTID</i> [<b>--dumpfile&nbsp;</b><i>name</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>[<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="margin-top: 1em"align="left"><td width="11%"></td>These flags come before acommand, and can be used with any command. They affect<td width="7%">logging to console (terminal) only, and do not affectlogging to a log file.<p><b>vzctl</b></p></td><td width="2%"></td><td width="80%">
<p style="margin>[<i>flags</i>] <b>snapshot-switch</b> <i>CTID</i>[<b>--skip-resume</b> | <b>--must-resume</b>][<b>--skip-left:11%;"config</b>] <b>--quietid</b> <i>uuid</i></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style><b>vzctl</b></p></td><td width="margin-left:172%;">Disables output. Note that</td>scripts run by vzctl are still able to produce someoutput.</ptd width="80%">
<p style="margin>[<i>flags</i>] <b>snapshot-left:11%;"delete</b> <i>CTID</i><b>--verboseid</b> <i>uuid</i></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:17%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of <b>VERBOSEvzctl</b> parameter in theglobal configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]], or to <bp>0</btd>if not set by <btd width="2%">VERBOSE</btd> parameter.</ptd width="80%">
<p>[<i>flags</i>] <b>snapshot-mount</b> <i>CTID</i><b>--id</b> <i>uuid</i> <b>--target</b> <i>dir</i></p></td></tr><tr valign="top" align="left"><td width= Setting container parameters =="11%"></td><td width="7%">
<p style="margin-left:11%;"><b>setvzctl</b> <i>CTIDparameters</i> [<bp>--save</btd>] [<btd width="2%">--force</btd>]</ptd width="80%">
<p style="margin-left:17%;">This command sets variouscontainer parameters. If a [<i>flags</i>] <b>snapshot--saveumount</b> flag is given,parameters are saved in container configuration file[[Man/ctid.conf.5|<bi>ctid.confCTID</bi>(5)]]. Use <b>--forceid</b> to save the<i>uuid</i></p></td></tr>parameters even if the current kernel doesn&rsquo;t support<tr valign="top" align="left">OpenVZ. If the container is currently running, <btd width="11%">vzctl</btd>applies these parameters to the container.</ptd width="7%">
<p style="margin-left:17%; margin-top: 1em">The followingparameters can be used with <b>setvzctl</b> command.</p></td><td width="2%"></td><td width="80%">
==== Miscellaneous ====<p style="margin>[<i>flags</i>] <b>snapshot-left:11%;"list</b> <i>CTID</i>[<b>-H</b>] [<b>-onboot yeso</b>|<i>field</i>[,<i>field</i>...][<b>no--id</b><i>uuid</i>]</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style><b>vzctl</b></p></td><td width="margin-left:172%;">Sets whether the container willbe started during system boot. The container will not beauto-started unless this parameter is set to <i>yes</itd>.</ptd width="80%">
<p style>[<i>flags</i>] <b>set</b> <i>CTID --parameter value</i>[...] [<b>--save</b>] [<b>--force</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>]</p> </td></tr><tr valign="top" align="margin-left:"><td width="11%;"></td><td width="7%"> <p><b>--bootordervzctl</b></p></td><itd width="2%">number</itd></ptd width="80%">
<p style="margin-left:17%;">Sets the boot order priorityfor this CT. The higher the [<i>flags</i>] <b>set</b> <i>numberCTID</i> is, the earlier inthe boot process this container starts. By default thisparameter is unset, which is considered to be the lowestpriority, so containers with unset <b>bootorder--reset_ub</b> will</p> </td></tr>start last.<tr valign="top" align="left"><td width="11%"></ptd><td width="7%">
<p style="margin-left:11%;"><b>--rootvzctl</b> <i/p>path</itd><td width="2%"></ptd><td width="80%">
<p style="margin-left:17%;">Sets the path to root directory[<i>flags</i>] <b>destroy</b> | <b>delete</b> |for this container. This is essentially a <b>mount point forcontainer&rsquo;s root directory. Argument can contain</b> | <b>umount</b> | <b>status</b> |literal string <b>$VEIDquotaon</b>, which will be substituted withthe numeric CT ID. Changing this parameter is notrecommended, better edit [[Man| <b>quotaoff</vz.conf.5b> |<b>vz.confquotainit</b>(5)]] globalconfiguration file.<i>CTID</i></p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%;"><b>--userpasswdvzctl</b><i/p>user</itd>:<itd width="2%">password</itd></ptd width="80%">
<p style="margin-left:17%;">Sets password for the givenuser in a container, creating the user if it does notexists. Note that this option is not saved in configurationfile at all (so [<i>flags</i>] <b>--saveconsole</b> flag is useless), it is<i>CTID</i>applied to the container (by modifying its [<i>ttynum</etci>]</passwd andp> </etctd></shadow files).tr><tr valign="top" align="left"><td width="11%"></ptd><td width="7%">
<p style><b>vzctl</b></p></td><td width="margin-left:172%; margin-top: 1em">In case</td>container root filesystem is not mounted, it isautomatically mounted, then all the appropriate file changesare applied, then it is unmounted.</ptd width="80%">
<p style>[<i>flags</i>] <b>convert</b> <i>CTID</i>[<b>--layout&nbsp;ploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]]</p> </td></tr><tr valign="top" align="margin-left:17"><td width="11%; margin-top: 1em">Note that</td>container should be created before using this option.</ptd width="7%">
<p style="margin-left:11%;"><b>--disabledvzctl</b><i/p>yes</itd>|<itd width="2%">no</itd></ptd width="80%">
<p style>[<i>flags</i>] <b>compact</b> <i>CTID</i></p></td></tr><tr valign="top" align="margin-left:17%;">Disable container start. Toforce the start of a disabled container, use <btd width="11%">vzctl start--force</btd>.</ptd width="7%">
<p style="margin-left:11%;"><b>--namevzctl</b> <i/p>name</itd><td width="2%"></ptd><td width="80%">
<p style="margin-left:17%;">Add a name for a container. The[<i>nameflags</i> can later be used in subsequent calls to] <b>exec</b> | <b>vzctlexec2</b> in place of <i>CTIDcommand</i> [<i>arg</i>...]</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%">
<p style="margin-left:11%;"><b>--descriptionvzctl</b></p></td><itd width="2%">string</itd></ptd width="80%">
<p style>[<i>flags</i>] <b>enter</b> <i>CTID</i>[<b>--exec&nbsp;</b><i>command&nbsp;</i>[<i>arg&nbsp;</i>...]]</p> </td></tr><tr valign="top" align="margin-left:17"><td width="11%;">Add a textual description for a</td>container.</ptd width="7%">
<p style="margin-left:11%;"><b>--setmoderestartvzctl</b>|<b/p>ignore</btd><td width="2%"></ptd><td width="80%">
<p style>[<i>flags</i>] <b>runscript</b> <i>CTID script</i></p></td></tr><tr valign="top" align="margin-left:17"><td width="11%;">Whether to restart a container</td>after applying parameters that require the container to berestarted in order to take effect.</ptd width="7%">
==== Networking ====<p style="margin-left:11%;">--ipadd<b>vzctl</b> <i/p>addr</itd><td width="2%"></ptd><td width="80%">
<p style="margin><b>-left:17%;"-help</b>Adds IP address to a givencontainer. Note that this option is incremental, so| <ib>addr--version</ib> are added to already existing ones.</p></td></tr></table>
<p style="margin-left:11%;"><b>--ipdel</b> <i>addr</i> |<b>all</b></p>= DESCRIPTION ==
<p style="margin-left:1711%;margin-top: 1em">Removes IP address Utility<ib>addrvzctl</ib>runs on the host system (otherwise known asfrom a container. If you want to remove all the addressesHardware Node,or HN) and performs direct manipulations withuse <b>--ipdel all</b>containers (CTs).</p>
<p style="margin-left:11%;margin-top: 1em">Containers canbe referred to by either numeric <i>CTID</i> or by name (see<b>--hostnamename</b>option). Note that CT ID &lt;= 100 arereserved for OpenVZ internal purposes. A numeric ID shouldnot be more than <ib>name2147483644</ib>.</p>
<p style="margin-left:17%;">Sets container hostname.<b>vzctl</b> writes it to the appropriate file inside acontainer (distribution-dependent).</p>= OPTIONS ==
<p style="margin-left:11%;"><b>--nameserver</b><i>addr</i></p>== Flags ===
<p style="margin-lefttop:17%;1em">Sets DNS server IP address forThese flags come before a container. If you want to set several nameservers, youshould do it at oncecommand, so use <b>--nameserver</b> optionand can be used with any command. They affectmultiple times in one call logging to <b>vzctl</b>console (terminal) only, as all the nameand do not affectserver values set in previous calls logging to <b>vzctl</b> areoverwrittena log file.</p>
<p style="margin-left:11%;"><b>--searchdomainquiet</b><i/p>name </ip style="margin-left:17%;">Disables output. Note thatscripts run by vzctl are still able to produce someoutput.</p>
<p style="margin-left:1711%;">Sets DNS search domains for acontainer. If you want to set several search domains, youshould do it at once, so use <b>--searchdomainverbose</b> optionmultiple times in one call to <b>vzctl</b>, as all thesearch domain values set in previous calls to <b>vzctl</b>are overwritten.</p>
<p style="margin-left:1117%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of <b>--netif_addVERBOSE</b>parameter in the<i>ifnameglobal configuration file [[<Man/i>,vz.conf.5|<ib>macvz.conf</ib>(5)]],or to <ib>host_ifname0</ib>,if not set by <ib>host_macVERBOSE</i>,<i>bridge]</ib>parameter.</p>
<p style="margin-left:17%;">Adds a virtual Ethernet device(veth) to a given container. Here <i>ifname</i> is theEthernet device name in the == Setting container, <i>mac</i> is its MACaddress, <i>host_ifname</i> is the Ethernet device name onthe host, and <i>host_mac</i> is its MAC address. MACaddresses should be in the format like XX:XX:XX:XX:XX:XX.<i>bridge</i> is an optional parameter which can be used incustom network start scripts to automatically add theinterface to a bridge. All parameters except <i>ifname</i>are optional and are automatically generated if notspecified.</p>===
<p styletable width="margin-left:11100%;" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><b>--netif_del</btr valign="top" align="left"><itd width="11%">dev_name</itd> | <b>all</b></ptd width="4%">
<p style="margin-lefttop:17%;1em">Removes virtual Ethernet devicefrom a container. If you want to remove all devices, use<b>allset</b>.</p></td><td width="2%"></td><td width="83%">
<p style="margin-top: 1em"><i>CTID</i>[<b>--onboot&nbsp;yes</b>|<b>no</b>][<b>--bootorder&nbsp;</b><i>number</i>][<b>--root&nbsp;</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>][<b>--mount_opts&nbsp;</b><i>options</i>][<b>--userpasswd&nbsp;</b><i>user</i>:<i>pass</i>][<b>--disabled&nbsp;yes</b>|<b>no</b>][<b>--name&nbsp;</b><i>name</i>][<b>--description&nbsp;</b><i>string</i>][<b>--ostemplate&nbsp;</b><i>string</i>][<b>--stop-timeout&nbsp;</b><i>seconds</i>][<b>--ipadd&nbsp;</b><i>addr</i>][<b>--ipdel&nbsp;</b><i>addr</i>|<b>all</b>][<b>--hostname&nbsp;</b><i>name</i>][<b>--nameserver&nbsp;</b><i>addr</i>][<b>--searchdomain&nbsp;</b><i>name</i>][<b>--netif_add&nbsp;</b><i>dev</i>[,<i>params</i>...]][<b>--netif_del&nbsp;</b><i>dev</i>|<b>all</b>][<b>--ifname</b> <i>dev</i>[<b>--mac&nbsp;</b><i>hwaddr</i>][<b>--host_ifname&nbsp;</b><i>dev</i>][<b>--host_mac&nbsp;</b><i>hwaddr</i>][<b>--bridge&nbsp;</b><i>name</i>][<b>--mac_filter&nbsp;on</b>|<b>off</b>]][<b>--numproc&nbsp;</b><i>items</i>][<b>--numtcpsock&nbsp;</b><i>items</i>][<b>--numothersock&nbsp;</b><i>items</i>][<b>--vmguarpages&nbsp;</b><i>pages</i>][<b>--kmemsize&nbsp;</b><i>bytes</i>][<b>--tcpsndbuf&nbsp;</b><i>bytes</i>][<b>--tcprcvbuf&nbsp;</b><i>bytes</i>][<b>--othersockbuf&nbsp;</b><i>bytes</i>][<b>--dgramrcvbuf&nbsp;</b><i>bytes</i>][<b>--oomguarpages&nbsp;</b><i>pages</i>][<b>--lockedpages&nbsp;</b><i>pages</i>][<b>--privvmpages&nbsp;</b><i>pages</i>][<b>--shmpages&nbsp;</b><i>pages</i>][<b>--numfile&nbsp;</b><i>items</i>][<b>--numflock&nbsp;</b><i>items</i>][<b>--numpty&nbsp;</b><i>items</i>][<b>--numsiginfo&nbsp;</b><i>items</i>][<b>--dcachesize&nbsp;</b><i>bytes</i>][<b>--numiptent&nbsp;</b><i>num</i>][<b>--physpages&nbsp;</b><i>pages</i>][<b>--swappages&nbsp;</b><i>pages</i>][<b>--ram&nbsp;</b><i>bytes</i>][<b>--swap&nbsp;</b><i>bytes</i>][<b>--vm_overcommit&nbsp;</b><i>float</i>][<b>--cpuunits&nbsp;</b><i>num</i>][<b>--cpulimit&nbsp;</b><i>num</i>][<b>--cpus&nbsp;</b><i>num</i>][<b>--cpumask&nbsp;</b><i>cpus</i>|<b>auto</b>|<b>all</b>][<b>--nodemask&nbsp;</b><i>nodes</i>|<b>all</b>][<b>--meminfo&nbsp;none</b>|<i>mode</i>:<i>value</i>][<b>--iptables&nbsp;</b><i>name</i>[<b>,</b>...]][<b>--netfilter&nbsp;disabled</b>|<b>stateless</b>|<b>stateful</b>|<b>full</b>][<b>--netdev_add&nbsp;</b><i>ifname</i>][<b>--netdev_del&nbsp;</b><i>ifname</i>][<b>--diskquota&nbsp;yes</b>|<b>no</b>][<b>--diskspace&nbsp;</b><i>num</i>][<b>--diskinodes&nbsp;</b><i>num</i>][<b>--quotatime&nbsp;</b><i>seconds</i>][<b>--quotaugidlimit&nbsp;</b><i>num</i>][<b>--capability&nbsp;</b><i>capname</i>:<b>on</b>|<b>off</b>[<b>,</b>...]][<b>--devnodes&nbsp;</b><i>param</i>][<b>--devices&nbsp;</b><i>param</i>][<b>--pci_add&nbsp;</b><i>dev</i>][<b>--pci_del&nbsp;</b><i>dev</i>][<b>--features&nbsp;</b><i>name</i>:<b>on</b>|<b>off</b>[<b>,</b>...]][<b>--applyconfig&nbsp;</b><i>name</i>][<b>--applyconfig_map&nbsp;</b><i>group</i>][<b>--ioprio&nbsp;</b><i>num</i>][<b>--iolimit&nbsp;</b><i>mbps</i>][<b>--iopslimit&nbsp;</b><i>iops</i>] [<b>--save</b>][<b>--force</b>] [<b>--reset_ub</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>]</p> </td></tr><tr valign="top" align="left"><td width= Veth interface configuration ="11%"></td><td width="4%"></td><td width="2%"></td><td width="83%">
<p style="margin-left:11%; margin-top: 1em">The followingoptions can be used to reconfigure the already-createdvirtual Ethernet interfaceThis command sets various container parameters. To select If the interface toconfigurecontainer is currently running, use <b>--ifnamevzctl</b> applies theseparameters to the container. The following options can beused with <ib>nameset</ib> optioncommand. <b/p><br>--mac</b> <itd>XX:XX:XX:XX:XX:XX</itr></ptable>
<p style="margin-left:22%;">MAC address of interface insidea container.</p>=== Flags ====
<p style="margin-left:11%;"><b>--host_ifnamesave</b><i>name</i></p>
<p style="margin-left:2217%;">interface name for virtualIf this flag is given,interface parameters are saved in the host systemcontainer configuration file[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]].</p>
<p style="margin-left:11%;"><b>--host_macforce</b><i>XX:XX:XX:XX:XX:XX</i></p>
<p style="margin-left:2217%;">MAC address of interface in If this flag is given togetherwith <b>--save</b>, parameters are saved even if thecurrentkernel doesn&rsquo;t support OpenVZ. Note this flag does notmake sense without <b>--save</b>, so <b>--save</b> ishost systemrequired.</p>
<p style="margin-left:11%;"><b>--bridgereset_ub</b> <i>name</i></p>
<p style="margin-left:2217%;">Bridge nameIf this flag is given,<b>vzctl</b> applies all User Beancounter parameters fromthe configuration file to a running container. This ishelpful in case configuration file is modified manually. Custom networkstart scripts Please note this flag is exclusive, i.e. it can use this value to automatically add thenot beinterface to a bridgecombined with any other options or flags.</p>
<p style="margin-left:11%;"><b>--mac_filtersetmode restart</b>|<ib>on|offignore</ib></p>
<p style="margin-left:2217%;">Enables/disables MAC addressA few parameters can only befiltering for applied by restarting the Container veth device and the possibilitycontainer. By default,of configuring the MAC address of this device from inside<b>vzctl</b> prints a warning if such parameters arethe Containersupplied and a container is running. If the filtering is turned on: Use <brb>--setmode&bull; the veth device accepts only those packets that haverestart</b> together with <b>--save</b> flag to restart acontainer in such a MAC address in their headers corresponding to that of thisdevice (excluding all broadcast and multicast packets); case, or <b>--setmode ignore<br/b>&bull; it is impossible to modify the veth MAC address frominside suppress the Containerwarning.</p>
<p style="margin-left:22%; margin-top: 1em">By default,this functionality is enabled for all veth devices existinginside the Container.</p>=== Miscellaneous ====
<p style==== Resource limits ===="margin-left:11%;"><b>--onboot yes</b> |<b>no</b></p>
<p style="margin-left:2217%; margin-top: 1em">The followingoptions sets barrier and limit for various userSets whether the container willbeancountersbe started during system boot. Each option requires one or two arguments. InThe container will be startedcase of one argument, on boot by <b>vzctlvz</b> sets barrier and limit initscript if either this parameter isset to<b>yes</b>, or the same value. In case of two colon-separated arguments,container was running just beforethe first is a barrierlast reboot, and the second this parameter is a limit. Eachargument is either a number, a number with a suffix, or aspecial value not set to <b>unlimitedno</b>.Default value is unset, meaning the container will bestarted if it was running before the last reboot.</p>
<p style="margin-left:2211%; margin-top: 1em">Arguments arein items, pages or bytes. Note that page size isarchitecture<b>--specific, it is 4096 bytes on IA32bootorder</b>platform.<i>number</i></p>
<p style="margin-left:2217%; margin-top: 1em">You can alsoSets the boot order priorityspecify different suffixes for this CT. The higher the <bi>setnumber</bi> parameters (exceptis, the earlier infor the parameters which names start with <b>num</b>)boot process this container starts. ForBy default thisexampleparameter is unset, <b>vzctl set</b> <i>CTID</i> <b>--privvmpageswhich is considered to be the lowest5M:6M</b> should set priority, so containers with unset <b>privvmpagesbootorder</b>&rsquo; barrier to 5willmegabytes and its limit to 6 megabytesstart last.</p>
<p style="margin-left:2211%; margin-top: 1em">Availablesuffixes are: <b><br>g</b>, <b>G</b> -- gigabytes. <b><br>mroot</b>, <bi>Mpath</bi> -- megabytes. <b><br>k</b>, <b>K</b> -- kilobytes. <b><br>p</b>, <b>P</b> -- pages (page is 4096 bytes on x86architecture, other architectures may differ).</p>
<p style="margin-left:2217%; margin-top: 1em">You can alsoSets the path to root directoryspecify the literal word (<b>unlimitedVE_ROOT</b> in place of ) for this container. This is essentially anumbermount point for container&rsquo;s root directory. In that case the corresponding value will be set toArgumentcan contain literal string <b>LONG_MAX$VEID</b>, i. e. which will besubstituted with the maximum possible valuenumeric CT ID.</p>
<p style="margin-left:11%;"><b>--numprocprivate</b><i>itemspath</i>[:<i>items</i>]</p>
<p style="margin-left:2217%;">Maximum number of processes andSets the path to privatekernel-level threadsdirectory (<b>VE_PRIVATE</b>) for this container. Setting This is adirectory in which all the barrier and container&rsquo;s files arestored. Argument can contain literal string <b>$VEID</b>,which will be substituted with the limit todifferent values does not make practical sensenumeric CT ID.</p>
<p style="margin-left:11%;"><b>--numtcpsockmount_opts</b><i>itemsoption</i>[:<b>,</b><i>itemsoption</i>...]</p>
<p style="margin-left:2217%;">Maximum number of TCP socketsSets additional mount optionsfor container file system.Only applicable for <b>ploop</b>This parameter limits the number of TCP connections and,thuslayout, the number of clients the server application canhandle in parallel. Setting the barrier and the limit todifferent values does not make practical senseignored otherwise.</p>
<p style="margin-left:11%;"><b>--numothersockuserpasswd</b><i>itemsuser</i>[:<i>itemspassword</i>]</p>
<p style="margin-left:2217%;">Maximum number of non-TCPSets password for the givenuser in a container, creating the user if it does notexists. Note that this option is not saved in configurationsockets file at all (local socketsso <b>--save</b> flag is useless), UDP and other types of sockets).it isSetting applied directly to the barrier and container, by runningdistribution-specific programs inside the limit container. It isnot recommended to different values doescombine this option with any othernot make practical senseoptions.</p>
<p style="margin-left:1117%;margin-top: 1em"><b>--vmguarpages</b>In casecontainer was not running, it is automatically started thenall the appropriate changes are applied, then it is<i>pages</i>[:<i>pages</i>]stopped.</p>
<p style="margin-left:2217%;margin-top: 1em">Memory allocation guarantee.This parameter controls how much memory is available to acontainer. The barrier is the amount of memory Note 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>created before using this option.</p>
<p style="margin-left:11%;"><b>--kmemsizedisabled yes</b>|<ib>bytesno</i>[:<i>bytes</ib>]</p>
<p style="margin-left:2217%;">Maximum amount of kernel memoryusedDisable container start. This parameter is related to <b>--numproc</b>. EachToprocess consumes certain amount force the start of kernel memory - 16 KB atleast, 30-50 KB typically. Very large processes may consumea bit more. It is important to have a certain safety gapbetween the barrier and the limit of this parameter: equalbarrier and limit may lead to the situation where the kernelwill need to kill disabled container&rsquo;s applications to keep the, use <b>kmemsizevzctl start--force</b> usage under the limit.</p>
<p style="margin-left:11%;"><b>--tcpsndbufname</b><i>bytesname</i>[:<i>bytes</i>]</p>
<p style="margin-left:2217%;">Maximum size of TCP sendbuffersAdd a name for a container. Barrier should be not less than 64 KB, andThedifference between barrier and limit should <i>name</i> can later be equal used in subsequent calls to ormore than value of <b>numtcpsockvzctl</b> multiplied by 2in place of <i>CTID</i>.5Note this option canKBnot be used without <b>--save</b>.</p>
<p style="margin-left:11%;"><b>--tcprcvbufdescription</b><i>bytesstring</i>[:<i>bytes</i>]</p>
<p style="margin-left:2217%;">Maximum size of TCP receiveAdd a textual description for abuffers. 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.5KBcontainer.</p>
<p style="margin-left:11%;"><b>--othersockbufostemplate</b><i>bytesstring</i></p> <p style="margin-left:17%;">Sets a new value of<b>OSTEMPLATE</b> parameter in container configuration file[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]]. Requires <b>--save</b> 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:11%;"><b>--stop-timeout</b><i>bytesseconds</i>]</p> <p style="margin-left:17%;">Sets a time to wait forcontainer to stop on <b>vzctl stop</b> before forciblykilling it, in seconds. Note this option can not be usedwithout <b>--save</b> flag.</p>
<p style="margin-left:2217%;margin-top: 1em">Maximum size Special valueof other (non-TCP)socket send buffers. If container&rsquo;s processes needs <b>0</b> means tosend very large datagrams, the barrier should be setaccordingly. Increased limit is necessary for highperformance of communications through local (UNIXuse compiled-domain)socketsin default.</p>
<p style="margin-left:11%;"><b>--dgramrcvbuf</b><i>bytes</i>[:<i>bytes</i>]</p>=== Networking ====
<p style="margin-left:2211%;">Maximum size of other (non<b>-TCP)socket receive buffers. If container&rsquo;s processes needsto receive very large datagrams, the barrier should be setaccordingly. The difference between the barrier and thelimit is not needed.-ipadd</b> <i>addr</i></p>
<p style="margin-left:1117%;">Adds an IP address <bi>--oomguarpagesaddr</bi>to a given container. Address can optionally have a netmaskspecified in the CIDR notation (e.g. <ib>pages10.1.2.3/25</ib>[:).Note that this option is incremental, so <i>pagesaddr</i>]areadded to already existing ones.</p>
<p style="margin-left:2211%;">Guarantees against OOM kill.Under this beancounter the kernel accounts the total amountof memory and swap space used by the container&rsquo;sprocesses. The barrier of this parameter is theout<b>-of-memory guarantee. If the ipdel</b> <i>addr</i> |<b>oomguarpagesall</b> usage is</p>below the barrier, processes of this container areguaranteed not to be killed in out<p style="margin-of-memory situations. Themeaning of limit is currently unspecifiedleft:17%; it should be set">Removes IP address <i>addr</i>from a container. If you want to remove all the addresses,use <b>unlimited--ipdel all</b>.</p>
<p style="margin-left:11%;"><b>--lockedpageshostname</b><i>pagesname</i>[:<i>pages</i>]</p>
<p style="margin-left:2217%;">Maximum number of pagesSets container hostname.acquired by <b>mlockvzctl</b>writes it to the appropriate file inside acontainer (2distribution-dependent).</p>
<p style="margin-left:11%;"><b>--privvmpagesnameserver</b><i>pagesaddr</i>[:<i>pages</i>]</p>
<p style="margin-left:2217%;">Allows controlling the amountSets DNS server IP address forof memory allocated by the applicationsa container. For shared (mappedIf you want to set several nameservers, youas should do it at once, so use <b>MAP_SHARED--nameserver</b>) pages, each container really using amemory page is charged for the fraction of the page(depending on the number of others using it). For&quot;potentially private&quot; pages (mapped asoptionmultiple times in one call to <b>MAP_PRIVATEvzctl</b>), container is charged either for afraction of as all the size or for the full size if the allocatednameaddress space. In the latter case, the physical pagesassociated with the allocated address space may be server values set inprevious calls to <b>vzctl</b> arememory, in swap or not physically allocated yetoverwritten.</p>
<p style="margin-left:2217%; margin-top: 1em">The barrier andA special valuethe limit of this parameter control the upper boundary ofthe total size of allocated memory. Note that this upperboundary does not guarantee that container will <b>inherit</b> can be able used toauto-propagate nameserverallocate that much memory. The primary mechanism to controlvalue(s) from the host system&rsquo;smemory allocation is the <b>--vmguarpages/etc/resolv.conf</b> guaranteefile.</p>
<p style="margin-left:11%;"><b>--shmpagessearchdomain</b><i>pagesname</i>[:<i>pages</i>]</p>
<p style="margin-left:2217%;">Maximum IPC SHM segment sizeSets DNS search domains for acontainer.If you want to set several search domains, youSetting should do it at once, so use <b>--searchdomain</b> optionmultiple times in one call to <b>vzctl</b>, as all the barrier and the limit search domain values set in previous calls to different values does<b>vzctl</b>not make practical senseare overwritten.</p>
<p style="margin-left:1117%;margin-top: 1em">A special valueof <b>--numfileinherit</b>can be used to auto-propagate searchdomain value(s) from the host system&rsquo;s<ib>items</i>[:<i>itemsetc/resolv.conf</ib>]file.</p>
<p style="margin-left:2211%;">Maximum number of open files.In most cases the barrier and the limit should be set to thesame value. Setting the barrier to <b>0--netif_add</b> effectivelydisables pre-charging optimization for this beancounter inthe kernel<i>ifname[</i>,<i>mac</i>,<i>host_ifname</i>,<i>host_mac</i>, which leads to the held value being precise butcould slightly degrade file open performance.<i>bridge]</i></p>
<p style="margin-left:1117%;">Adds a virtual Ethernet device(veth) to a given container. Here <i>ifname</i> is theEthernet device name in the container, <bi>mac</i> is its MACaddress, <i>--numflockhost_ifname</bi>is the Ethernet device name onthe host, and <i>itemshost_mac</i>[is its MAC address. MACaddresses should be in the format like XX:XX:XX:XX:XX:XX.<i>bridge</i>itemsis 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:2211%;">Maximum number of file locks.<b>--netif_del</b>Safety gap should be between barrier and limit.<i>dev_name</i> | <b>all</b></p>
<p style="margin-left:1117%;">Removes virtual Ethernet devicefrom a container. If you want to remove all devices, use<b>--numptyall</b><i>items</i>[:<i>items</i>].</p>
<p style="margin-left:22%;">Number of pseudo-terminals(PTY). Note that in OpenVZ each container can have not morethan 255 PTYs. Setting the barrier and the limit todifferent values does not make practical sense.</p>=== veth interface configuration ====
<p style="margin-left:11%;margin-top: 1em">The followingoptions can be used to reconfigure the already-createdvirtual Ethernet interface. To select the interface toconfigure, use <b>--numsiginfoifname</b><i>itemsname</i>[:option. <b><br>--mac</b> <i>itemsXX:XX:XX:XX:XX:XX</i>]</p>
<p style="margin-left:22%;">Number MAC address of siginfo structures.interface insideSetting the barrier and the limit to different values doesnot make practical sensea container.</p>
<p style="margin-left:11%;"><b>--dcachesizehost_ifname</b><i>bytesname</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">Maximum size ofinterface name for virtualfilesystem-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 gapshould be between barrier and limitinterface in the host system.</p>
<p style="margin-left:11%;"><b>--numiptenthost_mac</b><i>num</i>[XX:XX:XX:XX:XX:<i>numXX</i>]</p>
<p style="margin-left:22%;">Number MAC address of iptables (netfilter)entries. Setting the barrier and interface in the limit to differentvalues does not make practical sensehost system.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>--physpages</b>If you want anindependent communication with the Container through thebridge, you should specify a multicast MAC address here<i>pages</i>[(FE:FF:FF:FF:FF:<i>pages</i>]FF).</p>
<p style="margin-left:2211%;">This is currently anaccounting<b>--only parameter. It shows the usage of RAM by thiscontainer. Barrier should be set to 0, and limit should beset to bridge</b>unlimited<i>name</bi>.</p>
<p style="margin-left:1122%;"><b>--swappages</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%;">The limit, if set, is used to<b>--mac_filter on</b> |show a total amount of swap space available inside thecontainer. The barrier of this parameter is currentlyignored. The default value is <b>unlimitedoff</b>, meaningtotal swap will be reported as 0.</p>
<p style="margin-left:22%; margin-top: 1em">Note that inEnables/disables MAC addressorder filtering for the value to be shown as total swap space,Container veth device and the possibilityof configuring the MAC address of this device from insidethe Container. If the filtering is turned on: <bbr>--meminfo&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); </bbr> parameter should be set &bull; it is impossible to value other thanmodify the veth MAC address frominside the Container.<b/p>none </bp style="margin-left:22%; margin-top: 1em">By default,this functionality is enabled for all veth devices existinginside the Container.</p> ==== CPU fair scheduler parameters ====
<p style="margin-left:22%; margin-top: 1em">Theseparameters control CPU usage by container.</p>=== VSwap limits ====
<p style="margin-left:11%;margin-top: 1em"><b>The followingoptions sets memory and swap limits for VSwap--cpuunits</b>enabled<i>num</i>kernels (kernel version 042stab042 or greater).</p>
<p style="margin-left:2211%;margin-top: 1em">CPU weight for a container.Argument is positive non-zero number, passed to and used inthe kernel fair scheduler. The larger the number isbytes, themore CPU time this container getsunless otherwise specified by an optional suffix. Maximum value is 500000,minimal is 8. Number is relative to weights of all the otherrunning containers. If <b>cpuunits</b> Available suffixes are not specified,default value of 1000 is used.:</p>
<p style="margin-left:2211%; margin-top: 1em">You can set CPU&bull;weight for CT0 (host system itself) as well (use <b>vzctlT</b>, <b>t</b> - terabytes; <br>set 0 &bull; <b>G</b>, <b>g</b> -gigabytes; <br>&bull; <b>M</b>, <b>m</b> -cpuunitsmegabytes; <br>&bull; <b>K</b> , <ib>numk</ib> - kilobytes; <br>). Usually, OpenVZ initscript(&bull; <b>P</etcb>, <b>p</init.db> - memory pages (arch-specific,usually 4KB); <br>&bull; <b>B</vzb>, <b>b</b>- bytes (this is the default) takes care of setting this.<b><br>--ram</b> <i>bytes</i></p>
<p style="margin-left:1122%;">Sets physical memory (RAM)available to a container. Actually, the option is a shortcutfor setting <b>--cpulimitphyspages</b>limit (the barrier is set to<i>num</i>[<b>%</b>]0).</p>
<p style="margin-left:2211%;">Limit of CPU usage for thecontainer, in per cent. Note if the computer has 2 CPUs, ithas total of 200% CPU time. Default CPU limit is <b>0--swap</b>(no CPU limit).<i>bytes</i></p>
<p style="margin-left:1122%;">Set swap space available to acontainer. Actually, the option is a shortcut for setting<b>--cpusswappages</b> <i>num</i>limit (the barrier is set to 0).</p>
<p style="margin-left:2211%;">sets number of CPUs available<b>--vm_overcommit</b>in the container.<i>float</i></p>
<p style="margin-left:1122%;">Set VM overcommitment value to<bi>--cpumaskfloat</bi> . If set, it is used to calculate<ib>cpusprivmmpages</ib> |parameter in case it is not setexplicitly (see below). Default value is <b>all0</b>, meaningunlimited privvmpages.</p>
<p style="margin-left:2211%;margin-top: 1em">sets list of allowed CPUs for<b>vzctl</b>the container. Input format checks if running kernel is a comma-separated list ofdecimal numbers and ranges. Consecutively set bits are shownas two hyphen-separated decimal numbersVSwap capable, the smallest andrefuses tolargest bit numbers set in the rangeuse these parameters otherwise. For example, if youwant the container to execute on CPUs 0, 1, 2, 7, you shouldThis behavior can bepass overriden by using <b>0-2,7-force</b>. Default value is <b>all</b> (theflag beforecontainer can execute on any CPU)parameters.</p>
<p style==== Memory output parameters ===="margin-left:11%; margin-top: 1em">In VSwap mode,all beancounters other than RAM and swap become optional.Note though that if some optional beancounters are not set,they are calculated and set by vzctl implicitly, using thefollowing formulae:</p>
<p style="margin-left:2211%; margin-top: 1em">This parameter<b>&bull;control output of lockedpages.barrier = oomguarpages.barrier = ram</proc/meminfo inside a container.b></p>
<p style="margin-left:11%;margin-top: 1em"><b>--meminfo none&bull;lockedpages.limit = oomguarpages.limit = unlimited</b></p>
<p style="margin-left:2211%;margin-top: 1em">No /proc/meminfo virtualization<b>&bull;(the same as on host system)vmguarpages.barrier = vmguarpages.limit = ram + swap</b></p>
<p style="margin-left:11%;margin-top: 1em"><b>--meminfo&bull;privvmpages.barrier = privvmpages.limit = (ram + swap) *vm_overcommit</b><i>mode</i>:<i>value</i></p>
<p style="margin-left:2211%;margin-top: 1em">Configure total memory output(ifin a container. Reported free memory <b>vm_overcommit</b> is evaluatedaccordingly to the mode being <b>0</b> or not set. Reported swap is,evaluated according to the settings of <b>--swappagesprivvmpages</b>parameter.is set to &quot;unlimited&quot;)</p>
<p style="margin-left:2211%; margin-top: 1em">You can use theHere is anfollowing modes for <i>mode</i>: <br>&bull; <b>pages</b>:<i>value</i> - sets total memory inpages; <br>example of setting container 777 to have 512 megabytes of&bull; <b>privvmpages</b>RAM and 1 gigabyte of swap:<i>value</i> - sets total memoryas <b>privvmpages</b> * <i>value</i>.</p>
<p pre style="margin-left:2211%; margin-top: 1em">Default is<b>privvmpages:1</b>. vzctl set 777 --ram 512M --swap 1G --save</ppre>
==== iptables control parameters User Beancounter limits ====
<p style="margin-left:11%;margin-top: 1em"><b>--iptables</b> <i>name</i>The followingoptions sets barrier and limit for various userbeancounters.</p>
<p style="margin-left:2211%;margin-top: 1em">Allow to use the functionalityNote that forof VSwap-enabled kernels (version 042stab042 or greater) theselimits are optional, you must only set <ib>name--ram</ib> iptables module inside the container. Toandspecify multiple <ib>name--swap</ib>s, repeat --iptables for each(see above). For older kernels,these limitsor use space-separated list as an argument (enclosed insingle or double quotes to protect spaces)are obligatory.</p>
<p style="margin-left:2211%; margin-top: 1em">The defaultEach optionlist requires one or two arguments. In case of enabled iptables modules is specified by theone argument,<b>IPTABLESvzctl</b> variable in [[Man/vzsets barrier and limit to the same value.confIncase of two colon-separated arguments, the first is abarrier, and the second is a limit.5|Each argument is eithera number, a number with a suffix, or a special value<b>vz.confunlimited</b>(5)]].</p>
<p style="margin-left:2211%; margin-top: 1em">You can use theArguments arefollowing values for <i>name</i>: <b>iptable_filter</b>in items,pages or bytes. Note that page size is<b>iptable_mangle</b>, <b>ipt_limit</b>,<b>ipt_multiport</b>, <b>ipt_tos</b>, <b>ipt_TOS</b>architecture-specific,it is 4096 bytes on x86 and x86_64<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</b>platforms.</p>
<p style==== Network devices control "margin-left:11%; margin-top: 1em">You can alsospecify different suffixes for User Beancounter parameters ====(except for those which names start with <b>num</b>). Forexample, <b>vzctl set</b> <i>CTID</i> <b>--privvmpages5M:6M</b> should set <b>privvmpages</b>&rsquo; barrier to 5megabytes and its limit to 6 megabytes.</p>
<p style="margin-left:11%;margin-top: 1em"><b>--netdev_add</b> <i>name</i>Availablesuffixes are:</p>
<p style="margin-left:2211%;margin-top: 1em">move network device from the&bull;<b>T</b>, <b>t</b> - terabytes; <br>&bull; <b>G</b>, <b>g</b> - gigabytes; <br>&bull; <b>M</b>, <b>m</b> - megabytes; <br>&bull; <b>K</b>, <b>k</b> - kilobytes; <br>host system to a specified container&bull; <b>P</b>, <b>p</b> - memory pages (arch-specific,usually 4KB); <br>&bull; <b>B</b>, <b>b</b> - bytes.</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>--netdev_delnumproc</b><i>nameitems</i>[:<i>items</i>]</p>
<p style="margin-left:22%;">delete network device from aMaximum number of processes andspecified containerkernel-level threads. Setting the barrier and the limit todifferent values does not make practical sense.</p>
<p style="margin-left:11%;"><b>Disk quota parameters --numtcpsock<br/b>--diskquota yes<i>items</bi>|[:<bi>noitems</bi>]</p>
<p style="margin-left:22%;">allows to enable or disableMaximum number of TCP sockets.This parameter limits the number of TCP connections and,disk quota for a container. By defaultthus, a global valuethe number of clients the server application can(<b>DISK_QUOTA</b>) from [[Man/vzhandle in parallel.conf.5|<b>vz.conf</b>(5)]] is usedSetting the barrier and the limit todifferent values does not make practical sense.</p>
<p style="margin-left:11%;"><b>--diskspacenumothersock</b><i>numitems</i>[:<i>numitems</i>]</p>
<p style="margin-left:22%;">sets soft and hard disk quotaMaximum number of non-TCPlimitssockets (local sockets, in blocksUDP and other types of sockets). First parameter is soft limit, second ishard Setting the barrier and the limit. One block is currently equal to 1Kb. Suffixesdifferent values does<b>G</b>, <b>M</b>, <b>K</b> can also be specified (see<b>Resource limits</b> section for more info onsuffixes)not make practical sense.</p>
<p style="margin-left:11%;"><b>--diskinodesvmguarpages</b><i>numpages</i>[:<i>numpages</i>]</p>
<p style="margin-left:22%;">sets soft and hard disk quotaMemory allocation guarantee.limits, in i-nodesThis parameter controls how much memory is available to acontainer. First parameter The barrier is soft the amount of memory thatcontainer&rsquo;s applications are guaranteed to be able toallocate. The meaning of the limit, second iscurrently unspecified;hard limitit should be set to <b>unlimited</b>.</p>
<p style="margin-left:11%;"><b>--quotatimekmemsize</b><i>secondsbytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">sets quota grace periodMaximum amount of kernel memoryused. This parameter is related to <b>--numproc</b>. Eachprocess consumes certain amount of kernel memory - 16 KB atleast, 30-50 KB typically.Very large processes may consumeContainer a bit more. It is permitted important to exceed its soft limits for have a certain safety gapbetween thebarrier and the limit of this parameter: equalgrace period, but once it has expired, barrier and limit may lead to the situation where the kernelwill need to kill container&rsquo;s applications to keep the soft limit isenforced as a hard <b>kmemsize</b> usage under the limit.</p>
<p style="margin-left:11%;"><b>--quotaugidlimittcpsndbuf</b><i>numbytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">sets maximum number Maximum size ofTCP senduser/group IDs in a container for which disk quota insidebuffers. Barrier should be not less than 64 KB, andthe container will difference between barrier and limit should be accounted. If this value is set equal toormore than value of <b>0numtcpsock</b>, user and group quotas inside the container willmultiplied by 2.5not be accountedKB.</p>
<p style="margin-left:2211%; margin-top: 1em">Note that ifyou have previously set value of this parameter to <b>0--tcprcvbuf</b>,changing it while the container is running will not takeeffect.<i>bytes</i>[:<i>bytes</i>]</p>
<p style==== Mount option ===="margin-left:22%;">Maximum size of TCP receivebuffers. Barrier should be not less than 64 KB, anddifference between barrier and limit should be equal to ormore than value of <b>numtcpsock</b> multiplied by 2.5KB.</p>
<p style="margin-left:11%;"><b>--noatime yesothersockbuf</b> | <bi>bytes</i>[:<i>nobytes</bi>]</p>
<p style="margin-left:22%;">Sets noatime flag Maximum size of other (do notnon-TCP)socket send buffers. If container&rsquo;s processes needs tosend very large datagrams, the barrier should be setaccordingly. Increased limit is necessary for highupdate inode access timesperformance of communications through local (UNIX-domain) on filesystemsockets.</p>
<p style==== Capability option ===="margin-left:11%;"><b>--dgramrcvbuf</b><i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:1122%;"><b>--capability</b> <i>capname</i>:<b>on</b>|<b>off</b></p> <p style="marginMaximum size of other (non-left:22%;">Sets a capability for aTCP)containersocket receive buffers. Note that setting capability when the If containeris running does not take immediate effect&rsquo; restart thes processes needscontainer in order for to receive very large datagrams, the changes to take effect. Note acontainer has default barrier should be set of capabilities, thus anyoperation on capabilities is &quot;logical accordingly. The difference between the barrier and&quot; withthethe default capability masklimit is not needed.</p>
<p style="margin-left:2211%; margin-top: 1em">You can use thefollowing values for <i>capname</i>: <b>chown--oomguarpages</b>,<bi>dac_overridepages</bi>, [:<bi>dac_read_searchpages</b>, <b>fowner</b>,<b>fsetid</b>, <b>kill</b>, <b>setgid</b>, <b>setuid</b>,<b>setpcap</b>, <b>linux_immutable</b>,<b>net_bind_service</b>, <b>net_broadcast</b>,<b>net_admin</b>, <b>net_raw</b>, <b>ipc_lock</b>,<b>ipc_owner</b>, <b>sys_module</b>, <b>sys_rawio</b>,<b>sys_chroot</b>, <b>sys_ptrace</b>, <b>sys_pacct</b>,<b>sys_admin</b>, <b>sys_boot</b>, <b>sys_nice</b>,<b>sys_resource</b>, <b>sys_time</b>, <b>sys_tty_config</b>,<b>mknod</b>, <b>lease</b>, <b>setveid</b>, <b>ve_admin</b>.For detailed description, see <b>capabilities</bi>(7).]</p>
<p style="margin-left:22%; margin-top: 1em">Guarantees against OOM kill.Under this beancounter the kernel accounts the total amountof memory and swap space used by the container&rsquo;sprocesses. The barrier of this parameter is theout-of-memory guarantee. If the <b>WARNINGoomguarpages</b>:usage issetting some below the barrier, processes of those capabilities may have far reachingthis container aresecurity implications, so do guaranteed not do to be killed in out-of-memory situations. Themeaning of limit is currently unspecified; it unless you know whatshould be setyou are doing. Also note that setting to <b>setpcap:onunlimited</b> fora container will most probably lead to inability to startit.</p>
<p style==== Device access management ===="margin-left:11%;"><b>--lockedpages</b><i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:1122%;">Maximum number of pagesacquired by <b>--devnodes</b> <i>device</i>:<b>[r][w][q]|nonemlock</b>(2).</p>
<p style="margin-left:2211%;">Give the container an access(<b>r</b> - read, <b>w</b> - write, <b>qprivvmpages</b> - disk quotamanagement, <b>none</b> - no access) to a device designatedby the special file /dev/<i>devicepages</i>. Device file iscreated in a container by <b>vzctl</b>. Example[: <bi>vzctlset 777 --devnodes sdb:rwqpages</bi>.]</p>
<p style="margin-left:1122%;"><b>--devicesAllows controlling the amountof memory allocated by the applications. For shared (mappedb|cas </b>:<i>major</i>:<i>minorMAP_SHARED</i>|<b>all</b>:<b>[r][w][q]|none</b></p>) pages, each container really using amemory page is charged for the fraction of the page(depending on the number of others using it). For<p style="margin-left:22%&quot;potentially private&quot;">Give the container an access topages (mapped asa <b>bMAP_PRIVATE</b>lock ), container is charged either for afraction of the size or <b>c</b>haracter device designated by itsfor the full size if the allocated<i>major</i> and <i>minor</i> numbersaddress space. Device file have toIn the latter case, the physical pagesassociated with the allocated address space may be created manuallyinmemory, in swap or not physically allocated yet.</p>
<p style==== PCI device management ===="margin-left:22%; 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>--vmguarpages</b> guarantee.</p>
<p style="margin-left:11%;"><b>--pci_addshmpages</b> [<i>domainpages</i><b>[:</b>]<i>bus</i><b>:</b><i>slot</i><b>.</b><i>funcpages</i>]</p>
<p style="margin-left:22%;">Give Maximum IPC SHM segment size.Setting the barrier and the container an access limit todifferent values doesa specified PCI device. All numbers are hexadecimal (asprinted by <b>lspci</b>(8) in the first column)not make practical sense.</p>
<p style="margin-left:11%;"><b>--pci_delnumfile</b>[<i>domainitems</i><b>[:</b>]<i>bus</i><b>:</b><i>slot</i><b>.</b><i>funcitems</i>]</p>
<p style="margin-left:22%;">Delete a PCI device from Maximum number of open files.In most cases the barrier and the limit should be set to thesame value. Setting the barrier to <b>0</b> effectivelydisables pre-charging optimization for this beancounter inthe kernel, which leads to theheld value being precise butcontainercould slightly degrade file open performance.</p>
<p style="margin-left:2211%; margin-top: 1em">Note that<b>vps-pci-numflock</b> configuration script is executed by<bi>vzctlitems</bi> then configuring PCI devices. The script isusually located at [:<bi>/usr/lib[64]/vzctl/scripts/items</bi>.]</p>
<p style==== Features management ===="margin-left:22%;">Maximum number of file locks.Safety gap should be between barrier and limit.</p>
<p style="margin-left:11%;"><b>--featuresnumpty</b> <i>nameitems</i><b>[:on</bi>|<b>offitems</bi>]</p>
<p style="margin-left:22%;">Enable or disable a specificNumber of pseudo-terminals(PTY). Note that in OpenVZ each container featurecan have not morethan 255 PTYs. Known features are: <b>sysfs</b>,<b>nfs</b>, <b>sit</b>, <b>ipip</b>, <b>ppp</b>,Setting the barrier and the limit to<b>ipgre</b>, <b>bridge</b>, <b>nfsd</b>different values does not make practical sense.</p>
<p style==== Apply config ===="margin-left:11%;"><b>--numsiginfo</b><i>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%;"><b>--applyconfig</b> <i>name</i>Number of siginfo structures.Setting the barrier and the limit to different values doesnot make practical sense.</p>
<p style="margin-left:2211%;">Read container parameters fromthe container sample configuration file<tt>/etc/vz/conf/ve-</tt><i>name</i><tt>.conf-sample</tt>,and apply them, if <b>--savedcachesize</b> option specified save tothe container config file. The following parameters are notchanged: <bi>HOSTNAMEbytes</bi>, [:<bi>IP_ADDRESSbytes</b>,<b>OSTEMPLATE</b>, <b>VE_ROOT</b>, and<b>VE_PRIVATE</bi>.]</p>
<p style="margin-left:1122%;"><b>Maximum size offilesystem--applyconfig_map</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>group</i>should be between barrier and limit.</p>
<p style="margin-left:2211%;">Apply container configparameters selected by <ib>group--numiptent</ib>. Now the only possiblevalue for <i>groupnum</i> is <b>name</b>[: to restore containername based on <bi>NAMEnum</bi> variable in containerconfiguration file.]</p>==== I/O priority management ====
<p style="margin-left:11%;"><b>--ioprio</b> <i>priority</i></p> <p style="margin-left:22%;">Assigns I/O priority toNumber of iptables (netfilter)containerentries. <i>Priority</i> range is <b>0-7</b>. The greater<i>priority</i> is, Setting the barrier and the more time for I/O activity containerlimit to differenthas. By default each container has <i>priority</i> of<b>4</b>values does not make practical sense.</p>
<p style=== Checkpointing and restore ==="margin-left:11%;"><b>--physpages</b><i>pages</i>[:<i>pages</i>]</p>
<p style="margin-topleft: 1em22%;">Checkpointing is On VSwap-enabled kernels, thislimits the amount of physical memory (RAM) available to a feature ofOpenVZ kernel which allows container. The barrier should be set to <b>0</b>, and thelimit to save a complete state total size of RAM that can be used used by arunning container, and to restore it later.</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>chkpnt0</b> <i>CTID</i>[, and limit should be set to <b>--dumpfileunlimited</b> <i>name</i>].</p>
<p style="margin-left:1711%;">This command saves a completestate of a running container to a dump file, and stops thecontainer. If an option <b>--dumpfileswappages</b> is not set,default dump file name <bi>/vz/dump/Dump.pages</bi>[:<i>CTIDpages</i> isused.]</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>restore0</b> <i>CTID</i>, and the limit to a total size of swap that[<b>--dumpfile</b> <i>name</i>]can be used by a container.</p>
<p style="margin-left:1722%;margin-top: 1em">This command restores For older(pre-VSwap) kernels, the limit is used to show atotalamount of swap space available inside the container from the dump file created by the . Thebarrier of this parameter is ignored. The default value is<b>chkpntunlimited</b>, meaning total swap will be reported ascommand0.</p>
=== Performing container actions = CPU fair scheduler parameters ====
<p style="margin-left:11%;margin-top: 1em"><b>create</b> <i>CTID</i>These[<b>--ostemplateparameters control CPU usage by container. </b> <i>name</i>] [<b>--config</b><i>name</i>] [<b>--private</b> <i>path</i>] <br>[<b>--root</b> <i>path</i>] [<b>--ipadd</b> <i>addr</i>][<b>--hostnamecpuunits</b> <i>namenum</i>]</p>
<p style="margin-left:1722%;">Creates CPU weight for a new container area.This operation should be done onceArgument is positive non-zero number, before passed to and used inthe first startkernel 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 containerotherrunning containers. If <b>cpuunits</b> are not specified,default value of 1000 is used.</p>
<p style="margin-left:1722%; margin-top: 1em">If theYou can set CPUweight for CT0 (host system itself) as well (use <b>vzctlset 0 --config</b> option is specified, values from exampleconfiguration file<b>/etc/vz/conf/ve-cpuunits</b><i>namenum</i>). Usually, OpenVZ initscript(<b>/etc/init.conf-sampled/vz</b> areput into the container configuration file. If ) takes care of setting this containerconfiguration file already exists, it will be removed.</p>
<p style="margin-left:1711%; margin-top: 1em">You can use<b>--rootcpulimit</b> <i>pathnum</i> option to sets the path to themount point for the container root directory (default is<b>VE_ROOT</b> specified in [[Man/vz.conf.5|<b>vz.conf%</b>(5)]] file).Argument can contain literal string <b>$VEID</b>, which willbe substituted with the numeric CT ID.</p>
<p style="margin-left:1722%; margin-top: 1em">You can use<b>--private</b> <i>path</i> option to set Limit of CPU usage for the path todirectory container, in which all per cent. Note if the files and directories specific tocomputer has 2 CPUs, itthis very container are stored (default has total of 200% CPU time. Default CPU limit is <b>VE_PRIVATE0</b>specified in [[Man/vz.conf.5|<b>vz.conf</b>(5no CPU limit)]] file). 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>--ipaddcpus</b> <i>addrnum</i> option to assign an IP address toa container. Note that this option can be used multipletimes.</p>
<p style="margin-left:1722%; margin-top: 1em">You can usesets number of CPUs available<b>--hostname</b> <i>name</i> option to set a host name fora in the container.</p>
<p style="margin-left:11%;"><b>destroy--cpumask</b> <i>cpus</i> |<b>deleteauto</b> | <b>all</b></p>
<p style="margin-left:1722%;">Removes Sets list of allowed CPUs forthe container. Input format is a comma-separated list ofdecimal numbers and/or ranges. Consecutively set bits areshown as two hyphen-separated decimal numbers, the smallestand largest bit numbers set in the range. For example, ifyou want the container privateto execute on CPUs 0, 1, 2, 7, youarea by deleting should pass <b>0-2,7</b>. Default value is <b>all files, directories and </b> (thecontainer can execute on any CPU). If used with theconfiguration file <b>--nodemask</b> option, value of this <b>auto</b> assigns allCPUs from the specified NUMA node to a container.</p>
<p style="margin-left:11%;"><b>start--nodemask</b> [<bi>--waitnodes</bi>][| <b>--forceall</b>]</p>
<p style="margin-left:1722%;">Mounts (if necessary) andSets list of allowed NUMA nodesstarts a for the container. Unless Input format is the same as for<b>--waitcpumask</b> option isspecified, . Note that <b>vzctl--nodemask</b> will return immediately; otherwisemust be usedan attempt to wait till with the default runlevel is reached willbe made by <b>vzctl--cpumask</b>option.</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>=== Memory output parameters ====
<p style="margin-left:1711%; margin-top: 1em">Note that ForVSwap-enabled kernels (042stab042 or greater), thiscommand can lead to execution parameter is ignored. For older kernels, it controls theoutput of <b>premount</b>,<b>mount<proc/b> and <b>startmeminfo inside a container. </b> action scripts (see <bbr>ACTIONSCRIPTS--meminfo none</b> below).</p>
<p style="margin-left:1122%;"><b>stop<No /b> [<b>--fast<proc/b>]meminfo virtualization(the same as on host system).</p>
<p style="margin-left:1711%;">Stops and unmounts a container.Normally, <b>halt</b>(8) is executed inside a container;option <b>--fastmeminfo</b> makes <bi>vzctlmode</bi> use :<bi>rebootvalue</bi>(2)syscall instead which is faster but can lead to uncleancontainer shutdown.</p>
<p style="margin-left:1722%;">Configure total memory outputin a container. Reported free memory is evaluatedaccordingly to the mode being set. Reported swap isevaluated according to the settings of <b>--swappages</b>parameter.</p> <p style="margin-left:22%; margin-top: 1em">Note that thisYou can use thecommand can lead to execution of following modes for <i>mode</i>: <br>&bull; <b>stoppages</b>, :<i>value</i> - sets total memory inpages; <br>&bull; <b>umountprivvmpages</b>:<i>value</i> - sets total memoryand as <b>postumountprivvmpages</b> action scripts (see * <bi>ACTIONSCRIPTSvalue</bi> below).</p>
<p style="margin-left:1122%;margin-top: 1em">Default is<b>restartprivvmpages:1</b>.</p>
<p style="margin-left:17%;">Restarts a container, i.e.stops it if it is running, and starts again. Accepts all the<b>start</b> and <b>stop</b> options.</p>=== Netfilter (iptables) control parameters ====
<p style="margin-left:1711%; margin"><b>-top: 1em"-netfilter&nbsp;disabled</b>|<b>stateless</b>|<b>stateful</b>Note that thiscommand can lead to execution of some action scripts (see|<b>ACTION SCRIPTSfull</b> below).</p>
<p style="margin-left:1122%;">Restrict access tonetfilter/iptables modules for a container. This optionreplaces obsoleted <b>status--iptables</b>.</p>
<p style="margin-left:1722%;margin-top: 1em">Shows a Note thatchanging this parameter requires container status. Thisrestart, sois a line with five or six words, separated by spacesconsider using <b>--setmode</b> option.</p>
<p style="margin-left:1722%; margin-top: 1em">First word isThe followingliterally arguments can be used: <b>CTID<br>&bull; disabled</b>.</p>
<p style="margin-left:1732%; margin-top: 1em">Second word isthe numeric <i>CT ID</i>.no modules are allowed</p>
<p style="margin-left:1722%; margin-top: 1em">Third word isshowing whether this container exists or not, it can beeither <b>exist</b> or <b>deleted&bull; stateless</b>.</p>
<p style="margin-left:1732%; margin-top: 1em">Fourth word all modules except NAT andconntracks are allowed (i.e. filter and mangle); this isshowing the status of the container filesystem, it can beeither <b>mounted</b> or <b>unmounted</b>.default</p>
<p style="margin-left:1722%; margin-top: 1em">Fifth wordshows if the container is running, it can be either<b>running</b> or <b>down&bull; stateful</b>.</p>
<p style="margin-left:1732%; margin-top: 1em">Sixth word, ifall modules except NAT areexists, is <b>suspended</b>. It appears if both a containerand its dump file exist (see <b>chkpnt</b>).allowed</p>
<p styletable width="margin-left:17100%; margin-" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top: 1em" align="left">This commandcan also be usable from scripts.<td width="22%"></ptd><td width="9%">
<p style="margin-left:11%;"><b>mount&bull; full</b></p></td><td width="1%"></td><td width="36%">
<p style="margin-left:17%;">Mounts container private area.Note that this command can lead to execution ofall modules are allowed<b/p>premount</btd> and <btd width="32%">mount</btd> action scripts (see<b>ACTION SCRIPTS</btr> below).</ptable>
<p style="margin-left:11%;"><b>umount--iptables</b><i>name</i>[<b>,</b>...]</p>
<p style="margin-left:1722%;">Unmounts container privatearea. Note that this command can lead to execution of<b>umountNote</b> and <b>postumount</b> action scripts (seethis option isobsoleted, <b>ACTION SCRIPTS--netfilter</b> below)should be used instead.</p>
<p style="margin-left:1722%; margin-top: 1em">Note thatAllow to usethe functionality of <bi>stopname</bi> does iptables module inside thecontainer. Multiple comma-separated <bi>umountname</bi> automaticallys can bespecified.</p>
<p style="margin-left:1122%;margin-top: 1em">The defaultlist of enabled iptables modules is defined by the<b>quotaonIPTABLES</b> variable in [[Man/vz.conf.5|<ib>ctidvz.conf</ib>(5)]].</p>
<p style="margin-left:1722%;margin-top: 1em">Turn disk quota on. Not thatYou can use thefollowing values for <i>name</i>: <b>iptable_filter</b>,<b>iptable_mangle</b>, <b>ipt_limit</b>,<b>ipt_multiport</b>, <b>ipt_tos</b>, <b>ipt_TOS</b>,<b>ipt_REJECT</b>, <b>ipt_TCPMSS</b>, <b>ipt_tcpmss</b>,<b>ipt_ttl</b>, <b>ipt_LOG</b>, <b>ipt_length</b>,<b>ip_conntrack</b>, <b>ip_conntrack_ftp</b>,<b>ip_conntrack_irc</b>, <b>ipt_conntrack</b>,<b>ipt_state</b>, <b>ipt_helper</b>, <b>iptable_nat</b>,<b>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>ipt_REDIRECT</b>,<b>xt_mac</b>, <b>mountipt_recent</b> and , <b>startipt_owner</b> does that automatically.</p>
<p style="margin-left:11%;"><b>quotaoff</b> <i>ctid</i></p>=== Network devices control parameters ====
<p style="margin-left:1711%;">Turn disk quota off. Not that<b>umount--netdev_add</b> and <bi>stopname</bi> does that automatically.</p>
<p style="margin-left:1122%;"><b>quotainit</b>move network device from the<i>ctid</i>host system to a specified container</p>
<p style="margin-left:1711%;">Initialize disk quota (i.e. run<b>vzquota init--netdev_del</b>) with the parameters taken from the CTconfiguration file [[Man/ctid.conf.5|<bi>ctid.confname</bi>(5)]].</p>
<p style="margin-left:22%;">delete network device from aspecified container</p> ==== Disk quota parameters ==== <p style="margin-left:11%;"><b>exec--diskquota yes</b> |<b>no</b> <i/p>CTIDcommand<p style="margin-left:22%;">allows to enable or disabledisk quota for a container. By default, a global value(<b>DISK_QUOTA</ib>) from [[Man/vz.conf.5|<b>vz.conf</b>(5)]] is used.</p>
<p style="margin-left:1722%;margin-top: 1em">Executes <i>command</i> in acontainer. Environment variables are not set inside theNote that thiscontainer. Signal handlers may differ from default settings.If <i>command</i> parameter is ignored for <b>-ploop</b>, commands are read fromstdinlayout.</p>
<p style="margin-left:11%;"><b>exec2--diskspace</b> <i>CTIDcommandnum</i>[:<i>num</i>]</p>
<p style="margin-left:1722%;">The same as For <b>execsimfs</b>layout, butsetsreturn code soft and hard disk quota limits. First parameter is that of <i>command</i>softlimit, second is hard limit.</p>
<p style="margin-left:1122%;margin-top: 1em">For<b>runscriptploop</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>CTIDscriptnum</i>, ifspecified, is ignored.</p>
<p style="margin-left:1722%;margin-top: 1em">Run specified shell script inBy default,the containerploop resize is done online, i.e. Argument <i>script</i> is on a file on the hostmounted ploop. Thissystem which contents is read by vzctl and executed in thecontext a preferred way of the containerdoing resize. For Although, in a running container, therare casecommand jumps into the a container was using lots of disk space and executes the script.should now beFor resized to a stopped container, it enters the container, mountscontainer&rsquo;s root filesystemmuch smaller size, executes the script, andan offline resize might beunmounts CT rootmore appropriate. In the latter this case, make sure the container is notreally started, no file systems other than root (such asstopped and unmounted and use additional<b>/proc--offline-resize</b>) 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.option</p>
<p style="margin-left:1122%;margin-top: 1em">Note that ploopresize is NOT performed on container start, so forconsistency <b>enter--diskspace</b> [must be used together with<b>--execsave</b><i>command</i> [<i>arg</i> ..flag.]]</p>
<p style="margin-left:1722%;margin-top: 1em">Enters into a container Suffixes<b>G</b>, <b>M</b>, <b>K</b> can also be specified (givinga container&rsquo;s root shell). This option is a back-doorseefor host root only. The proper way to have CT root shell isto use <b>sshResource limits</b>(1section for more info on suffixes).If suffix is not specified, value is in kilobytes.</p>
<p style="margin-left:1711%; margin-top: 1em">Option<b>--execdiskinodes</b> is used to run <i>commandnum</i> with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so [:<bi>vzctl execnum</b> can not beused) and for some reason you can not use <b>ssh</bi>(1).]</p>
<p style="margin-left:1722%; margin-top: 1em">You need to logsets soft and hard disk quotaout manually from the shell to finish session (even if youlimits, in i-nodes. First parameter is soft limit, second isspecified <b>--exec</b>)hard limit.</p>
<p style=== Other options ==="margin-left:22%; margin-top: 1em">Note that thisparameter is ignored for <b>ploop</b> layout.</p>
<p style="margin-left:11%;"><b>--helpquotatime</b><i>seconds</i></p>
<p style="margin-left:1722%;">Prints help message with 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 ahard limit.</p>brief list of possible options<p style="margin-left:22%; margin-top: 1em">Note that thisparameter is ignored for <b>ploop</b> layout.</p>
<p style="margin-left:11%;"><b>--versionquotaugidlimit</b><i>num</i></p>
<p style="margin-left:1722%;">Prints Enables or disablesin-container per-user and per-group disk quotas. If thevalue is set to <b>vzctl0</b>or not set, disk quotas inside theversioncontainer is disabled and not accounted.</p>
<p style== ACTION SCRIPTS =="margin-left:22%; margin-top: 1em">For<b>simfs</b> layout containers, non-zero value sets maximumnumber of user/group IDs for which disk quota isaccounted.</p>
<p style="margin-left:1122%; margin-top: 1em">For<b>vzctlploop</b>has an ability to execute userlayout containers, any non-defined scripts when azero value enablesspecific <b>vzctl</b> command is run for a disk quota inside the container. Thefollowing <b>vzctl</b> commands can trigger execution ; the number ofaction scripts: <b>start</b>, <b>stop</b>, <b>restart<user/b>,group<b>mount</b> and <b>umount</b>IDs used by disk quota is not limited by OpenVZ.</p>
<p style="margin-left:1122%; margin-top: 1em">Action scriptsNote thatare located enabling or disabling in the <b>/etc/vz/conf/</b> directory. There areglobal and per-CT scripts. Global scripts have a literalcontainer disk quotas requiresprefix of container restart, so consider using <b>vps.--setmode</b> and are executed for all containers.Per-CT scripts have a <i>CTID</i> numeric prefix and areexecuted for the given container onlyoption.</p>
<p style="margin-left:11%; margin-top: 1em">There are 8action scripts currently defined: <b><br>vps.premount</b>, <i>CTID</i><b>.premount</b></p>=== Capability option ====
<p style="margin-left:2211%;">Global and per<b>-CT mount scripts-capability</b>which are executed for a container before it is mounted<i>capname</i>:<b>on</b>|<b>off</b>[<b>,</b>.Scripts are executed in the host OS context, while a CT isnot yet mounted or running. Global script, if exists, isexecuted first.]</p>
<p style="margin-left:1122%;"><b>vpsSets a capability for acontainer.mount</b>,Multiple comma-separated capabilities can be<i>CTID</i><b>specified.mount</b></p>
<p style="margin-left:22%;margin-top: 1em">Global and per-CT mount scriptsNote thatwhich are executed for setting a capability when the container right after it isrunning does nottake immediate effect; restart the container in order formounted. Otherwise they are the same as changes to take effect (consider using <b>.premount--setmode</b>scriptsoption).</p>
<p style="margin-left:1122%;margin-top: 1em"><i>CTID</i><b>A container hasthe default set of capabilities, thus any operation oncapabilities is &quot;logical AND&quot; with the defaultcapability mask.start</b></p>
<p style="margin-left:22%;margin-top: 1em">Right after 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>vzctlsys_ptrace</b> has, <b>sys_pacct</b>,started a container<b>sys_admin</b>, <b>sys_boot</b>, <b>sys_nice</b>, it executes this script in a containercontext<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</b>(7).</p>
<p style="margin-left:1122%;margin-top: 1em"><ib>CTIDWARNING</ib>: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 <b>.stopsetpcap:on</b>fora container will most probably lead to inability to startit.</p>
<p style="margin-left:22%;">Right before <b>vzctl</b> hasstopped a container, it executes this script in a containercontext.</p>=== Device access management ====
<p style="margin-left:11%;"><b>vps.umount--devnodes</b>,<i>CTIDdevice</i>:[<b>.umountr</b>][<b>w</b>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:22%;">Global and perGive the container an access(<b>r</b> - read, <b>w</b> -CT umountwrite, <b>q</b> - disk quotascripts which are executed for management, <b>none</b> - no access) to a container before it isdevice designatedunmounted. Scripts are executed in by the host OS context,while a CT is mountedspecial file /dev/<i>device</i>. Global script, if exists, Device file is executedfirstcreated in a container by <b>vzctl</b>.Example:</p>
<p pre style="margin-left:1122%;"><b>vps.postumount</b>,<i>CTID</i><b>.postumount</b> vzctl set 777 --devnodes sdb:rwq</ppre>
<p style="margin-left:2211%;">Global and per<b>-CT umount-devicesscripts which are executed for a container right after it isunmounted. Otherwise they are the same as b</b>|<b>c</b>:<i>major</i>:<i>minor</i>|<b>all</b>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>.umountnone</b>scripts.</p>
<p style="margin-left:22%; margin-top: 1em">The environmentGive the container an access topassed to all the a <b>*mountb</b> scripts is the standardenvironment of the parent (i.e. lock or <b>vzctlc</b>) with twoharacter device designated by itsadditional variables: <bi>$VEIDmajor</bi> and <bi>$VE_CONFFILEminor</bi>numbers.The first one holds the ID of the container, and the secondone holds the full path to the container configuration Device file.If the script needs have to get other CT configurationparameters, such as <b>$VE_ROOT</b>, it needs to get thosefrom global and per-CT configuration filesbe created manually.</p>
<p style="margin-left:22%; margin-top: 1em">Here is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container(s). Script name can eitherbe <b>/etc/vz/conf/vps.mount</b> or<b>/etc/vz/conf/</b><i>CTID</i><b>.mount</b>.</p>=== PCI device management ====
<p style="margin-left:2211%; margin-top: 1em"># If one ofthese files does not exist then something <brb># is really broken --pci_add<br/b>[ -f <i>domain</etc/sysconfig/vz i>:] || exit 1 <bri>[ -f $VE_CONFFILE ] || exit 1 bus<br/i># Source both files. Note the order is important. :<bri>. slot</etc/vz/vzi>.conf <bri>. $VE_CONFFILE func<br/i>mount -n --bind /mnt/disk $VE_ROOT/mnt/disk</p>
<p style== EXIT STATUS =="margin-left:22%;">Give the container an access toa specified PCI device. All numbers are hexadecimal (asprinted by <b>lspci</b>(8) in the first column).</p>
<p style="margin-left:11%; margin"><b>--toppci_del</b>[<i>domain</i>: 1em"]<i>bus</i>Returns 0 uponsuccess, or an appropriate error code in case of anerror:<i>slot</i>.<i>func</i></p>
<table widthp style="100margin-left:22%;" border="0" rules="none" frame="void">Delete a PCI device from the cellspacing="0" cellpadding="0"container.</p> <tr valignp style="margin-left:22%; margin-top: 1em" align="left">Note that<b>vps-pci</b> configuration script is executed by<td width="11%"b>vzctl</tdb>then configuring PCI devices. The script isusually located at <td width="4%"b>/usr/libexec/vzctl/scripts/</b>.</p>
<p>1</p></td><td width="7%"></td><td width="78%">== Features management ====
<pstyle="margin-left:11%;">Failed to set a UBC parameter<b>--features</pb><i>name</tdi>:<b>on</trb>|<b>off<tr valign="top" align="left"/b>[<td width="11%"b>,</tdb>...]<td width="4%"/p>
<pstyle="margin-left:22%;">Enable or disable a specificcontainer feature. Known features are: <b>sysfs</b>,<b>nfs</b>, <b>sit</b>, <b>2ipip</pb>, <b>ppp</tdb>,<td width="7%"b>ipgre</b>, <b>bridge</b>, <b>nfsd</tdb>. A few features canbe specified at once, comma-separated.<td width="78%"/p>
<p>Failed to set a fair scheduler parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%">Apply config ====
<pstyle="margin-left:11%;">3</pb>--applyconfig</tdb><td width="7%"i>name</tdi><td width="78%"/p>
<pstyle="margin-left:22%;">Read container parameters fromthe container sample configuration file<tt>/etc/vz/conf/ve-</tt><i>Generic system errorname</pi><tt>.conf-sample</tdtt>,and apply them, if <b>--save</trb>option specified save tothe container config file. The following parameters are notchanged: <b>HOSTNAME</b>, <b>IP_ADDRESS<tr valign="top" align="left"/b>,<td width="11%"b>OSTEMPLATE</b>, <b>VE_ROOT</tdb>, and<td width="4%"b>VE_PRIVATE</b>.</p>
<pstyle="margin-left:11%;">5</pb>--applyconfig_map</tdb><td width="7%"i>group</tdi><td width="78%"/p>
<pstyle="margin-left:22%;">Apply container configparameters selected by <i>group</i>The running kernel is not an OpenVZ kernel (or some. Now the only possibleOpenVZ modules are not loaded)value for <i>group</pi> is <b>name</tdb>: to restore containername based on <b>NAME</trb>variable in containerconfiguration file.<tr valign/p> ==== I/O scheduling ==="top" align="left"> <td widthp style="margin-left:11%;"><b>--ioprio</tdb><td width="4%"i>priority</i></p>
<pstyle="margin-left:22%;">6Assigns disk I/O priority tocontainer. <i>Priority</pi> range is <b>0-7</tdb>. The greater<td width="7%"i>priority</i> is, the more time for I/O activity containerhas. By default each container has <i>priority</tdi>of<td width="78%"b>4</b>.</p>
<pstyle="margin-left:11%;"><b>--iolimit</b><i>Not enough system resourceslimit</pi>[<b>B</tdb>|<b>K</trb>|<b>M<tr valign="top" align="left"/b>|<td width="11%"b>G</tdb>]<td width="4%"/p>
<pstyle="margin-left:22%;">7Assigns disk I/O bandwidthlimit for a container. Value is either a number with anoptional suffix, or a literal string </pb>unlimited</tdb>. Valueof <td width="7%"b>0</tdb>means &quot;unlimited&quot;. By default acontainer has no I/O limit. Maximum allowed limit is 2gigabytes per second; values exceeding the limit aretruncated.<td width="78%"/p>
<pstyle="margin-left:22%; margin-top: 1em">If no suffix isprovided, the <i>limit</i> is assumed to be in megabytes persecond. Available suffixes are: <br>&bull; <b>ENV_CREATEb</b> ioctl failed, <b>B</pb> -- bytes per second; <br>&bull; <b>k</b>, <b>K</b> -- kilobytes per second; <br>&bull; <b>m</tdb>, <b>M</trb>-- megabytes per second (default);<tr valign="top" align="left"br>&bull; <td width="11%"b>g</b>, <b>G</tdb>-- gigabytes per second;<td width="4%"/p>
<pstyle="margin-left:11%;">8</pb>--iopslimit</tdb><td width="7%"i>iops</tdi><td width="78%"/p>
<pstyle="margin-left:22%;">Command executed by Assigns IOPS limit for acontainer, in number of input/output operations per second.Value is a number or a literal string <b>vzctl execunlimited</b> returned non-zero.exit codeValue of </pb>0</tdb>means &quot;unlimited&quot;. By default acontainer has no IOPS limit.</trp><tr valign==="top" alignSuspending and resuming ="left"><td width="11%"></td><td width="4%">
<p>9</p></td><td widthstyle="7%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.</td><td width="78%"p>
<pstyle="margin-left:11%;"><b>suspend</b>Container is locked by another |<b>vzctlchkpnt</b>invocation</pi> CTID</tdi>[</trb>--dumpfile<tr valign="top" align="left"/b><td width="11%"i>name</tdi>]<td width="4%"/p>
<pstyle="margin-left:17%;">This command suspends acontainer to a dump file If an option <b>10--dumpfile</pb>isnot set, default dump file name<b>/tdvz/dump/Dump.</b><td width="7%"i>CTID</tdi>is used.<td width="78%"/p>
<pstyle="margin-left:11%;"><b>Global OpenVZ configuration file [[Manresume</vz.conf.5b>|<b>vz.confrestore</b>(5)]] notfound</pi> CTID</tdi>[</trb>--dumpfile<tr valign="top" align="left"/b><td width="11%"i>name</tdi>]<td width="4%"/p>
<p>11</p></td><td widthstyle="7margin-left:17%;">This command restores acontainer from the dump file created by the <b>suspend</tdb>command.<td width="78%"/p>
=== Snapshotting === <p>A vzctl helper script file not found</p></td></tr><tr valignstyle="margin-top" align="left: 1em">Snapshotting is a feature based<td width="11%">on checkpointing and ploop shapshots. It allows to save acomplete state of container file system. Plus, if thecontainer is running, it&rsquo;s in-memory state (as incheckpointing). Note that snapshot functionality is onlyworking for containers on ploop device.</td><td width="4%"p>
<pstyle="margin-left:11%;"><b>12snapshot</pb> <i>CTID</i>[<b>--id</b> <i>uuid</i>] [<b>--name</b> <i>name</tdi>][<b>--description<td width="7%"/b> <i>desc</tdi>] <br>[<b>--skip-suspend</b>] [<b>--skip-config</b>]<td width="78%"/p>
<p>Permission denied</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Creates a container snapshot,<td width="11%">i.e. saves the current container state, including its filesystem state, running processes state, and configurationfile.</td><td width="4%"p>
<p>13</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">If a containeris running, and <b>--skip-suspend</tdb>option is notspecified, a container is checkpointed and then restored,and CT memory dump becomes the part of snapshot.<td width="78%"/p>
<p>Capability setting failed</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">Unless<td width="11%"b>--skip-config</tdb>option is given, containerconfiguration file is saved to the snapshot.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">If <i>uuid</i>14is not specified, it is auto-generated. Options<b>--name</pb> and <b>--description</tdb>can be used tospecify the snapshot name and description, respectively.Name is displayed by <td width="7%"b>snapshot-list</tdb>.<td width="78%"/p>
<pstyle="margin-left:11%;"><b>snapshot-switch</b><i>CTID</i>Container configuration file [[Man<b>--skip-resume</ctid.conf.5b> |<b>ctid.conf--must-resume</b>(5)]] notfound[<b>--skip-config</pb> ] </tdb></trbr>--id<tr valign="top" align="left"/b><td width="11%"i>uuid</tdi><td width="4%"/p>
<p>15</p></td><td widthstyle="7margin-left:17%;">Switches the container to asnapshot identified by <i>uuid</tdi>, restoring its filesystem state, configuration (if available) and its runningstate (if available).<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Timeout on <b>vzctl execNote thatthe current state of a container (including its file systemstate and its configuration file) is lost!</b></p></td></tr> <tr valignp style="margin-left:17%; margin-top" align="left: 1em">Option<td width="11%"b>--skip-resume</tdb>is used to ignore a CT memory dump filein a snapshot, as a result the container will end up beingin a stopped state (same as if a snapshot has been takenwith <td width="4%"b>--skip-suspend</b>).</p>
<p>16</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">If option<b>--must-resume</tdb>is set, absense of a memory dump istreated as an error, and the inability to restore from thememory dump is treated as an error rather than warning.<td width="78%"/p>
<p>Error during <b>vzctl chkpnt</b></p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">Option option<td width="11%"b>--skip-config</tdb>is used to ignore the CT configurationfile in a snapshot, i.e. the current configuration file willbe left as is.<td width="4%"/p>
<pstyle="margin-left:11%;"><b>snapshot-delete</b>17<i>CTID</pi> <b>--id</tdb><td width="7%"i>uuid</tdi><td width="78%"/p>
<p>Error during <b>vzctl restore</b></p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Removes a specified<td width="11%">snapshot.</td><td width="4%"p>
<pstyle="margin-left:11%;"><b>snapshot-mount</b><i>CTID</i> <b>--id</b>18<i>uuid</pi> <b>--target</tdb><td width="7%"i>directory</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Error from <b>setluid()Mounts a snapshot specified by</bi> syscalluuid</pi>to a </tdi>directory</tri>. Note this mount is<tr valign="top" align="left"><td width="11%">read-only.</td><td width="4%"p>
<pstyle="margin-left:11%;"><b>snapshot-umount</b>20<i>CTID</pi> <b>--id</tdb><td width="7%"i>uuid</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Invalid command line parameterUnmounts a specifiedsnapshot.</p> <p style="margin-left:11%;"><b>snapshot-list</tdb><i>CTID</tri> [<b>-H</b>] [<b>-o</b><tr valign="top" align="left"i>field</i>[,<i>field</i>...] [<b>--id</b> <i>uuid<td width="11%"/i>]</tdp> <td widthp style="4margin-left:17%;">List container&rsquo;ssnapshots.</p>
<p>21</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">You cansuppress displaying header using <b>-H</tdb>option.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Invalid value for command line parameterYou can use the</pb>-o</tdb>option to display only the specified</tri>field<tr valign="top" align="left"/i>(s). List of available fields can be obtainedusing <td width="11%"b>-L</tdb>option.<td width="4%"/p>
<p>22</p></td><td width="7%"></td><td width="78%">= Performing container actions ===
<p>Container root directory (<b>VE_ROOT</b>) not set</p></td></trtable width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="49%">
<pstyle="margin-top: 1em"><b>create</b>23</p></td><td width="72%"></td>
<td width="78%">
<pstyle="margin-top: 1em"><i>CTID</i>[<b>--ostemplate&nbsp;</b><i>name</i>][<b>--config&nbsp;</b><i>name</i>][<b>--layout&nbsp;simfs</b>|<b>ploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]][<b>--diskspace&nbsp;</b><i>kbytes</i>][<b>--diskinodes&nbsp;</b><i>num</i>][<b>Container --private directory (&nbsp;</b><i>path</i>][<b>VE_PRIVATE--root&nbsp;</b>) not<i>path</i>]set[<b>--ipadd&nbsp;</pb><i>addr</i>][<b>--hostname&nbsp;</b><i>name</i>][<b> --name&nbsp;</tdb><i>name</tri>][<b>--local_uid&nbsp;</b><tr valign="top" align="left"i>uid</i>][<b>--local_gid&nbsp;</b><i>gid</i>]</p> </td width="11%"></tdtr></table> <td widthp style="4margin-left:17%; margin-top: 1em">Creates a newcontainer area. This operation should be done once, beforethe first start of the container.</p>
<pstyle="margin-left:17%; margin-top: 1em">By default, anOS template denoted by <b>24DEF_OSTEMPLATE</pb> parameter of[[Man/vz.conf.5|<b>vz.conf</tdb>(5)]] is used to create a container. This can beoverwritten by <td width="7%"b>--ostemplate</tdb>option.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container template directory (By default, anew container configuration file is created from a sampleconfiguration denoted by value of <b>TEMPLATECONFIGFILE</b>) notset<parameter of [[Man/p> vz.conf.5|</tdb>vz.conf</trb>(5)]]. If the container<tr valign="top" align="left">configuration file already exists, it will not be<td width="11%">modified.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">28The value of<b>CONFIGFILE</pb> can be overwritten by using the<b>--config</tdb><td width="7%"i>name</tdi>option. This option can not beused if the container configuration file already exists.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">A new containercan either be created using <b>simfs</b> filesystem or on a<b>Not all required UBC parameters are ploop</b> device. The default is setby value of<b>VE_LAYOUT</b> parameter of [[Man/vz.conf.5|<b>vz.conf</b>(5)]] and can beoverwritten by <b>--layout</b> option. In case <b>ploop</b>is used, unable to startone can additionally specify ploop disk imageformat after a colon. Possible ploop formats arecontainer<b>expanded</pb>, <b> plain</tdb>and <b>raw</trb>. Default is<tr valign="top" align="left"b>expanded</b>. Using value other than <td width="11%"b>expanded</tdb>isnot recommended and is currently not supported.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">29You can use<b>--diskspace</pb> and <b>--diskinodes</tdb>options tospecify container file system size. Note that for<td width="7%"b>ploop</tdb>layout, you will not be able to change inodesvalue later.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">If<b>DISKSPACE</b>OS template is not specified, unable to createeither in the sampleconfiguration file used for creation or in globalcontainerconfiguration file [[Man/vz.conf.5|</pb> vz.conf</tdb>(5)]], </trb>--diskspace<tr valign="top" align="left"/b>parameter is required for <td width="11%"b>ploop</tdb>layout.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">31Suffixes<b>G</pb>, <b>M</b>, <b>K</tdb>can also be specified (see<td width="7%"b>Resource limits</tdb>section for more info onsuffixes).<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container not runningYou can use<b>--root</pb> <i>path</tdi> option to sets the path to themount point for the container root directory (default is<b>VE_ROOT</trb>specified in [[Man/vz.conf.5|<b>vz.conf<tr valign="top" align="left"/b>(5)]] file).Argument can contain literal string <td width="11%"b>$VEID</tdb>, which willbe substituted with the numeric CT ID.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">You can use<b>--private</b> <i>path</i> option to set the path todirectory in which all the files and directories specific tothis very container are stored (default is <b>32VE_PRIVATE</pb>specified in [[Man/vz.conf.5|<b>vz.conf</tdb>(5)]] file). Argument can containliteral string <td width="7%"b>$VEID</tdb>, which will be substituted withthe numeric CT ID.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">You can use<b>Container already running--ipadd</pb></tdi>addr</tri>option to assign an IP address to<tr valign="top" align="left">a container. Note that this option can be used multiple<td width="11%">times.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">33You can use</pb>--hostname</tdb><td width="7%"i>name</tdi>option to set a host name fora container.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">When runningwith an upstream Linux Kernel that supports user namespaces(&gt;= 3.8), the parameters <b>--local_uid</b> and<b>Unable --local_gid</b> can be used to stop containerselect which <i>uid</pi>and <i>gid</tdi> respectively will be used as a base user inthe host system. Note that user namespaces provide a 1:1mapping between container users and host users. If theseoptions are not specified, the values <b>LOCAL_UID</trb>and<tr valign="top" align="left"b>LOCAL_GID</b>from global configuration file[[Man/vz.conf.5|<b>vz.conf</b>(5)]] are used. An explicit <td width="11%"b>--local_uid</tdb>value of 0 will disable user namespace support, and run thecontainer as a privileged user. In this case,<b>--local_gid<td width="4%"/b> is ignored.</p>
<pstyle="margin-left:17%; margin-top: 1em"><b>34Warning:</pb>use <b>--local_uid</tdb>and <td width="7%"b>--local_gid</tdb>with care,specially when migrating containers. In all situations, thecontainer&rsquo;s files in the filesystem needs to becorrectly owned by the host-side users.<td width="78%"/p>
<pstyle="margin-left:11%;">Unable to add IP address to container</pb>destroy</tdb>| </trb>delete<tr valign="top" align="left"/b><td width="11%"i>CTID</tdi><td width="4%"/p>
<p>40</p></td><td widthstyle="7margin-left:17%;">Removes a container privatearea by deleting all files, directories and theconfiguration file of this container.</td><td width="78%"p>
<pstyle="margin-left:11%;">Container not mounted<b>start</pb> <i>CTID</i>[<b>--wait</tdb>] [<b>--force</trb>] [<b>--skip-fsck<tr valign="top" align="left"/b>][<td width="11%"b>--skip-remount</tdb>]<td width="4%"/p>
<pstyle="margin-left:17%;">Mounts (if necessary) andstarts a container. Unless <b>41--wait</pb> option isspecified, <b>vzctl</tdb>will return immediately; otherwisean attempt to wait till the default runlevel is reached willbe made by <td width="7%"b>vzctl</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container already mountedSpecify</pb>--force</td></tr><tr valign="top" align="left"b>if you want to start a container which isdisabled (see <td width="11%"b>--disabled</tdb>).<td width="4%"/p>
<p>43</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Specify<b>--skip-fsck</tdb>to skip fsck for ploop-based containerfilesystem (this option is used by vz initscript).<td width="78%"/p>
<p>Container private area not found</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">By default, ifa container to be started happens to be already mounted, itis unmounted and mounted again. This behavior can be turnedoff by using <td width="11%"b>--skip-remount</tdb>flag.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Note that thiscommand can lead to execution of <b>premount</b>,<b>44mount</pb> and <b>start</tdb>action scripts (see <b>ACTIONSCRIPTS<td width/b> below).</p> <p style="7margin-left:11%;"><b>stop</tdb> <i>CTID</i>[<b>--fast<td width="78%"/b>] [<b>--skip-umount</b>]</p>
<pstyle="margin-left:17%;">Container private area already existsStops a container and unmountsit (unless <b>--skip-umount</pb> is given). Normally,<b>halt</tdb>(8) is executed inside a container; option<b>--fast</trb>makes <b>vzctl<tr valign="top" align="left"/b>use <td width="11%"b>reboot</tdb>(2)syscall instead which is faster but can lead to uncleancontainer shutdown.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Note that<b>46vzctl stop</pb> is not asyncronous, in other words vzctlwaits for container&rsquo;s init to exit (unless<b>--fast</b> is given), which can take up to a few minutes.Default wait timeout is 120 seconds; it can be changedglobally, by setting <b>STOP_TIMEOUT</tdb>in[[Man/vz.conf.5|<b>vz.conf</b>(5)]], or per container (<td width="7%"b>STOP_TIMEOUT</tdb>in[[Man/ctid.conf.5|<b>ctid.conf<td width="78%"/b>(5)]], see <b>--stop-timeout</b>).</p>
<pstyle="margin-left:17%; margin-top: 1em">Note that thiscommand can lead to execution of <b>Not enough disk spacestop</pb>, </tdb>umount</trb>and <tr valign="top" align="left"b>postumount</b>action scripts (see <td width="11%"b>ACTIONSCRIPTS</tdb>below).<td width="4%"/p>
<pstyle="margin-left:11%;">47<b>restart</pb> <i>CTID</tdi>[<b>--wait</b>] [<b>--force</b>] [<td width="7%"b>--fast</tdb>][<b>--skip-fsck<td width="78%"/b>]</p>
<pstyle="margin-left:17%;">Bad/broken Restarts a container (, i.e.stops it if it is running, and starts again. Accepts all the<b>/sbin/initstart</b> orand <b>/bin/shstop</b> not found)options.</p></td></tr> <tr valignp style="margin-left:17%; margin-top" align="left: 1em">Note that thiscommand can lead to execution of some action scripts (see<td width="11%"b>ACTION SCRIPTS</tdb>below).<td width="4%"/p>
<pstyle="margin-left:11%;">48</pb>status</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p>Unable to create a new container private area</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>49</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">First word isliterally <b>CTID</tdb>.<td width="78%"/p>
<p>Unable to create a new container root area</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">Second word isthe numeric <td width="11%"i>CT ID</tdi>.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">50Third word isshowing whether this container exists or not, it can beeither </pb>exist</tdb>or <td width="7%"b>deleted</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to mount Fourth word isshowing the status of the containerfilesystem, 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">51Fifth wordshows if the container is running, it can be either</pb>running</tdb>or <td width="7%"b>down</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to unmount container</p>Sixth word, ifexists, is </tdb>suspended</tr><tr valign="top" align="left"b>. It appears if a dump fileexists for a stopped container (see <td width="11%"b>suspend</tdb>).<td width="4%"/p>
<p>52</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">This commandcan also be usable from scripts.</td><td width="78%"p>
<pstyle="margin-left:11%;">Unable to delete a container</pb>mount</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">53Mounts 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%;">Container private area not exist</pb>umount</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">60Unmounts 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">Note that<b>vzquota onstop</b> faileddoes </pb>umount</tdb>automatically.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:11%;">61<b>convert</pb> <i>CTID</tdi>[<td width="7%"b>--layoutploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</tdb>}]]<td width="78%"/p>
<p><b>vzquota init</b> failed</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Convert CT private area toreside on a ploop device (available in kernel version042stab052.8 and greater). Conversion should be performedwhen a container is stopped, plus disk space quota should be<td width="11%">set.</td><td width="4%"p>
<pstyle="margin-left:11%;">62</pb>compact</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p><b>vzquota setlimit</b> failed</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Compact container image. This<td width="11%">only makes sense for ploop layout.</td><td width="4%"p>
<pstyle="margin-left:11%;">63</pb>quotaon</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Parameter Turn disk quota on. Not that<b>DISKSPACEmount</b> not setand </pb>start</tdb>does that automatically.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:11%;">64</pb>quotaoff</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Parameter Turn disk quota off. Not that<b>DISKINODESumount</b> not setand </pb>stop</tdb>does that automatically.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:11%;">66</pb>quotainit</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Initialize disk quota (i.e. run<b>vzquota offinit</b> failed<) with the parameters taken from the CTconfiguration file [[Man/p>ctid.conf.5|</tdb>ctid.conf</tr><tr valign="top" align="left"><td width="11%"b>(5)]].</td><td width="4%"p>
<pstyle="margin-left:11%;">67</pb>exec</tdb><td width="7%"i>CTIDcommand</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">ugid quota not initializedExecutes </pi>command</tdi>in acontainer. Environment variables are not set inside thecontainer. Signal handlers may differ from default settings.If </tri>command<tr valign="top" align="left"/i>is <td width="11%"b>-</tdb>, commands are read fromstdin.<td width="4%"/p>
<pstyle="margin-left:11%;">71</pb>exec2</tdb><td width="7%"i>CTIDcommand</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Incorrect IP address format</p>The same as </tdb>exec</trb>, butreturn code is that of <tr valign="top" align="left"i>command<td width="11%"/i>.</td><td width="4%"p>
<pstyle="margin-left:11%;">74</pb>runscript</tdb><td width="7%"i>CTIDscript</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Error changing passwordRun specified shell script inthe container. Argument </pi>script</td></tri>is a file on the hostsystem which contents is read by vzctl and executed in thecontext of the container. For a running container, thecommand jumps into the container and executes the script.For a stopped container, it enters the container, mountscontainer&rsquo;s root filesystem, executes the script, andunmounts CT root. In the latter case, the container is not<tr valign="top" align="left">really started, no file systems other than root (such as<td width="11%"b>/proc</tdb>) are mounted, no startup scripts are executedetc. Thus the environment in which the script is running isfar from normal and is only usable for very basicoperations.<td width="4%"/p>
<pstyle="margin-left:11%;"><b>78enter</pb> <i>CTID</tdi>[<b>--exec</b> <i>command</i> [<td width="7%"i>arg</tdi>...]]<td width="78%"/p>
<p>IP address already in use</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Enters into a container (givinga container&rsquo;s root shell). This option is a back-doorfor host root only. The proper way to have CT root shell isto use <td width="11%"b>ssh</tdb>(1).<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">79Option<b>--exec</pb> is used to run <i>command</tdi>with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so <td width="7%"b>vzctl exec</tdb>can not beused) and for some reason you can not use <b>ssh<td width="78%"/b>(1).</p>
<p>Container action script returned an error</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">You need to logout manually from the shell to finish session (even if youspecified <td width="11%"b>--exec</tdb>).<td width="4%"/p>
<pstyle="margin-left:11%;"><b>82console</pb> <i>CTID</tdi>[<td width="7%"i>ttynum</tdi>]<td width="78%"/p>
<pstyle="margin-left:17%;">Config file copying errorAttach to a container console.Optional <i>ttynum</pi> argument is tty number (such as<b>4</tdb> for <b>tty4</trb>), default is <b>1<tr valign="top" align="left"/b>which is usedfor container&rsquo;s <td width="11%"b>/dev/console</tdb>.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">86Note theconsoles are persistent, meaning that: </pbr>&bull; it can be attached to even if the container is notrunning; </tdbr>&bull; there is no automatic detachment upon the containerstop; <td width="7%"br>&bull; detaching from the console leaves anything running inthis console as is.</td><td width="78%"p>
<p>Error setting devices (<b>style="margin-left:17%; margin-devices</btop: 1em"> orThe followingescape sequences are recognized by <b>--devnodesvzctl console</b>)</p> </td></tr>.<tr valign="top" align="left">Note that these sequences are only recognized at the<td width="11%">beginning of a line.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">89&bull;</pb>Esc</tdb>then <td width="7%"b>.</tdb>to detach from the console.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">&bull;<b>IP address not availableEsc</pb>then </tdb>!</trb>to kill anything running on the<tr valign="top" align="left">console (SAK). This is helpful when one expects a login<td width="11%">prompt but there isn&rsquo;t one.</td><td width="4%"p>
<p>91</p></td><td width="7%"></td><td width="78%">= Other options ===
<p>OS template not found</p></td></tr><tr valign="top" alignstyle="margin-left:11%;"><td width="11%"b>--help</tdb><td width="4%"/p>
<p>100</p></td><td widthstyle="7margin-left:17%;">Prints help message with abrief list of possible options.</td><td width="78%"p>
<p>Unable to find container IP address</p></td></tr><tr valign="top" alignstyle="margin-left:11%;"><td width="11%"b>--version</tdb><td width="4%"/p>
<p>104</p></td><td widthstyle="7margin-left:17%;">Prints <b>vzctl</tdb>version.<td width="78%"/p>
<p><b>VE_NETDEV</b> ioctl error</p></td></tr><tr valign="top" align="left"><td widthACTION SCRIPTS ="11%"></td><td width="4%">
<pstyle="margin-left:11%; margin-top: 1em"><b>vzctl</b>has an ability to execute user-defined scripts when aspecific <b>105vzctl</pb> command is run for a container. Thefollowing <b>vzctl</tdb>commands can trigger execution ofaction scripts: <b>start</b>, <td width="7%"b>stop</b>, <b>restart</tdb>,<td width="78%"b>mount</b> and <b>umount</b>.</p>
<pstyle="margin-left:11%; margin-top: 1em">Container start disabledAction scriptsare located in the <b>/petc/vz/conf/</b>directory. There areglobal and per-CT scripts. Global scripts have a literalprefix of </tdb>vps.</trb>and are executed for all containers.Per-CT scripts have a <tr valign="top" align="left"i>CTID</i><td width="11%"b>.</tdb>numeric prefix andare executed for the given container only.<td width="4%"/p>
<pstyle="margin-left:11%; margin-top: 1em">106Please notescripts are executed in a host system (CT0) context, withthe exception of </pb>.start</tdb>and <td width="7%"b>.stop</tdb>scripts,which are executed in a container context.<td width="78%"/p>
<pstyle="margin-left:11%; margin-top: 1em">Unable to set iptables on a running containerThe followingaction scripts are currently defined: </pb><br>vps.premount</tdb>, </tri>CTID<tr valign="top" align="left"/i><td width="11%"b>.premount</tdb><td width="4%"/p>
<p>107</p></td><td widthstyle="7margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container before it is mounted.Scripts are executed in the host system context, while a CTis not yet mounted or running. Global script, if exists, isexecuted first.</td><td width="78%"p>
<pstyle="margin-left:11%;">Distribution-specific configuration file not found</pb>vps.mount</tdb>,</tri>CTID<tr valign="top" align="left"/i><td width="11%"b>.mount</tdb><td width="4%"/p>
<p>109</p></td><td widthstyle="7margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container right after it ismounted. Otherwise they are the same as <b>.premount</tdb>scripts.<td width="78%"/p>
<pstyle="margin-left:11%;">Unable to apply a config</pi>CTID</tdi></trb>.start<tr valign="top" align="left"><td width="11%"/b></td><td width="4%"p>
<p>129</p></td><td widthstyle="7margin-left:22%;">Right after <b>vzctl</tdb>hasstarted a container, it executes this script in a containercontext.<td width="78%"/p>
<pstyle="margin-left:11%;">Unable to set meminfo parameter</pi>CTID</tdi></trb>.stop<tr valign="top" align="left"><td width="11%"/b></td><td width="4%"p>
<p>130</p></td><td widthstyle="7margin-left:22%;">Right before <b>vzctl</tdb>hasstopped a container, it executes this script in a containercontext.<td width="78%"/p>
<pstyle="margin-left:11%;">Error setting veth interface</pb>vps.umount</tdb>,</tri>CTID<tr valign="top" align="left"/i><td width="11%"b>.umount</tdb><td width="4%"/p>
<p>131</p></td><td widthstyle="7margin-left:22%;">Global and per-CT umountscripts which are executed for a container before it isunmounted. Scripts are executed in the host system context,while a CT is mounted. Global script, if exists, is executedfirst.</td><td width="78%"p>
<pstyle="margin-left:11%;">Error setting container name</pb>vps.postumount</tdb>,</tri>CTID<tr valign="top" align="left"/i><td width="11%"b>.postumount</tdb><td width="4%"/p>
<p>133</p></td><td widthstyle="7margin-left:22%;">Global and per-CT umountscripts which are executed for a container right after it isunmounted. Otherwise they are the same as <b>.umount</tdb>scripts.<td width="78%"/p>
<pstyle="margin-left:11%; margin-top: 1em">The environmentpassed to all the <b>Waiting for container start failed*mount</pb> scripts is the standardenvironment of the parent (i.e. <b>vzctl</tdb>) with twoadditional variables: <b>$VEID</trb>and <b>$VE_CONFFILE<tr valign="top" align="left"/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 <td width="11%"b>$VE_ROOT</tdb>, it needs to get thosefrom global and per-CT configuration files.<td width="4%"/p>
<pstyle="margin-left:11%; margin-top: 1em">139Here is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container(s). Script name can eitherbe <b>/etc/vz/conf/vps.mount</b> or<b>/etc/vz/conf/</b><i>CTID</i><b>.mount</b>.</p> <pre style="margin-left:11%; margin-top: 1em"> # If one of these files does not exist then something # is really broken [ -f /etc/vz/vz.conf ] || exit 1 [ -f $VE_CONFFILE ] || exit 1 # Source both files. Note the order is important. . /etc/vz/vz.conf . $VE_CONFFILE SRC=/mnt/disk DST=/mnt/disk mount -n -t simfs $SRC ${VE_ROOT}${DST} -o $SRC</pre> == EXIT STATUS == <p style="margin-left:11%; margin-top: 1em">Returns 0 uponsuccess, or an appropriate error code in case of anerror:</p> <table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>1</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error saving container configuration fileFailed to set a UBC parameter</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>1482</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting container IO parameters (ioprio)Failed to set a fair scheduler parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></tabletd><td width="4%">
<p>3</p></td><td width="7%"></td><td width= EXAMPLES "78%"> <p>Generic system error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>5</p></td><td width="7%"></td><td width="78%">
<p style="margin-left:11%; margin-top: 1em">To create andstart &quot;basic&quot; container with ID of 1000 usingThe running kernel is not an OpenVZ kernel (or someOpenVZ modules are not loaded)</p><i/td>fedora-core-5</itr> OS template and IP address of192.168.10.200: <brtr valign="top" align="left">vzctl create 1000 --ostemplate fedora-core-5 --config basic<brtd width="11%">vzctl set 1000 --ipadd 192.168.10.200 --save <br/td>vzctl start 1000</ptd width="4%">
<p>6</p></td><td width="7%"></td><td width="78%"> <p>Not enough system resources</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>7</p></td><td width="7%"></td><td width="78%"> <p><b>ENV_CREATE</b> ioctl failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>8</p></td><td width="7%"></td><td width="78%"> <p>Command executed by <b>vzctl exec</b> returned non-zeroexit code</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>9</p></td><td width="7%"></td><td width="78%"> <p>Container is locked by another <b>vzctl</b>invocation</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>10</p></td><td width="7%"></td><td width="78%"> <p>Global OpenVZ configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]] notfound</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>11</p></td><td width="7%"></td><td width="78%"> <p>A vzctl helper script file not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>12</p></td><td width="7%"></td><td width="78%"> <p>Permission denied</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>13</p></td><td width="7%"></td><td width="78%"> <p>Capability setting failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>14</p></td><td width="7%"></td><td width="78%"> <p>Container configuration file [[Man/ctid.conf.5|<b>ctid.conf</b>(5)]] notfound</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>15</p></td><td width="7%"></td><td width="78%"> <p>Timeout on <b>vzctl exec</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>16</p></td><td width="7%"></td><td width="78%"> <p>Error during <b>vzctl suspend</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>17</p></td><td width="7%"></td><td width="78%"> <p>Error during <b>vzctl resume</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>18</p></td><td width="7%"></td><td width="78%"> <p>Error from <b>setluid()</b> syscall</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>20</p></td><td width="7%"></td><td width="78%"> <p>Invalid command line parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>21</p></td><td width="7%"></td><td width="78%"> <p>Invalid value for command line parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>22</p></td><td width="7%"></td><td width="78%"> <p>Container root directory (<b>VE_ROOT</b>) not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>23</p></td><td width="7%"></td><td width="78%"> <p>Container private directory (<b>VE_PRIVATE</b>) notset</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>24</p></td><td width="7%"></td><td width="78%"> <p>Container template directory (<b>TEMPLATE</b>) notset</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>28</p></td><td width="7%"></td><td width="78%"> <p>Not all required UBC parameters are set, unable to startcontainer</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>29</p></td><td width="7%"></td><td width="78%"> <p>OS template is not specified, unable to createcontainer</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>31</p></td><td width="7%"></td><td width="78%"> <p>Container not running</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>32</p></td><td width="7%"></td><td width="78%"> <p>Container already running</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>33</p></td><td width="7%"></td><td width="78%"> <p>Unable to stop container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>34</p></td><td width="7%"></td><td width="78%"> <p>Unable to add IP address to container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>40</p></td><td width="7%"></td><td width="78%"> <p>Container not mounted</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>41</p></td><td width="7%"></td><td width="78%"> <p>Container already mounted</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>43</p></td><td width="7%"></td><td width="78%"> <p>Container private area not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>44</p></td><td width="7%"></td><td width="78%"> <p>Container private area already exists</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>46</p></td><td width="7%"></td><td width="78%"> <p>Not enough disk space</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>47</p></td><td width="7%"></td><td width="78%"> <p>Bad/broken container (<b>/sbin/init</b> or<b>/bin/sh</b> not found)</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>48</p></td><td width="7%"></td><td width="78%"> <p>Unable to create a new container private area</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>49</p></td><td width="7%"></td><td width="78%"> <p>Unable to create a new container root area</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>50</p></td><td width="7%"></td><td width="78%"> <p>Unable to mount container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>51</p></td><td width="7%"></td><td width="78%"> <p>Unable to unmount container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>52</p></td><td width="7%"></td><td width="78%"> <p>Unable to delete a container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>53</p></td><td width="7%"></td><td width="78%"> <p>Container private area not exist</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>60</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota on</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>61</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota init</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>62</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota setlimit</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>63</p></td><td width="7%"></td><td width="78%"> <p>Parameter <b>DISKSPACE</b> not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>64</p></td><td width="7%"></td><td width="78%"> <p>Parameter <b>DISKINODES</b> not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>65</p></td><td width="7%"></td><td width="78%"> <p>Error setting in-container disk quotas</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>66</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota off</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>67</p></td><td width="7%"></td><td width="78%"> <p>ugid quota not initialized</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>71</p></td><td width="7%"></td><td width="78%"> <p>Incorrect IP address format</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>74</p></td><td width="7%"></td><td width="78%"> <p>Error changing password</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>78</p></td><td width="7%"></td><td width="78%"> <p>IP address already in use</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>79</p></td><td width="7%"></td><td width="78%"> <p>Container action script returned an error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>82</p></td><td width="7%"></td><td width="78%"> <p>Config file copying error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>86</p></td><td width="7%"></td><td width="78%"> <p>Error setting devices (<b>--devices</b> or<b>--devnodes</b>)</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>89</p></td><td width="7%"></td><td width="78%"> <p>IP address not available</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>91</p></td><td width="7%"></td><td width="78%"> <p>OS template not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>99</p></td><td width="7%"></td><td width="78%"> <p>Ploop is not supported by either the running kernel orvzctl.</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>100</p></td><td width="7%"></td><td width="78%"> <p>Unable to find container IP address</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>104</p></td><td width="7%"></td><td width="78%"> <p><b>VE_NETDEV</b> ioctl error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>105</p></td><td width="7%"></td><td width="78%"> <p>Container start disabled</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>106</p></td><td width="7%"></td><td width="78%"> <p>Unable to set iptables on a running container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>107</p></td><td width="7%"></td><td width="78%"> <p>Distribution-specific configuration file not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>109</p></td><td width="7%"></td><td width="78%"> <p>Unable to apply a config</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>129</p></td><td width="7%"></td><td width="78%"> <p>Unable to set meminfo parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>130</p></td><td width="7%"></td><td width="78%"> <p>Error setting veth interface</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>131</p></td><td width="7%"></td><td width="78%"> <p>Error setting container name</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>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>166</p></td><td width="7%"></td><td width="78%"> <p>Error compacting ploop image</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>167</p></td><td width="7%"></td><td width="78%"> <p>Error listing ploop snapsots</p></td></tr></table> == EXAMPLES == <p style="margin-left:11%; margin-top: 1em">To create andstart &quot;basic&quot; container with ID of 1000 using<b>centos-5</b> OS template and IP address of192.168.10.200:</p> <pre style="margin-left:11%; margin-top: 1em"> vzctl create 1000 --ostemplate centos-5 --config basic vzctl set 1000 --ipadd 192.168.10.200 --save vzctl start 1000</pre> <p style="margin-left:11%; margin-top: 1em">To set numberof processes barrier/limit to 80/100, and PTY barrier/limitto 16/20 PTYs: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl set 1000 --numproc 80:100 -t 16:20 --save</ppre>
<p style="margin-left:11%; margin-top: 1em">To execute
command <b>ls -la</b> in this container: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl exec 1000 /bin/ls -la</ppre> <p style="margin-left:11%; margin-top: 1em">To executecommand pipe <b>ls -l / | sort</b> in this container: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl exec 1000 &rsquo;ls -l / | sort&rsquo;</ppre> <p style="margin-left:11%; margin-top: 1em">To enter thiscontainer and execute command <b>apt-get install vim</b>:</p> <brpre style="margin-left:11%; margin-top: 1em"> vzctl enter 1000 --exec apt-get install vim</ppre> <p style="margin-left:11%; margin-top: 1em">Note that inthe above example you will need to log out from thecontainer&rsquo;s shell after apt-get finishes.</p> <p style="margin-left:11%; margin-top: 1em">To enter thiscontainer, execute command <b>apt-get install vim</b> andlogout after successful installation (or stay inside thecontainer if installation process failed) use<b>&amp;&amp;</b>: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl enter 1000 --exec &quot;apt-get install vim &amp;&amp;logout&quot;</ppre> <p style="margin-left:11%; margin-top: 1em">To enter thiscontainer, execute command <b>apt-get install vim</b> andlogout independently of exit code of installation processuse <b>;</b>: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl enter 1000 --exec &quot;apt-get install vim ;logout&quot;</ppre> <p style="margin-left:11%; margin-top: 1em">Note that youneed to quote the command if you use <b>&amp;&amp;</b> or<b>;</b>.</p> <p style="margin-left:11%; margin-top: 1em">To stop thiscontainer: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl stop 1000</pre> <p style="margin-left:11%; margin-top: 1em">To permanentlyremove this container:</p>
<p pre style="margin-left:11%; margin-top: 1em">To permanentlyremove this container: <br> vzctl destroy 1000</ppre>
== FILES ==
<p pre style="margin-left:11%; margin-top: 1em">/etc/vz/vz.conf<br>/etc/vz/conf/<i>CTID</i>.conf <br>/etc/vz/conf/vps.{premount,mount,umount,postumount} <br> 
/etc/vz/conf/<i>CTID</i>.{premount,mount,start,stop,umount,postumount}
<br>/proc/vz/veinfo <br>/proc/vz/vzquota <br>/proc/user_beancounters <br>/proc/bc/* <br>/proc/fairsched</ppre>
== SEE ALSO ==
[[Man/vzifup-post.8|<b>vzifup-post</b>(8)]], [[Man/vzlist.8|<b>vzlist</b>(8)]],
[[Man/vzmemcheck.8|<b>vzmemcheck</b>(8)]], [[Man/vzmigrate.8|<b>vzmigrate</b>(8)]], [[Man/vzpid.8|<b>vzpid</b>(8)]],
[[Man/vzquota.8|<b>vzquota</b>(8)]], [[Man/vzsplit.8|<b>vzsplit</b>(8)]], [[Man/vzubc.8|<b>vzubc</b>(8)]],
<b>[[UBC]]</b>.</p>
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2000-20112013, Parallels, Inc. Licensed under GNU GPL.</p>
2,253
edits

Navigation menu