Changes

Jump to: navigation, search

Man/vzctl.8

32,078 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%;"><b>--ipaddvzctl</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 containerHardware Node, or HN) and performs direct manipulations withcontainers (CTs). If you want </p> <p style="margin-left:11%; margin-top: 1em">Containers canbe referred to remove all the addresses,by either numeric <i>CTID</i> or by name (seeuse <b>--ipdel allname</b> option). Note that CT ID &lt;= 100 arereserved for OpenVZ internal purposes. A numeric ID shouldnot be more than <b>2147483644</b>.</p>
<p style="margin-left:11%;"><b>--hostname</b><i>name</i></p>= OPTIONS ==
<p style="margin-left:17%;">Sets container hostname.<b>vzctl</b> writes it to the appropriate file inside acontainer (distribution-dependent).</p>== Flags ===
<p style="margin-lefttop:11%;1em"><b>--nameserver</b>These flags come before acommand, and can be used with any command. They affectlogging to console (terminal) only, and do not affect<i>addr</i>logging to a log file.</p>
<p style="margin-left:1711%;">Sets DNS server IP address fora container. If you want to set several nameservers, youshould do it at once, so use <b>--nameserverquiet</b> optionmultiple times in one call to <b>vzctl</bp>, as all the nameserver values set in previous calls to <bp style="margin-left:17%;">Disables output. Note thatscripts run by vzctl</b> arestill able to produce someoverwrittenoutput.</p>
<p style="margin-left:11%;"><b>--searchdomainverbose</b><i>name</i></p>
<p style="margin-left:17%;">Sets DNS search domains for aIncrements logging level upcontainerfrom the default. If you want Can be used multiple times. Default valueis set to set several search domains, youthe value of <b>VERBOSE</b> parameter in theshould do it at once, so use global configuration file [[Man/vz.conf.5|<b>--searchdomainvz.conf</b> optionmultiple times in one call (5)]], or to <b>vzctl0</b>, as all thesearch domain values if not set in previous calls to by <b>vzctlVERBOSE</b>are overwrittenparameter.</p>
<p style="margin-left:11%;"><b>--netif_add</b><i>ifname[</i>,<i>mac</i>,<i>host_ifname</i>,<i>host_mac</i>,<i>bridge]</i></p>== Setting container parameters ===
<p styletable width="margin-left:17100%;">Adds a virtual Ethernet deviceborder="0" rules="none" frame="void"(veth) to a given container. Here <i>ifname</i cellspacing="0" cellpadding="0"> is theEthernet device name in the container, <itr valign="top" align="left">mac</i> is its MACaddress, <itd width="11%">host_ifname</itd> 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.</ptd width="4%">
<p style="margin-lefttop:11%;1em"><b>--netif_delset</b><i/p>dev_name</itd> | <btd width="2%">all</btd></ptd width="83%">
<p style="margin-lefttop: 1em"><i>CTID</i>[<b>--onboot&nbsp;yes</b>|<b>no</b>][<b>--bootorder&nbsp;</b><i>number</i>][<b>--root&nbsp;</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>][<b>--mount_opts&nbsp;</b><i>options</i>][<b>--userpasswd&nbsp;</b><i>user</i>:17%<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>Removes virtual Ethernet device]from a container[<b>--netif_add&nbsp;</b><i>dev</i>[,<i>params</i>. If you want to remove ..]][<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>, use</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>all|<b>ignore</b>.]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"></td><td width="2%"></td><td width="83%">
==== Veth interface configuration ====<p>This command sets various container parameters. If thecontainer is currently running, <b>vzctl</b> applies theseparameters to the container. The following options can beused with <b>set</b> command.</p></td></tr></table>
<p style="margin-left:11%; margin-top: 1em">The followingoptions can be used to reconfigure the already-createdvirtual Ethernet interface. To select the interface toconfigure, use <b>--ifname</b> <i>name</i> option. <b><br>--mac</b> <i>XX:XX:XX:XX:XX:XX</i></p>=== Flags ====
<p style="margin-left:2211%;">MAC address of interface insidea container.<b>--save</b></p>
<p style="margin-left:1117%;">If this flag is given,parameters are saved in container configuration file[[Man/ctid.conf.5|<b>--host_ifnamectid.conf</b><i>name</i>(5)]].</p>
<p style="margin-left:2211%;">interface name for virtualinterface in the host system.<b>--force</b></p>
<p style="margin-left:1117%;">If this flag is given togetherwith <b>--host_macsave</b>, parameters are saved even if the currentkernel doesn&rsquo;t support OpenVZ. Note this flag does notmake sense without <ib>XX:XX:XX:XX:XX:XX--save</ib>, so <b>--save</b> isrequired.</p>
<p style="margin-left:2211%;">MAC address of interface in thehost system.<b>--reset_ub</b></p>
<p style="margin-left:1117%;">If this flag is given,<b>--bridgevzctl</b> <i>name</applies all User Beancounter parameters fromthe configuration file to a running container. This ishelpful in case configuration file is modified manually.Please note this flag is exclusive, i>.e. it can not becombined with any other options or flags.</p>
<p style="margin-left:2211%;">Bridge name. Custom network<b>--setmode restart</b> |start scripts can use this value to automatically add theinterface to a bridge.<b>ignore</b></p>
<p style="margin-left:1117%;">A few parameters can only beapplied by restarting the container. By default,<b>vzctl</b> prints a warning if such parameters aresupplied and a container is running. Use <b>--mac_filtersetmoderestart</b>together with <b>--save</b> flag to restart acontainer in such a case, or <ib>on|off--setmode ignore</ib>tosuppress the warning.</p>
<p style="margin-left:22%;">Enables/disables MAC addressfiltering for the Container veth device and the possibilityof configuring the MAC address of this device from insidethe Container. If the filtering is turned on: <br>&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); <br>&bull; it is impossible to modify the veth MAC address frominside the Container.</p>=== Miscellaneous ====
<p style="margin-left:2211%; margin"><b>--top: 1em"onboot yes</b>By default,|this functionality is enabled for all veth devices existinginside the Container.<b>no</b></p>
<p style==== Resource limits ===="margin-left:17%;">Sets whether the container willbe started during system boot. The container will be startedon boot by <b>vz</b> initscript if either this parameter isset to <b>yes</b>, or the container was running just beforelast reboot, and this parameter is not set to <b>no</b>.Default value is unset, meaning the container will bestarted if it was running before the last reboot.</p>
<p style="margin-left:2211%; "><b>--bootorder</b><i>number</i></p> <p style="margin-topleft: 1em17%;">The followingSets the boot order priorityoptions sets barrier and limit for various userbeancountersthis CT. Each option requires one or two arguments. Incase of one argument, The higher the <bi>vzctlnumber</bi> sets barrier and limit tois, the earlier inthe same valueboot process this container starts. In case of two colon-separated arguments,By default thisthe first parameter is a barrierunset, and which is considered to be the second is a limit. Eachlowestargument is either a numberpriority, a number so containers with a suffix, or aspecial value unset <b>unlimitedbootorder</b>willstart last.</p>
<p style="margin-left:2211%; margin-top: 1em">Arguments arein items, pages or bytes. Note that page size isarchitecture<b>--specific, it is 4096 bytes on IA32platform.root</b> <i>path</i></p>
<p style="margin-left:2217%; margin-top: 1em">You can alsoSets the path to root directoryspecify different suffixes for <b>set</b> parameters (exceptfor the parameters which names start with <b>numVE_ROOT</b>)for this container. ForThis is essentially aexample, <b>vzctl set</b> <i>CTID</i> <b>--privvmpagesmount point for container&rsquo;s root directory. Argument5M:6M</b> should set can contain literal string <b>privvmpages$VEID</b>&rsquo; barrier to 5, which will bemegabytes and its limit to 6 megabytessubstituted with the numeric CT ID.</p>
<p style="margin-left:2211%; margin-top: 1em">Availablesuffixes are: <b><br>g</b>, <b>G</b> -- gigabytes. <b><br>m</b>, <b>M</b> -- megabytes. <b><br>k</b>, <b>Kprivate</b> -- kilobytes. <b><br>p</b>, <bi>Ppath</bi> -- 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 privatespecify the literal word directory (<b>unlimitedVE_PRIVATE</b> in place of ) for this container. This is anumber. In that case directory in which all the corresponding value will be set tocontainer&rsquo;s files arestored. Argument can contain literal string <b>LONG_MAX$VEID</b>, i. e. which will be substituted with the maximum possible valuenumeric CT ID.</p>
<p style="margin-left:11%;"><b>--numprocmount_opts</b><i>itemsoption</i>[:<b>,</b><i>itemsoption</i>...]</p>
<p style="margin-left:2217%;">Maximum number of processes andSets additional mount optionskernel-level threadsfor container file system. Setting the barrier and the limit toOnly applicable for <b>ploop</b>different values does not make practical senselayout, ignored otherwise.</p>
<p style="margin-left:11%;"><b>--numtcpsockuserpasswd</b><i>itemsuser</i>[:<i>itemspassword</i>]</p>
<p style="margin-left:2217%;">Maximum number of TCP sockets.This parameter limits Sets password for the number of TCP connections and,giventhususer in a container, creating the number of clients the server application canuser if it does nothandle exists. Note that this option is not saved in parallel. Setting configurationfile at all (so <b>--save</b> flag is useless), it isapplied directly to the barrier and container, by runningdistribution-specific programs inside the limit container. It isnot recommended tocombine this option with any otherdifferent values does not make practical senseoptions.</p>
<p style="margin-left:1117%;margin-top: 1em"><b>--numothersock</b>In casecontainer was not running, it is automatically started thenall the appropriate changes are applied, then it is<i>items</i>[:<i>items</i>]stopped.</p>
<p style="margin-left:2217%;margin-top: 1em">Maximum number of non-TCPsockets (local sockets, UDP and other types of sockets).Setting the barrier and the limit to different values doesNote thatnot make practical sensecontainer should be created before using this option.</p>
<p style="margin-left:11%;"><b>--vmguarpagesdisabled yes</b>|<ib>pagesno</i>[:<i>pages</ib>]</p>
<p style="margin-left:2217%;">Memory allocation guaranteeDisable container start.ToThis parameter controls how much memory is available to acontainer. The barrier is force the amount start of memory thata disabled container&rsquo;s applications are guaranteed to be able toallocate. The meaning of the limit is currently unspecified;it should be set to , use <b>unlimitedvzctl start--force</b>.</p>
<p style="margin-left:11%;"><b>--kmemsizename</b><i>name</i></p> <p style="margin-left:17%;">Add a name for a container. The<i>bytesname</i>[:can later be used in subsequent calls to<b>vzctl</b> in place of <i>bytesCTID</i>]. Note this option cannot be used without <b>--save</b>.</p>
<p style="margin-left:2211%;">Maximum amount of kernel memoryused. This parameter is related to <b>--numprocdescription</b>. Eachprocess consumes certain amount of kernel memory - 16 KB atleast, 30-50 KB typically. Very large processes may consumea bit more. It is important to have a certain safety gapbetween the barrier and the limit of this parameter: equalbarrier and limit may lead to the situation where the kernelwill need to kill container&rsquo;s applications to keep the<bi>kmemsizestring</bi> usage under the limit.</p>
<p style="margin-left:1117%;"><b>--tcpsndbuf</b>Add a textual description for a<i>bytes</i>[:<i>bytes</i>]container.</p>
<p style="margin-left:2211%;">Maximum size of TCP sendbuffers. Barrier should be not less than 64 KB, anddifference between barrier and limit should be equal to ormore than value of <b>numtcpsock--ostemplate</b> multiplied by 2.5KB.<i>string</i></p>
<p style="margin-left:1117%;">Sets a new value of<b>--tcprcvbufOSTEMPLATE</b>parameter in container configuration file[[Man/ctid.conf.5|<ib>bytesctid.conf</ib>[:(5)]]. Requires <ib>bytes--save</ib>]flag. Usefulafter a change/upgrade of a distribution running insidecontainer, as vzctl uses the value of OSTEMPLATE to rundistribution-specific scripts.</p>
<p style="margin-left:2211%;">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--stop-timeout</b> multiplied by 2.5KB.<i>seconds</i></p>
<p style="margin-left:1117%;">Sets a time to wait forcontainer to stop on <b>--othersockbufvzctl stop</b>before forciblykilling it, in seconds. Note this option can not be usedwithout <ib>bytes--save</i>[:<i>bytes</ib>]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 from<b>none</b>inside the Container.</p>
<p 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 = VSwap limits ====
<p style="margin-left:2211%; margin-top: 1em">TheseThe followingparameters control CPU usage by containeroptions sets memory and swap limits for VSwap-enabledkernels (kernel version 042stab042 or greater).</p>
<p style="margin-left:11%;margin-top: 1em"><b>--cpuunits</b>Argument is inbytes, unless otherwise specified by an optional suffix.<i>num</i>Available suffixes are:</p>
<p style="margin-left:2211%;margin-top: 1em">CPU weight for a container.&bull;<b>T</b>, <b>t</b> - terabytes; <br>Argument is positive non&bull; <b>G</b>, <b>g</b> -zero numbergigabytes; <br>&bull; <b>M</b>, passed to and used in<b>m</b> - megabytes; <br>the kernel fair scheduler. The larger the number is&bull; <b>K</b>, the<b>k</b> - kilobytes; <br>more CPU time this container gets. Maximum value is 500000&bull; <b>P</b>, <b>p</b> - memory pages (arch-specific,minimal is 8. Number is relative to weights of all the otherusually 4KB); <br>running containers. If &bull; <b>cpuunitsB</b> are not specified,<b>b</b> - bytes (this is the default value of 1000 is used).<b><br>--ram</b> <i>bytes</i></p>
<p style="margin-left:22%; margin-top: 1em">You can set CPUweight for CT0 Sets physical memory (host system itselfRAM) as well (use <b>vzctlset 0 --cpuunits</b> <i>num</i>)available to a container. UsuallyActually, OpenVZ initscriptthe option is a shortcut(for setting <b>/etc/init.d/vz--physpages</b>limit (the barrier is set to0) takes care of setting this.</p>
<p style="margin-left:11%;"><b>--cpulimitswap</b><i>numbytes</i>[<b>%</b>]</p>
<p style="margin-left:22%;">Limit of CPU usage for theSet swap space available to acontainer. Actually, in per cent. Note if the computer has 2 CPUs, itoption is a shortcut for settinghas total of 200% CPU time. Default CPU <b>--swappages</b> limit (the barrier is set to 0).</p> <p style="margin-left:11%;"><b>0--vm_overcommit</b>(no CPU limit).<i>float</i></p>
<p style="margin-left:1122%;">Set VM overcommitment value to<i>float</i>. If set, it is used to calculate<b>--cpusprivmmpages</b> parameter in case it is not setexplicitly (see below). Default value is <ib>num0</ib>, meaningunlimited privvmpages.</p>
<p style="margin-left:2211%;margin-top: 1em">sets number of CPUs available<b>vzctl</b>checks if running kernel is VSwap capable, and refuses touse these parameters otherwise. This behavior can beoverriden by using <b>--force</b> flag beforein the containerparameters.</p>
<p style="margin-left:11%;margin-top: 1em"><b>--cpumask</b> <i>cpus</i> |In VSwap mode,<b>all</b>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">sets list of allowed CPUs forthe container. Input format is a comma-separated list ofdecimal numbers and ranges. Consecutively set bits are shownas two hyphen-separated decimal numbers, the smallest andlargest bit numbers set in the range. For example, if youwant the container to execute on CPUs 0, 1, 2, 7, you shouldpass <b>0-2,7</b>&bull;lockedpages.barrier = oomguarpages. Default value is <b>allbarrier = ram</b> (thecontainer can execute on any CPU).</p>
<p style="margin-left:11%; margin-top: 1em"><b>&bull;lockedpages.limit =oomguarpages.limit == Memory output parameters ====unlimited</b></p>
<p style="margin-left:2211%; margin-top: 1em">This parameter<b>&bull;control output of vmguarpages.barrier = vmguarpages.limit = ram + swap</proc/meminfo inside a container.b></p>
<p style="margin-left:11%;margin-top: 1em"><b>--meminfo none&bull;privvmpages.barrier = privvmpages.limit = (ram + swap) *vm_overcommit</b></p>
<p style="margin-left:2211%;margin-top: 1em">No (if<b>vm_overcommit</procb> is <b>0</meminfo virtualizationb> or not set,(the same as on host system<b>privvmpages</b> is set to &quot;unlimited&quot;).</p>
<p style="margin-left:11%;margin-top: 1em"><b>--meminfo</b>Here is anexample of setting container 777 to have 512 megabytes of<i>mode</i>RAM and 1 gigabyte of swap:<i>value</i></p>
<p pre style="margin-left:2211%;">Configure total memory outputin a container. Reported free memory is evaluatedaccordingly to the mode being vzctl set. Reported 777 --ram 512M --swap isevaluated according to the settings of <b>1G --swappages</b>parameter.save</ppre>
<p style="margin-left:22%; margin-top: 1em">You can use thefollowing modes for <i>mode</i>: <br>&bull; <b>pages</b>:<i>value</i> - sets total memory inpages; <br>&bull; <b>privvmpages</b>:<i>value</i> - sets total memoryas <b>privvmpages</b> * <i>value</i>.</p>=== User Beancounter limits ====
<p style="margin-left:2211%; margin-top: 1em">Default isThe following<b>privvmpages:1</b>options sets barrier and limit for various userbeancounters.</p>
<p style==== iptables control parameters ===="margin-left:11%; margin-top: 1em">Note that forVSwap-enabled kernels (version 042stab042 or greater) theselimits are optional, you must only set <b>--ram</b> and<b>--swap</b> (see above). For older kernels, these limitsare obligatory.</p>
<p style="margin-left:11%;margin-top: 1em">Each optionrequires one or two arguments. In case of one argument,<b>--iptablesvzctl</b> sets barrier and limit to the same value. Incase of two colon-separated arguments, the first is abarrier, and the second is a limit. Each argument is eithera number, a number with a suffix, or a special value<ib>nameunlimited</ib>.</p>
<p style="margin-left:2211%;margin-top: 1em">Allow to use the functionalityArguments areof <i>name</i> iptables module inside the containerin items, pages or bytes. ToNote that page size isspecify multiple <i>name</i>s, repeat -architecture-iptables for eachspecific,it is 4096 bytes on x86 and x86_64or use space-separated list as an argument (enclosed insingle or double quotes to protect spaces)platforms.</p>
<p style="margin-left:2211%; margin-top: 1em">The defaultYou can alsolist of enabled iptables modules is specified by thespecify different suffixes for User Beancounter parameters(except for those which names start with <b>IPTABLESnum</b>). Forexample, <b>vzctl set</b> <i>CTID</i> <b> variable in [[Man--privvmpages5M:6M</vz.conf.5|b> should set <b>vz.confprivvmpages</b>(&rsquo; barrier to 5)]]megabytes and its limit to 6 megabytes.</p>
<p style="margin-left:2211%; margin-top: 1em">You can use theAvailablefollowing values for <i>name</i>suffixes are: <b>iptable_filter</b>,<b>iptable_mangle</b>, <b>ipt_limit</b>,<b>ipt_multiport</b>, <b>ipt_tos</b>, <b>ipt_TOS</b>,<b>ipt_REJECT</b>, <b>ipt_TCPMSS</b>, <b>ipt_tcpmss</b>,<b>ipt_ttl</b>, <b>ipt_LOG</b>, <b>ipt_length</b>,<b>ip_conntrack</b>, <b>ip_conntrack_ftp</b>,<b>ip_conntrack_irc</b>, <b>ipt_conntrack</b>,<b>ipt_state</b>, <b>ipt_helper</b>, <b>iptable_nat</b>,<b>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>ipt_REDIRECT</b>,<b>xt_mac</b>, <b>ipt_recent</b>, <b>ipt_owner</b>.</p>
<p style==== Network devices control parameters ===="margin-left:11%; margin-top: 1em">&bull;<b>T</b>, <b>t</b> - terabytes; <br>&bull; <b>G</b>, <b>g</b> - gigabytes; <br>&bull; <b>M</b>, <b>m</b> - megabytes; <br>&bull; <b>K</b>, <b>k</b> - kilobytes; <br>&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_addnumproc</b> <i>nameitems</i>[:<i>items</i>]</p>
<p style="margin-left:22%;">move network device from Maximum number of processes andkernel-level threads. Setting the barrier and thelimit tohost system to a specified containerdifferent values does not make practical sense.</p>
<p style="margin-left:11%;"><b>--netdev_delnumtcpsock</b><i>nameitems</i>[:<i>items</i>]</p>
<p style="margin-left:22%;">delete network device from aMaximum number of TCP sockets.specified containerThis parameter limits the number of TCP connections and,thus, the number of clients the server application canhandle in parallel. Setting the barrier and the limit todifferent values does not make practical sense.</p>
<p style="margin-left:11%;"><b>Disk quota parameters --numothersock<br/b>--diskquota yes<i>items</bi>|[:<bi>noitems</bi>]</p>
<p style="margin-left:22%;">allows to enable or disableMaximum number of non-TCPdisk quota for a container. By defaultsockets (local sockets, a global value(<b>DISK_QUOTA</b>UDP and other types of sockets) from [[Man/vz.conf.5|<b>vz.conf</b>(5)]] is usedSetting the barrier and the limit to different values doesnot make practical sense.</p>
<p style="margin-left:11%;"><b>--diskspacevmguarpages</b><i>numpages</i>[:<i>numpages</i>]</p>
<p style="margin-left:22%;">sets soft and hard disk quotaMemory allocation guarantee.limits, in blocks. First This parameter controls how much memory is soft limit, second available to acontainer. The barrier isthe amount of memory thathard container&rsquo;s applications are guaranteed to be able toallocate. The meaning of the limit. One block is currently equal to 1Kb. Suffixesunspecified;<b>G</b>, <b>M</b>, <b>K</b> can also it should be specified (seeset to <b>Resource limitsunlimited</b> section for more info onsuffixes).</p>
<p style="margin-left:11%;"><b>--diskinodeskmemsize</b><i>numbytes</i>[:<i>numbytes</i>]</p>
<p style="margin-left:22%;">sets soft and hard disk quotaMaximum amount of kernel memoryused. This parameter is related to <b>--numproc</b>. Eachprocess consumes certain amount of kernel memory - 16 KB atlimitsleast, in i30-nodes50 KB typically. Very large processes may consumea bit more. First It is important to have a certain safety gapbetween the barrier and the limit of this parameter is soft : equalbarrier and limit, second ismay lead to the situation where the kernelwill need to kill container&rsquo;s applications to keep thehard <b>kmemsize</b> usage under the limit.</p>
<p style="margin-left:11%;"><b>--quotatimetcpsndbuf</b><i>secondsbytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">sets quota grace periodMaximum size of TCP sendbuffers.Barrier should be not less than 64 KB, andContainer is permitted difference between barrier and limit should be equal to exceed its soft limits for theorgrace period, but once it has expired, the soft limit ismore than value of <b>numtcpsock</b> multiplied by 2.5enforced as a hard limitKB.</p>
<p style="margin-left:11%;"><b>--quotaugidlimittcprcvbuf</b><i>numbytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:22%;">sets maximum number Maximum size ofTCP receiveuser/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--othersockbuf</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 other (non-TCP)socket send buffers. If container&rsquo;s processes needs tosend very large datagrams, the barrier should be setaccordingly. Increased limit is necessary for highperformance of communications through local (UNIX-domain)sockets.</p>
<p style="margin-left:11%;"><b>--noatime yesdgramrcvbuf</b> | <bi>bytes</i>[:<i>nobytes</bi>]</p>
<p style="margin-left:22%;">Sets noatime flag Maximum size of other (do non-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 notneeded.</p> <p style="margin-left:11%;"><b>--oomguarpages</b>update inode access times) on filesystem.<i>pages</i>[:<i>pages</i>]</p>
<p style==== Capability option ===="margin-left:22%;">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>oomguarpages</b> usage isbelow the barrier, processes of this container areguaranteed not to be killed in out-of-memory situations. Themeaning of limit is currently unspecified; it should be setto <b>unlimited</b>.</p>
<p style="margin-left:11%;"><b>--capabilitylockedpages</b> <i>capnamepages</i>[:<bi>onpages</b>|<b>off</bi>]</p>
<p style="margin-left:22%;">Sets a capability for acontainer. Note that setting capability when the containeris running does not take immediate effect; restart thecontainer in order for the changes to take effect. Note acontainer has default set Maximum number of capabilities, thus anyoperation on capabilities is &quot;logical and&quot; withpagesthe default capability maskacquired by <b>mlock</b>(2).</p>
<p style="margin-left:2211%; margin-top: 1em">You can use thefollowing values for <i>capname</i>: <b>chown--privvmpages</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">Allows controlling the amountof memory allocated by the applications. For shared (mappedas <b>WARNINGMAP_SHARED</b>:) pages, each container really using asetting some memory page is charged for the fraction of those capabilities may have far reachingthe pagesecurity implications, so do not do (depending on the number of others using it unless you know what). For&quot;potentially private&quot; pages (mapped asyou are doing. Also note that setting <b>setpcap:onMAP_PRIVATE</b> ), container is charged either for afraction of the size or forthe full size if the allocatedaddress space. In the latter case, the physical pagesa container will most probably lead to inability to startassociated with the allocated address space may be initmemory, in swap or not physically allocated yet.</p>
<p style==== Device access 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>--devnodesshmpages</b> <i>devicepages</i>[:<bi>[r][w][q]|nonepages</bi>]</p>
<p style="margin-left:22%;">Give Maximum IPC SHM segment size.Setting the container an access(<b>r</b> - read, <b>w</b> - write, <b>q</b> - disk quotamanagement, <b>none</b> - no access) barrier and the limit to a device designatedby the special file /dev/<i>device</i>. Device file iscreated in a container by <b>vzctl</b>. Example: <b>vzctldifferent values doesset 777 --devnodes sdb:rwq</b>not make practical sense.</p>
<p style="margin-left:11%;"><b>--devicesb|cnumfile</b>:<i>majoritems</i>[:<i>minoritems</i>|<b>all</b>:<b>[r][w][q]|none</b></p>
<p style="margin-left:22%;">Give Maximum number of open files.In most cases the container an access barrier and the limit should be set tothea same value. Setting the barrier to <b>b0</b>lock or <b>c</b>haracter device designated by itseffectivelydisables pre-charging optimization for this beancounter in<i>major</i> and <i>minor</i> numbers. Device file have the kernel, which leads tothe held value being precise butbe created manuallycould slightly degrade file open performance.</p>
<p style==== PCI device management ===="margin-left:11%;"><b>--numflock</b><i>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%;"><b>--pci_add</b> [<i>domain</i><b>:</b>]<i>bus</i><b>:</b><i>slot</i><b>Maximum number of file locks.Safety gap should be between barrier and limit.</b><i>func</i></p>
<p style="margin-left:2211%;">Give the container an access toa specified PCI device. All numbers are hexadecimal (asprinted by <b>lspci--numpty</b>(8) in the first column).<i>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%;"><b>Number of pseudo--pci_del</b>terminals(PTY). Note that in OpenVZ each container can have not morethan 255 PTYs. Setting the barrier and the limit to[<i>domain</i><b>:</b>]<i>bus</i><b>:</b><i>slot</i><b>different values does not make practical sense.</b><i>func</i></p>
<p style="margin-left:2211%;">Delete a PCI device from the<b>--numsiginfo</b>container.<i>items</i>[:<i>items</i>]</p>
<p style="margin-left:22%; margin-top: 1em">Note thatNumber of siginfo structures.<b>vps-pci</b> configuration script is executed bySetting the barrier and the limit to different values does<b>vzctl</b> then configuring PCI devices. The script isusually located at <b>/usr/lib[64]/vzctl/scripts/</b>not make practical sense.</p>
<p style==== Features management ===="margin-left:11%;"><b>--dcachesize</b><i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:1122%;"><b>Maximum size offilesystem--features</b> <i>name</i><b>:on</b>|<b>off</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 gapshould be between barrier and limit.</p>
<p style="margin-left:2211%;">Enable or disable a specificcontainer feature. Known features are: <b>sysfs--numiptent</b>,<bi>nfsnum</bi>, <b>sit</b>, [:<bi>ipipnum</b>, <b>ppp</b>,<b>ipgre</b>, <b>bridge</b>, <b>nfsd</bi>.]</p>
<p style==== Apply config ===="margin-left:22%;">Number of iptables (netfilter)entries. Setting the barrier and the limit to differentvalues does not make practical sense.</p>
<p style="margin-left:11%;"><b>--applyconfigphyspages</b> <i>namepages</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">Read container parameters fromthe container sample configuration file<tt>/etc/vz/conf/veOn VSwap-</tt><i>name</i><tt>.conf-sample</tt>enabled kernels,thisand apply them, if <b>--save</b> option specified save limits the amount of physical memory (RAM) available toathe container config file. The following parameters are notchanged: barrier should be set to <b>HOSTNAME</b>, <b>IP_ADDRESS0</b>,and the<b>OSTEMPLATE</b>, <b>VE_ROOT</b>, andlimit to a total size of RAM that can be used used by a<b>VE_PRIVATE</b>container.</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>--applyconfig_map0</b>, and limit should be set to <ib>groupunlimited</ib>.</p>
<p style="margin-left:2211%;">Apply container configparameters selected by <ib>group--swappages</ib>. Now the only possiblevalue for <i>grouppages</i> is <b>name</b>[: to restore containername based on <bi>NAMEpages</bi> variable in containerconfiguration file.]</p>==== I/O priority management ====
<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>--ioprio0</b> <i>priority</i>, and the limit to a total size of swap thatcan be used by a container.</p>
<p style="margin-left:22%;margin-top: 1em">Assigns I/O priority For older(pre-VSwap) kernels, the limit is used toshow a totalamount of swap space available inside the container. <i>Priority</i> range is <b>0-7</b>. The greater<i>priority</i> barrier of this parameter is, the more time for I/O activity containerhasignored. By The default each container has <i>priority</i> ofvalue is<b>4unlimited</b>, meaning total swap will be reported as0.</p>
=== Checkpointing and restore = CPU fair scheduler parameters ====
<p style="margin-left:11%; margin-top: 1em">Checkpointing is a feature ofOpenVZ kernel which allows to save a complete state of aTheserunning parameters control CPU usage by container, and to restore it later.<b><br>--cpuunits</b> <i>num</i></p>
<p style="margin-left:1122%;">CPU weight for a container.Argument is positive non-zero number, passed to and used inthe kernel fair scheduler. The larger the number is, themore CPU time this container gets. Maximum value is 500000,minimal is 8. Number is relative to weights of all the otherrunning containers. If <b>chkpntcpuunits</b> <i>CTID</i>are not specified,[<b>--dumpfile</b> <i>name</i>]default value of 1000 is used.</p>
<p style="margin-left:1722%;margin-top: 1em">This command saves a completestate of a running container to a dump file, and stops theYou can set CPUcontainer. If an option weight for CT0 (host system itself) as well (use <b>vzctlset 0 --dumpfilecpuunits</b> is not set<i>num</i>). Usually,OpenVZ initscriptdefault dump file name (<b>/vzetc/dumpinit.d/Dump.vz</b><i>CTID</i> isused) takes care of setting this.</p>
<p style="margin-left:11%;"><b>restore--cpulimit</b> <i>CTIDnum</i>[<b>--dumpfile%</b> <i>name</i>]</p>
<p style="margin-left:1722%;">This command restores aLimit of CPU usage for thecontainer from the dump file created by , in per cent. Note if the computer has 2 CPUs, ithas total of 200% CPU time. Default CPU limit is <b>chkpnt0</b>command(no CPU limit).</p>
<p style=== Performing container actions ==="margin-left:11%;"><b>--cpus</b> <i>num</i></p>
<p style="margin-left:1122%;"><b>create</b> <i>CTID</i>[<b>--ostemplate</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>]sets number of CPUs available[<b>--hostname</b> <i>name</i>]in the container.</p>
<p style="margin-left:1711%;">Creates a new container area.<b>--cpumask</b> <i>cpus</i> |This operation should be done once, before the first startof the container.<b>auto</b> | <b>all</b></p>
<p style="margin-left:1722%; margin-top: 1em">If 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 thecontainer to execute on CPUs 0, 1, 2, 7, youshould pass <b>0--config2,7</b> option . Default value is specified, values from exampleconfiguration file<b>/etc/vz/conf/ve-all</b>(thecontainer can execute on any CPU). If used with the<ib>name--nodemask</ib>option, value of <b>.conf-sampleauto</b> areassigns allput into CPUs from the specified NUMA node to a container configuration file. If this containerconfiguration file already exists, it will be removed.</p>
<p style="margin-left:1711%; margin-top: 1em">You can use<b>--rootnodemask</b> <i>pathnodes</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>$VEIDall</b>, which willbe substituted with the numeric CT ID.</p>
<p style="margin-left:1722%; margin-top: 1em">You can useSets list of allowed NUMA nodes<b>--private</b> <i>path</i> option to set for the path todirectory in which all container. Input format is the files and directories specific tosame as forthis very container are stored (default is <b>VE_PRIVATE--cpumask</b>specified in [[Man/vz.conf.5|Note that <b>vz.conf--nodemask</b>(5)]] file). Argument can containmust be usedliteral string with the <b>$VEID--cpumask</b>, which will be substituted withthe numeric CT IDoption.</p>
<p style="margin-left:17%; margin-top: 1em">You can use<b>--ipadd</b> <i>addr</i> option to assign an IP address toa container. Note that this option can be used multipletimes.</p>=== Memory output parameters ====
<p style="margin-left:1711%; margin-top: 1em">You can useForVSwap-enabled kernels (042stab042 or greater), thisparameter is ignored. For older kernels, it controls theoutput of /proc/meminfo inside a container. <b><br>--hostnamememinfo none</b> <i>name</i> option to set a host name fora container.</p>
<p style="margin-left:1122%;"><b>destroy<No /proc/b> |meminfo virtualization<b>delete</b>(the same as on host system).</p>
<p style="margin-left:1711%;">Removes a container private<b>--meminfo</b>area by deleting all files, directories and theconfiguration file of this container.<i>mode</i>:<i>value</i></p>
<p style="margin-left:1122%;"><b>start</b> [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>--waitswappages</b>][<b>--force</b>]parameter.</p>
<p style="margin-left:1722%;margin-top: 1em">Mounts (if necessary) andYou can use thestarts a container. Unless following modes for <i>mode</i>: <br>&bull; <b>--waitpages</b> option is:<i>value</i> - sets total memory inpages; <br>specified, &bull; <b>vzctlprivvmpages</b> will return immediately; otherwise:<i>value</i> - sets total memoryan attempt to wait till the default runlevel is reached willbe made by as <b>vzctlprivvmpages</b> * <i>value</i>.</p>
<p style="margin-left:1722%; margin-top: 1em">Specify<b>--force</b> if you want to start a container which Default isdisabled (see <b>--disabledprivvmpages:1</b>).</p>
<p style="margin-left:17%; margin-top: 1em">Note that thiscommand can lead to execution of <b>premount</b>,<b>mount</b> and <b>start</b> action scripts === Netfilter (see <b>ACTIONSCRIPTS</b> belowiptables).</p>control parameters ====
<p style="margin-left:11%;"><b>stop--netfilter&nbsp;disabled</b>|<b>stateless</b> [|<b>--faststateful</b>|<b>full</b>]</p>
<p style="margin-left:1722%;">Stops and unmounts a container.Restrict access toNormally, <b>halt<netfilter/b>(8) is executed inside iptables modules for a container;. This optionoption replaces obsoleted <b>--fast</b> makes <b>vzctl</b> use <b>rebootiptables</b>(2)syscall instead which is faster but can lead to uncleancontainer shutdown.</p>
<p style="margin-left:1722%; margin-top: 1em">Note that changing thiscommand can lead to execution of <b>stop</b>parameter requires container restart, <b>umount</b>soand consider using <b>postumount</b> action scripts (see <b>ACTIONSCRIPTS--setmode</b> below)option.</p>
<p style="margin-left:1122%;margin-top: 1em">The followingarguments can be used: <b>restart<br>&bull; disabled</b></p>
<p style="margin-left:1732%;">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.no modules are allowed</p>
<p style="margin-left:1722%; margin-top: 1em">Note that thiscommand can lead to execution of some action scripts (see<b>ACTION SCRIPTS&bull; stateless</b> below).</p>
<p style="margin-left:1132%;"><b>status</b>all modules except NAT andconntracks are allowed (i.e. filter and mangle); this is thedefault</p>
<p style="margin-left:1722%;">Shows a container status. Thisis a line with five or six words, separated by spaces.<b>&bull; stateful</b></p>
<p style="margin-left:1732%; margin-top: 1em">First word isall modules except NAT areliterally <b>CTID</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">Second word isthe numeric <itd width="22%">CT ID</itd>.</ptd width="9%">
<p style="margin-left:17%; margin-top: 1em">Third word isshowing whether this container exists or not, it can beeither <b>exist&bull; full</b> or <b/p>deleted</btd><td width="1%">.</ptd><td width="36%">
<p style>all modules are allowed</p></td><td width="margin-left:1732%; margin-top: 1em">Fourth word isshowing the status of the container filesystem, it can beeither <b>mounted</b> or <btd>unmounted</btr>.</ptable>
<p style="margin-left:1711%; margin-top: 1em">Fifth wordshows if the container is running, it can be either<b>running--iptables</b> or <i>name</i>[<b>down,</b>...]</p>
<p style="margin-left:1722%; margin-top: 1em">Sixth word, ifexists, is <b>suspendedNote</b>. It appears if both a containerthis option isand its dump file exist (see obsoleted, <b>chkpnt--netfilter</b>)should be used instead.</p>
<p style="margin-left:1722%; margin-top: 1em">This commandAllow to usethe functionality of <i>name</i> iptables module inside thecontainer. Multiple comma-separated <i>name</i>s can also be usable from scriptsspecified.</p>
<p style="margin-left:1122%;margin-top: 1em">The defaultlist of enabled iptables modules is defined by the<b>mountIPTABLES</b>variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]].</p>
<p style="margin-left:1722%;margin-top: 1em">Mounts container private area.You 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>,Note that this command can lead to execution of<b>ip_conntrack</b>, <b>ip_conntrack_ftp</b>,<b>premountip_conntrack_irc</b> and , <b>mountipt_conntrack</b> action scripts (see,<b>ACTION SCRIPTSipt_state</b> below)., <b>ipt_helper</b>, <b>iptable_nat</pb>,<b>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>ipt_REDIRECT</b>,<p style="margin-left:11%;"b>xt_mac</b>, <b>ipt_recent</b>, <b>umountipt_owner</b>.</p>
<p style="margin-left:17%;">Unmounts container privatearea. Note that this command can lead to execution of<b>umount</b> and <b>postumount</b> action scripts (see<b>ACTION SCRIPTS</b> below).</p>=== Network devices control parameters ====
<p style="margin-left:1711%; margin-top: 1em">Note that<b>stop--netdev_add</b> does <bi>umountname</bi> automatically.</p>
<p style="margin-left:1122%;"><b>quotaon</b> <i>ctid</i>move network device from thehost system to a specified container</p>
<p style="margin-left:1711%;">Turn disk quota on. Not that<b>mount--netdev_del</b> and <bi>startname</bi> does that automatically.</p>
<p style="margin-left:1122%;"><b>quotaoff</b> <i>ctid</i>delete network device from aspecified container</p>
<p style="margin-left:17%;">Turn disk === Disk quota off. Not that<b>umount</b> and <b>stop</b> does that automatically.</p>parameters ====
<p style="margin-left:11%;"><b>quotainit--diskquota yes</b>|<ib>ctidno</ib></p>
<p style="margin-left:1722%;">Initialize allows to enable or disabledisk quota (i.efor a container. runBy default, a global value(<b>vzquota initDISK_QUOTA</b>) with the parameters taken from the CTconfiguration file [[Man/ctidvz.conf.5|<b>ctidvz.conf</b>(5)]]is used.</p> <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>--diskspace</b><i>num</i>[:<i>num</i>]</p>
<p style="margin-left:1122%;">For <b>execsimfs</b> <i>CTIDlayout, setssoft and hard disk quota limits. First parameter is softcommand</i>limit, second is hard limit.</p>
<p style="margin-left:1722%;margin-top: 1em">Executes For<ib>commandploop</ib> in alayout, initiates the procedure of resizing thecontainer. Environment variables are not set inside ploop image file to thecontainer. Signal handlers may differ from default settingsnew size.Since there is noIf soft/hard limit concept in ploop, second <i>commandnum</i> is <b>-</b>, commands are read fromifstdinspecified, is ignored.</p>
<p style="margin-left:1122%;margin-top: 1em">By default,ploop resize is done online, i.e. on a mounted ploop. Thisis a preferred way of doing resize. Although, in a rare casea container was using lots of disk space and should now beresized to a much smaller size, an offline resize might bemore appropriate. In this case, make sure the container isstopped and unmounted and use additional<b>exec2--offline-resize</b> <i>CTIDcommand</i>option</p>
<p style="margin-left:1722%;margin-top: 1em">The same as Note that ploopresize is NOT performed on container start, so forconsistency <b>exec--diskspace</b>, butmust be used together withreturn code is that of <ib>command--save</ib>flag.</p>
<p style="margin-left:1122%;margin-top: 1em">Suffixes<b>runscriptG</b> , <b>M</b>, <b>K<i/b>CTIDcan also be specified (seescript<b>Resource limits</ib>section for more info on suffixes).If suffix is not specified, value is in kilobytes.</p>
<p style="margin-left:1711%;">Run specified shell script in<b>--diskinodes</b>the container. Argument <i>scriptnum</i> is a file on the hostsystem which contents is read by vzctl and executed in thecontext of the container. For a running container, thecommand jumps into the container and executes the script.For a stopped container, it enters the container, mountscontainer&rsquo;s root filesystem, executes the script, andunmounts CT root. In the latter case, the container is notreally started, no file systems other than root (such as[:<bi>/procnum</bi>) are mounted, no startup scripts are executedetc. Thus the environment in which the script is running isfar from normal and is only usable for very basicoperations.]</p>
<p style="margin-left:1122%;"><b>enter</b> [<b>--exec</b>sets soft and hard disk quota<limits, in i>command</i> [<i>arg</i> .-nodes.First parameter is soft limit, second ishard limit.]]</p>
<p style="margin-left:1722%;margin-top: 1em">Enters into a container (givingNote that thisa container&rsquo;s root shell). This option parameter is a back-doorignored for host root only. The proper way to have CT root shell isto use <b>sshploop</b>(1)layout.</p>
<p style="margin-left:1711%; margin-top: 1em">Option<b>--execquotatime</b> is used to run <i>commandseconds</i> with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so <b>vzctl exec</b> can not beused) and for some reason you can not use <b>ssh</b>(1).</p>
<p style="margin-left:1722%; margin-top: 1em">You need sets quota grace period.Container is permitted to logexceed its soft limits for theout manually from grace period, but once it has expired, the shell to finish session (even if yousoft limit isspecified <b>--exec</b>)enforced as a 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>--helpquotaugidlimit</b><i>num</i></p>
<p style="margin-left:1722%;">Prints help message with aEnables or disablesbrief list of possible optionsin-container per-user and per-group disk quotas. If thevalue is set to <b>0</b> or not set, disk quotas inside thecontainer is disabled and not accounted.</p>
<p style="margin-left:1122%;margin-top: 1em">For<b>--versionsimfs</b>layout containers, non-zero value sets maximumnumber of user/group IDs for which disk quota isaccounted.</p>
<p style="margin-left:1722%;margin-top: 1em">Prints For<b>vzctlploop</b>layout containers, any non-zero value enablesdisk quota inside the container; the number of user/groupversionIDs used by disk quota is not limited by OpenVZ.</p>
<p style== ACTION SCRIPTS =="margin-left:22%; margin-top: 1em">Note thatenabling or disabling in-container disk quotas requirescontainer restart, so consider using <b>--setmode</b>option.</p>
<p style="margin-left:11%; margin-top: 1em"><b>vzctl</b>has an ability to execute user-defined scripts when aspecific <b>vzctl</b> command is run for a container. Thefollowing <b>vzctl</b> commands can trigger execution ofaction scripts: <b>start</b>, <b>stop</b>, <b>restart</b>,<b>mount</b> and <b>umount</b>.</p>=== Capability option ====
<p style="margin-left:11%; margin-top: 1em">Action scriptsare located in the <b>--capability</etc/vz/confb><i>capname</i>:<b>on</b> directory. There areglobal and per-CT scripts. Global scripts have a literalprefix of |<b>vps.off</b> and are executed for all containers.Per-CT scripts have a [<ib>CTID,</ib> numeric prefix and areexecuted for the given container only...]</p>
<p style="margin-left:1122%; margin-top: 1em">There are 8Sets a capability for aaction scripts currently defined: <b><br>container. Multiple comma-separated capabilities can bevpsspecified.premount</b>, <i>CTID</i><b>.premount</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 before it is mounted.running does notScripts are executed take immediate effect; restart the container in order forthe host OS context, while a CT isnot yet mounted or running. Global script, if exists, ischanges to take effect (consider using <b>--setmode</b>executed firstoption).</p>
<p style="margin-left:1122%;margin-top: 1em"><b>vps.mount</b>A container hasthe default set of capabilities,thus any operation on<i>CTID</i><b>capabilities is &quot;logical AND&quot; with the defaultcapability mask.mount</b></p>
<p style="margin-left:22%;margin-top: 1em">Global and per-CT mount scriptsYou can use thewhich are executed following values for a container right after it is<i>capname</i>: <b>chown</b>,<b>dac_override</b>, <b>dac_read_search</b>, <b>fowner</b>,<b>fsetid</b>, <b>kill</b>, <b>setgid</b>, <b>setuid</b>,<b>setpcap</b>, <b>linux_immutable</b>,<b>net_bind_service</b>, <b>net_broadcast</b>,<b>net_admin</b>, <b>net_raw</b>, <b>ipc_lock</b>,<b>ipc_owner</b>, <b>sys_module</b>, <b>sys_rawio</b>,<b>sys_chroot</b>, <b>sys_ptrace</b>, <b>sys_pacct</b>,mounted<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>. Otherwise they are the same as For detailed description, see <b>.premountcapabilities</b>scripts(7).</p>
<p style="margin-left:1122%;margin-top: 1em"><i>CTID</i><b>.startWARNING</b></p>:setting some of those capabilities may have far reachingsecurity implications, so do not do it unless you know what<p style="margin-left:22%;">Right after you are doing. Also note that setting <b>vzctlsetpcap:on</b> hasforstarted a container, will most probably lead to inability to startit executes this script in a containercontext.</p>
<p style="margin-left:11%;"><i>CTID</i><b>.stop</b></p>=== Device access management ====
<p style="margin-left:2211%;">Right before <b>vzctl--devnodes</b> hasstopped a container, it executes this script in a containercontext.<i>device</i>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:1122%;">Give the container an access(<b>r</b> - read, <b>w</b> - write, <b>vps.umountq</b>- disk quotamanagement,<b>none</b> - no access) to a device designatedby the special file /dev/<i>CTIDdevice</i>. Device file iscreated in a container by <b>.umountvzctl</b>. Example:</p>
<p pre style="margin-left:22%;">Global and per vzctl set 777 -CT umountscripts which are executed for a container before it isunmounted. Scripts are executed in the host OS context,while a CT is mounted. Global script, if exists, is executedfirst.-devnodes sdb:rwq</ppre>
<p style="margin-left:11%;"><b>vps.postumount--devicesb</b>|<b>c</b>,:<i>major</i>:<i>CTIDminor</i>|<b>all</b>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>.postumountnone</b></p>
<p style="margin-left:22%;">Global and per-CT umountGive the container an access toscripts which are executed for a container right after it isunmounted. Otherwise they are the same as <b>.umountb</b>lock or <b>c</b>haracter device designated by its<i>major</i> and <i>minor</i> numbers. Device file have toscriptsbe created manually.</p>
<p style="margin-left:22%; margin-top: 1em">The environmentpassed to all the <b>*mount</b> scripts is the standardenvironment of the parent (i.e. <b>vzctl</b>) with twoadditional variables: <b>$VEID</b> and <b>$VE_CONFFILE</b>.The first one holds the ID of the container, and the secondone holds the full path to the container configuration file.If the script needs to get other CT configurationparameters, such as <b>$VE_ROOT</b>, it needs to get thosefrom global and per-CT configuration files.</p>=== PCI device management ====
<p style="margin-left:2211%; 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--pci_add</b> or[<bi>domain</etc/vz/conf/i>:]<i>bus</bi>:<i>CTIDslot</i>.<bi>.mountfunc</bi>.</p>
<p style="margin-left:22%; margin-top: 1em"># If one ofGive the container an access tothese files does not exist then something a specified PCI device. All numbers are hexadecimal (asprinted by <brb># is really broken lspci<br>[ -f /etc/sysconfig/vz ] || exit 1 <brb>[ -f $VE_CONFFILE ] || exit 1 <br># Source both files. Note (8) in the order is importantfirst column). <br>. /etc/vz/vz.conf <br>. $VE_CONFFILE <br>mount -n --bind /mnt/disk $VE_ROOT/mnt/disk</p>
<p style== EXIT STATUS =="margin-left:11%;"><b>--pci_del</b>[<i>domain</i>:]<i>bus</i>:<i>slot</i>.<i>func</i></p>
<p style="margin-left:1122%; margin-top: 1em">Returns 0 uponDelete a PCI device from thesuccess, or an appropriate error code in case of anerror:container.</p>
<table widthp style="100margin-left:22%; margin-top: 1em" border="0" rules="none" frame="void">Note that cellspacing="0" cellpadding="0"<b>vps-pci</b>configuration script is executed by<tr valign="top" align="left"b>vzctl</b>then configuring PCI devices. The script isusually located at <td width="11%"b>/usr/libexec/vzctl/scripts/</b>.</tdp><td width==== Features management ===="4%">
<pstyle="margin-left:11%;"><b>--features</b><i>name</i>:<b>1on</pb>|<b>off</tdb>[<td width="7%"b>,</tdb>...]<td width="78%"/p>
<pstyle="margin-left:22%;">Failed to set Enable or disable a UBC parameterspecificcontainer feature. Known features are: <b>sysfs</pb>,<b>nfs</b>, <b>sit</b>, <b>ipip</tdb>, <b>ppp</trb>,<tr valign="top" align="left"b>ipgre</b>, <b>bridge</b>, <td width="11%"b>nfsd</tdb>. A few features canbe specified at once, comma-separated.<td width="4%"/p>
<p>2</p></td><td width="7%"></td><td width="78%">== Apply config ====
<pstyle="margin-left:11%;">Failed to set a fair scheduler parameter</pb>--applyconfig</td></trb><tr valign="top" align="left"i>name<td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:22%;">Read container parameters fromthe container sample configuration file<tt>/etc/vz/conf/ve-</tt><i>name</i><tt>.conf-sample</tt>,and apply them, if <b>--save</b> option specified save tothe container config file. The following parameters are notchanged: <b>HOSTNAME</b>, <b>3IP_ADDRESS</pb>,<b>OSTEMPLATE</b>, <b>VE_ROOT</b>, and<b>VE_PRIVATE</b>.</tdp> <td widthp style="7margin-left:11%;"><b>--applyconfig_map</b><i>group</tdi></p> <td widthp style="78margin-left:22%;">Apply container configparameters selected by <i>group</i>. Now the only possiblevalue for <i>group</i> is <b>name</b>: to restore containername based on <b>NAME</b> variable in containerconfiguration file.</p>
<p>Generic system error<==== I/p></td></tr><tr valignO scheduling ="top" align="left"><td width="11%"></td><td width="4%">
<pstyle="margin-left:11%;">5</pb>--ioprio</tdb><td width="7%"i>priority</tdi><td width="78%"/p>
<pstyle="margin-left:22%;">Assigns disk I/O priority tocontainer. <i>Priority</i> range is <b>0-7</b>. The running kernel greater<i>priority</i> is not an OpenVZ kernel (or some, the more time for I/O activity containerOpenVZ modules are not loaded)has. By default each container has <i>priority</pi> of<b>4</tdb>.</trp> <tr valign="top" alignp style="margin-left:11%;"><b>--iolimit</b><td width="11%"i>limit</i>[<b>B</b>|<b>K</b>|<b>M</b>|<b>G</tdb>]<td width="4%"/p>
<pstyle="margin-left:22%;">6Assigns 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>Not enough system resourceslimit</pi> is assumed to be in megabytes persecond. Available suffixes are: <br>&bull; <b>b</tdb>, <b>B</trb> -- bytes per second; <br>&bull; <b>k</b>, <b>K</b> -- kilobytes per second; <tr valign="top" align="left"br>&bull; <td width="11%"b>m</b>, <b>M</tdb> -- megabytes per second (default);<br>&bull; <td width="4%"b>g</b>, <b>G</b> -- gigabytes per second;</p>
<pstyle="margin-left:11%;">7</pb>--iopslimit</tdb><td width="7%"i>iops</tdi><td width="78%"/p>
<pstyle="margin-left:22%;">Assigns IOPS limit for acontainer, in number of input/output operations per second.Value is a number or a literal string <b>ENV_CREATEunlimited</b> ioctl failed.Value of </pb>0</td></tr><tr valign="top" align="left"b>means &quot;unlimited&quot;. By default a<td width="11%">container has no IOPS limit.</td><td width="4%"p>
<p>8</p></td><td width="7%"></td><td width="78%">= Suspending and resuming ===
<p style="margin-top: 1em">Checkpointing is a feature ofOpenVZ kernel which allows to save a complete in-kernelstate of a running container, and to restore it later.</p>Command executed by  <p style="margin-left:11%;"><b>vzctl execsuspend</b> returned non|<b>chkpnt</b><i>CTID</i> [<b>-zeroexit code-dumpfile</pb> <i>name</tdi>]</trp> <tr valign="top" alignp style="margin-left:17%;">This command suspends acontainer to a dump file If an option <td width="11%"b>--dumpfile</tdb>isnot set, default dump file name<td width="4%"b>/vz/dump/Dump.</b><i>CTID</i> is used.</p>
<pstyle="margin-left:11%;"><b>9resume</pb>|<b>restore</tdb><td width="7%"i>CTID</i> [<b>--dumpfile</b> <i>name</tdi>]<td width="78%"/p>
<pstyle="margin-left:17%;">Container is locked This command restores acontainer from the dump file created by another the <b>vzctlsuspend</b>invocationcommand.</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%">= Snapshotting ===
<pstyle="margin-top: 1em">Global OpenVZ configuration Snapshotting is a feature basedon checkpointing and ploop shapshots. It allows to save acomplete state of container file [[Man/vzsystem.conf.5|<b>vz.conf</b>Plus, if thecontainer is running, it&rsquo;s in-memory state (5as incheckpointing)]] not. Note that snapshot functionality is onlyfoundworking for containers on ploop device.</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%">
<pstyle="margin-left:11%;"><b>snapshot</b> <i>CTID</i>[<b>--id</b> <i>11uuid</i>] [<b>--name</pb> <i>name</tdi>][<b>--description</b> <td width="7%"i>desc</tdi>] <br>[<td width="78%"b>--skip-suspend</b>] [<b>--skip-config</b>]</p>
<pstyle="margin-left:17%;">A vzctl helper script Creates a container snapshot,i.e. saves the current container state, including its filesystem state, running processes state, and configurationfile not found.</p></td></tr> <tr valignp style="margin-left:17%; margin-top" align="left: 1em">If a containeris running, and <td width="11%"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="4%"/p>
<p>12</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Unless<b>--skip-config</tdb>option is given, containerconfiguration file is saved to the snapshot.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">If <i>Permission denieduuid</pi>is not specified, it is auto-generated. Options<b>--name</tdb>and <b>--description</trb>can be used to<tr valign="top" align="left">specify the snapshot name and description, respectively.Name is displayed by <td width="11%"b>snapshot-list</tdb>.<td width="4%"/p>
<pstyle="margin-left:11%;">13<b>snapshot-switch</pb><i>CTID</i> [<b>--skip-resume</b> | <b>--must-resume</tdb>][<td width="7%"b>--skip-config</tdb>] <b><br>--id<td width="78%"/b> <i>uuid</i></p>
<p>Capability setting failed</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Switches the container to asnapshot identified by <td width="11%"i>uuid</tdi>, restoring its filesystem state, configuration (if available) and its runningstate (if available).<td width="4%"/p>
<p>14</p></td><td widthstyle="7margin-left:17%; margin-top: 1em"><b>Note thatthe current state of a container (including its file systemstate and its configuration file) is lost!</tdb><td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container configuration file [[Man/ctid.conf.5|Option<b>ctid.conf--skip-resume</b>is used to ignore a CT memory dump filein a snapshot, as a result the container will end up beingin a stopped state (5)]] notsame as if a snapshot has been takenfoundwith </pb> --skip-suspend</tdb>).</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<p>15</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>Timeout on <b>vzctl exec</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>16<i>CTID</pi> <b>--id</tdb><td width="7%"i>uuid</tdi><td width="78%"/p>
<p>Error during <b>vzctl chkpnt</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>17<i>uuid</pi> <b>--target</tdb><td width="7%"i>directory</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Error during <b>vzctl restoreMounts a snapshot specified by</bi>uuid</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>18<i>CTID</pi> <b>--id</tdb><td width="7%"i>uuid</tdi><td width="78%"/p>
<p>Error from <b>setluid()</b> syscall</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Unmounts a specified<td width="11%">snapshot.</td><td width="4%"p>
<pstyle="margin-left:11%;"><b>snapshot-list</b>20<i>CTID</pi> [<b>-H</b>] [<b>-o</tdb><td width="7%"i>field</i>[,<i>field</i>...] [<b>--id</b> <i>uuid</tdi>]<td width="78%"/p>
<p>Invalid command line parameter</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">List container&rsquo;s<td width="11%">snapshots.</td><td width="4%"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">Container already runningYou can use<b>--ipadd</pb> <i>addr</tdi>option to assign an IP address toa container. Note that this option can be used multipletimes.</trp> <tr valignp style="margin-left:17%; margin-top" align="left: 1em">You can use<td width="11%"b>--hostname</b> <i>name</tdi>option to set a host name fora container.<td width="4%"/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>33--local_gid</pb> can be used to select which <i>uid</i>and <i>gid</i> respectively will be used as a base user inthe host system. Note that user namespaces provide a 1:1mapping between container users and host users. If theseoptions are not specified, the values <b>LOCAL_UID</b> and<b>LOCAL_GID</tdb>from global configuration file[[Man/vz.conf.5|<td width="7%"b>vz.conf</b>(5)]] are used. An explicit <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="78%"/b> is ignored.</p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to stop container</pb>Warning:</tdb>use </trb>--local_uid<tr valign="top" align="left"/b>and <td width="11%"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="4%"/p>
<pstyle="margin-left:11%;"><b>34destroy</pb> | <b>delete</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p>Unable to add IP address to container</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Removes a container private<td width="11%">area by deleting all files, directories and theconfiguration file of this container.</td><td width="4%"p>
<pstyle="margin-left:11%;">40<b>start</pb> <i>CTID</tdi>[<b>--wait</b>] [<b>--force</b>] [<td width="7%"b>--skip-fsck</tdb>][<b>--skip-remount<td width="78%"/b>]</p>
<pstyle="margin-left:17%;">Mounts (if necessary) andstarts a container. Unless <b>Container not mounted--wait</pb>option isspecified, </tdb>vzctl</trb>will return immediately; otherwise<tr valign="top" align="left">an attempt to wait till the default runlevel is reached willbe made by <td width="11%"b>vzctl</tdb>.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">41Specify</pb>--force</tdb>if you want to start a container which isdisabled (see <td width="7%"b>--disabled</tdb>).<td width="78%"/p>
<p>Container already mounted</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">Specify<td width="11%"b>--skip-fsck</tdb>to skip fsck for ploop-based containerfilesystem (this option is used by vz initscript).<td width="4%"/p>
<p>43</p></td><td widthstyle="7margin-left:17%; margin-top: 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 <b>--skip-remount</tdb>flag.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container private area not foundNote that thiscommand can lead to execution of <b>premount</pb>,<b>mount</tdb>and <b>start</trb>action scripts (see <tr valign="top" align="left"b>ACTIONSCRIPTS<td width="11%"/b>below).</td><td width="4%"p>
<pstyle="margin-left:11%;">44<b>stop</pb> <i>CTID</tdi>[<b>--fast<td width="7%"/b>] [<b>--skip-umount</tdb>]<td width="78%"/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 valign="top" align="left"><td width="11%"></td><td width="4%">
<p>48</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Note that thiscommand can lead to execution of some action scripts (see<b>ACTION SCRIPTS</tdb>below).<td width="78%"/p>
<pstyle="margin-left:11%;">Unable to create a new container private area</pb>status</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<p>49</p></td><td widthstyle="7margin-left:17%;">Shows a container status. Thisis a line with five or six words, separated by spaces.</td><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">First word isliterally <td width="11%"b>CTID</tdb>.<td width="4%"/p>
<p>50</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Second word isthe numeric <i>CT ID</tdi>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to mount Third word isshowing whether this containerexists or not, it can beeither </pb>exist</tdb>or </trb>deleted<tr valign="top" align="left"><td width="11%"/b>.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">51Fourth word isshowing the status of the container filesystem, it can beeither </pb>mounted</tdb>or <td width="7%"b>unmounted</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Unable to unmount Fifth wordshows if the containeris running, it can be either</pb>running</tdb>or </trb>down<tr valign="top" align="left"><td width="11%"/b>.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">52Sixth word, ifexists, is </pb>suspended</tdb>. It appears if a dump fileexists for a stopped container (see <td width="7%"b>suspend</tdb>).<td width="78%"/p>
<p>Unable to delete a container</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">This command<td width="11%">can also be usable from scripts.</td><td width="4%"p>
<pstyle="margin-left:11%;">53</pb>mount</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Container Mounts container private area not exist.Note that this command can lead to execution of</pb>premount</tdb>and </trb>mount<tr valign="top" align="left"/b>action scripts (see<td width="11%"b>ACTION SCRIPTS</tdb>below).<td width="4%"/p>
<pstyle="margin-left:11%;">60</pb>umount</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Unmounts container privatearea. Note that this command can lead to execution of<b>vzquota onumount</b> failedand </pb>postumount</td></trb>action scripts (see<tr valign="top" align="left"b>ACTION SCRIPTS<td width="11%"/b>below).</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">61Note that</pb>stop</tdb>does <td width="7%"b>umount</tdb>automatically.<td width="78%"/p>
<pstyle="margin-left:11%;"><b>vzquota initconvert</b> failed<i>CTID</pi>[<b>--layoutploop</b>[<b>:</tdb>{<b>expanded</trb>|<b>plain<tr valign="top" align="left"/b>|<td width="11%"b>raw</tdb>}]]<td width="4%"/p>
<p>62</p></td><td widthstyle="7margin-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 beset.</td><td width="78%"p>
<pstyle="margin-left:11%;"><b>vzquota setlimitcompact</b> failed</pi>CTID</tdi></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<p>63</p></td><td widthstyle="7margin-left:17%;">Compact container image. Thisonly makes sense for ploop layout.</td><td width="78%"p>
<pstyle="margin-left:11%;">Parameter <b>DISKSPACEquotaon</b> not set</pi>CTID</tdi></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:17%;">64Turn disk quota on. Not that</pb>mount</tdb>and <td width="7%"b>start</tdb>does that automatically.<td width="78%"/p>
<pstyle="margin-left:11%;">Parameter <b>DISKINODESquotaoff</b> not set</pi>CTID</tdi></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:17%;">66Turn disk quota off. Not that</pb>umount</tdb>and <td width="7%"b>stop</tdb>does that automatically.<td width="78%"/p>
<pstyle="margin-left:11%;"><b>vzquota offquotainit</b> failed</pi>CTID</tdi></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:17%;">67Initialize disk quota (i.e. run</pb>vzquota init</tdb>) with the parameters taken from the CTconfiguration file [[Man/ctid.conf.5|<td width="7%"b>ctid.conf</tdb>(5)]].<td width="78%"/p>
<pstyle="margin-left:11%;">ugid quota not initialized</pb>exec</tdb></tri>CTIDcommand<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">Executes <i>71command</pi> in acontainer. Environment variables are not set inside thecontainer. Signal handlers may differ from default settings.If <i>command</tdi>is <td width="7%"b>-</tdb>, commands are read fromstdin.<td width="78%"/p>
<pstyle="margin-left:11%;">Incorrect IP address format</pb>exec2</tdb></tri>CTIDcommand<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">74The same as </pb>exec</tdb>, butreturn code is that of <td width="7%"i>command</tdi>.<td width="78%"/p>
<pstyle="margin-left:11%;">Error changing password</pb>runscript</tdb></tri>CTIDscript<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">78Run specified shell script inthe container. Argument </pi>script</tdi>is a file on the hostsystem which contents is read by vzctl and executed in thecontext of the container. For a running container, thecommand jumps into the container and executes the script.For a stopped container, it enters the container, mountscontainer&rsquo;s root filesystem, executes the script, andunmounts CT root. In the latter case, the container is notreally started, no file systems other than root (such as<td width="7%"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="78%"/p>
<pstyle="margin-left:11%;">IP address already in use<b>enter</pb> <i>CTID</tdi>[<b>--exec</trb><tr valign="top" align="left"i>command</i>[<td width="11%"i>arg</tdi>...]]<td width="4%"/p>
<p>79</p></td><td widthstyle="7margin-left:17%;">Enters into a container (givinga container&rsquo;s root shell). This option is a back-doorfor host root only. The proper way to have CT root shell isto use <b>ssh</tdb>(1).<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Option<b>Container action script returned an error--exec</pb> is used to run <i>command</i> with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so <b>vzctl exec</b> can not beused) and for some reason you can not use <b>ssh</tdb>(1).</trp> <tr valignp style="margin-left:17%; margin-top: 1em" align="left">You need to logout manually from the shell to finish session (even if youspecified <b>--exec</b>).</p> <td widthp style="margin-left:11%;"><b>console</tdb> <i>CTID</i>[<i>ttynum</i>]<td width="4%"/p>
<pstyle="margin-left:17%;">Attach to a container console.Optional <i>ttynum</i> argument is tty number (such as<b>4</b> for <b>82tty4</pb>), default is <b>1</tdb>which is usedfor container&rsquo;s <td width="7%"b>/dev/console</tdb>.<td width="78%"/p>
<p>Config file copying error</p></td></tr><tr valignstyle="margin-left:17%; margin-top: 1em" align="left">Note theconsoles are persistent, meaning that: <br>&bull; it can be attached to even if the container is notrunning; <td width="11%"br>&bull; there is no automatic detachment upon the containerstop; </tdbr>&bull; detaching from the console leaves anything running inthis console as is.<td width="4%"/p>
<p>86</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">The followingescape sequences are recognized by <b>vzctl console</tdb>.Note that these sequences are only recognized at thebeginning of a line.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Error setting devices (&bull;<b>--devicesEsc</b> orthen <b>--devnodes.</b>)to detach from the console.</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%">
<pstyle="margin-left:17%; margin-top: 1em">89&bull;</pb>Esc</tdb>then <td width="7%"b>!</tdb>to kill anything running on theconsole (SAK). This is helpful when one expects a loginprompt but there isn&rsquo;t one.<td width="78%"/p>
<p>IP address not available</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td widthOther options ==="4%">
<p>91</p></td><td widthstyle="7margin-left:11%;"><b>--help</tdb><td width="78%"/p>
<p>OS template not found</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Prints help message with a<td width="11%">brief list of possible options.</td><td width="4%"p>
<p>100</p></td><td widthstyle="7margin-left:11%;"><b>--version</tdb><td width="78%"/p>
<p>Unable to find container IP address</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Prints <td width="11%"b>vzctl</tdb>version.<td width="4%"/p>
<p>104</p></td><td width="7%"></td><td width="78%">ACTION SCRIPTS ==
<pstyle="margin-left:11%; margin-top: 1em"><b>VE_NETDEVvzctl</b> ioctl errorhas an ability to execute user-defined scripts when aspecific <b>vzctl</pb> command is run for a container. Thefollowing <b>vzctl</b> commands can trigger execution ofaction scripts: <b>start</b>, <b>stop</tdb>, <b>restart</trb>,<tr valign="top" align="left"b>mount</b>and <td width="11%"b>umount</tdb>.<td width="4%"/p>
<pstyle="margin-left:11%; margin-top: 1em">Action scriptsare located in the <b>105/etc/vz/conf/</pb> directory. There areglobal and per-CT scripts. Global scripts have a literalprefix of <b>vps.</tdb>and are executed for all containers.Per-CT scripts have a <td width="7%"i>CTID</i><b>.</tdb>numeric prefix andare executed for the given container only.<td width="78%"/p>
<pstyle="margin-left:11%; margin-top: 1em">Please notescripts are executed in a host system (CT0) context, withthe exception of <b>Container .start disabled</pb>and </tdb>.stop</trb>scripts,<tr valign="top" align="left"><td width="11%">which are executed in a container context.</td><td width="4%"p>
<pstyle="margin-left:11%; margin-top: 1em">106The followingaction scripts are currently defined: <b><br>vps.premount</pb>, <i>CTID</tdi><td width="7%"b>.premount</tdb><td width="78%"/p>
<p>Unable to set iptables on a running container</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT mount scripts<td width="11%">which 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="4%"p>
<pstyle="margin-left:11%;">107<b>vps.mount</pb>,<i>CTID</tdi><td width="7%"b>.mount</tdb><td width="78%"/p>
<p>Distribution-specific configuration file not found</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container right after it ismounted. Otherwise they are the same as <td width="11%"b>.premount</tdb>scripts.<td width="4%"/p>
<pstyle="margin-left:11%;">109</pi>CTID</tdi><td width="7%"b>.start</tdb><td width="78%"/p>
<p>Unable to apply a config</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Right after <td width="11%"b>vzctl</tdb>hasstarted a container, it executes this script in a containercontext.<td width="4%"/p>
<pstyle="margin-left:11%;">129</pi>CTID</tdi><td width="7%"b>.stop</tdb><td width="78%"/p>
<p>Unable to set meminfo parameter</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Right before <td width="11%"b>vzctl</tdb>hasstopped a container, it executes this script in a containercontext.<td width="4%"/p>
<pstyle="margin-left:11%;">130<b>vps.umount</pb>,<i>CTID</tdi><td width="7%"b>.umount</tdb><td width="78%"/p>
<p>Error setting veth interface</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT umountscripts which are executed for a container before it is<td width="11%">unmounted. Scripts are executed in the host system context,while a CT is mounted. Global script, if exists, is executedfirst.</td><td width="4%"p>
<pstyle="margin-left:11%;">131<b>vps.postumount</pb>,<i>CTID</tdi><td width="7%"b>.postumount</tdb><td width="78%"/p>
<p>Error setting container name</p></td></tr><tr valign="top" alignstyle="margin-left:22%;">Global and per-CT umountscripts which are executed for a container right after it isunmounted. Otherwise they are the same as <td width="11%"b>.umount</tdb>scripts.<td width="4%"/p>
<pstyle="margin-left:11%; margin-top: 1em">The environmentpassed to all the <b>*mount</b>133scripts is the standardenvironment of the parent (i.e. <b>vzctl</pb>) with twoadditional variables: <b>$VEID</b> and <b>$VE_CONFFILE</tdb>.The first one holds the ID of the container, and the secondone holds the full path to the container configuration file.If the script needs to get other CT configurationparameters, such as <td width="7%"b>$VE_ROOT</tdb>, it needs to get thosefrom global and per-CT configuration files.<td width="78%"/p>
<pstyle="margin-left:11%; margin-top: 1em">Waiting for Here is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container start failed(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</tdpre> == EXIT STATUS == <p style="margin-left:11%; margin-top: 1em">Returns 0 uponsuccess, or an appropriate error code in case of anerror:</trp> <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>1391</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 style>Generic system error</p></td></tr><tr valign="top" align="margin-left:"><td width="11%; margin-top: 1em">To create and</td><td width="4%">start &quot;basic&quot; container with ID of 1000 using<ip>fedora-core-5</ip></td><td width="7%"></td><td width="78%"> <p> OS template and IP address ofThe running kernel is not an OpenVZ kernel (or some192.168.10.200: OpenVZ modules are not loaded)</p><br/td></tr>vzctl create 1000 --ostemplate fedora-core-5 --config basic<tr valign="top" align="left"><brtd width="11%"></td>vzctl set 1000 --ipadd 192.168.10.200 --save <brtd width="4%">vzctl start 1000<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