Changes

Jump to: navigation, search

Man/vzctl.8

25,629 bytes added, 18:21, 23 April 2015
Automated import of articles *** existing text overwritten ***
<p style="margin-top: 1em">[<i>flags</i>] <b>create</b>
<i>CTID</i> [<b>--ostemplate&nbsp;</b><i>name</i>][<b>--config&nbsp;</b><i>name</i>][<b>--root&nbsp;parameter value</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>][<b>--ipadd&nbsp;</b><i>addr</i>][<b>--hostname&nbsp;</b><i>name</i>...]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<p>[<i>flags</i>] <b>start</b> <i>CTID</i> [<b>--wait</b>]
[<b>--force</b>] [<b>--skip-fsck</b>][<b>--skip-remount</b>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>stop</b> <i>CTID</i>[<b>--fast</b>][<b>--fastskip-umount</b>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<p>[<i>flags</i>] <b>restart</b> <i>CTID</i>
[<b>--wait</b>] [<b>--force</b>] [<b>--fast</b>][<b>--skip-fsck</b>] [<b>--skip-remount</b>]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>chkpntsuspend</b> | <b>restoreresume</b><i>CTID</i> [<b>--dumpfile&nbsp;</b><i>name</i>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>setsnapshot</b> <i>CTID</i> [<b>--save</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>][<b>--onboot&nbsp;yes</b>|<b>no</b>][<b>--bootorderid&nbsp;</b><i>number</i>][<b>--root&nbsp;uuid</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>][<b>--userpasswd&nbsp;</b><i>user</i>:<i>pass</i>][<b>--disabled&nbsp;yes</b>|<b>no</b>]
[<b>--name&nbsp;</b><i>name</i>]
[<b>--description&nbsp;</b><i>stringdesc</i>][<b>--ipadd&nbsp;</b><i>addr</i>][<b>--ipdel&nbsp;</b><i>addr</i>|<b>all</b>][<b>-skip-hostname&nbsp;suspend</b><i>name</i>][<b>--nameserver&nbsp;</b><i>addr</i>][<b>skip--searchdomain&nbsp;config</b><i>name</i>][<b>--netif_add&nbsp;</bp><i>dev</i>[,<itd>params</itr>...]][<b>--netif_del&nbsp;</b><i>dev</i>] [<b>--ifname</btr valign="top" align="left"><i>dev</itd width="11%"> [<b>--mac&nbsp;</btd><i>hwaddr</i>][<b>--host_ifname&nbsp;</b><itd width="7%">dev</i>][<b>--host_mac&nbsp;</b><i>hwaddr</i>][<bp>--bridge&nbsp;</b><i>namevzctl</i>][<b>--mac_filter&nbsp;on</b>|<bp>off</btd>]][<btd width="2%">--numproc&nbsp;</btd><i>items</i>][<b>--numtcpsock&nbsp;</b><i>items</itd width="80%">][<b>--numothersock&nbsp;</b><i>items</i>][<b>--vmguarpages&nbsp;</bp><i>pages</i>][<b>--kmemsize&nbsp;</b><i>bytesflags</i>][<b>snapshot--tcpsndbuf&nbsp;switch</b><i>bytesCTID</i>][<b>--tcprcvbuf&nbsp;</b><i>bytes</i>][<b>skip--othersockbuf&nbsp;resume</b><i>bytes</i>][| <b>--dgramrcvbuf&nbsp;</b><i>bytes</i>][<b>-must-oomguarpages&nbsp;resume</b><i>pages</i>][<b>--lockedpages&nbsp;</b><i>pages</i>][<b>skip--privvmpages&nbsp;config</b><i>pages</i>][<b>--shmpages&nbsp;id</b><i>pagesuuid</i>][<b>--numfile&nbsp;</b><ip>items</itd>][<b>--numflock&nbsp;</b><i>items</itr>][<b>--numpty&nbsp;</btr valign="top" align="left"><i>items</i>][<btd width="11%">--numsiginfo&nbsp;</btd><i>items</i>][<b>--dcachesize&nbsp;</btd width="7%"><i>bytes</i>][<b>--numiptent&nbsp;</b><i>num</i>][<bp>--physpages&nbsp;</b><i>pagesvzctl</i>][<b>--swappages&nbsp;</b><ip>pages</itd>][<btd width="2%">--cpuunits&nbsp;</btd><i>num</i>][<b>--cpulimit&nbsp;</b><itd width="80%">num</i>][<b>--cpus&nbsp;</b><i>num</i>][<b>--cpumask&nbsp;</bp><i>cpus</i>|<b>all</b>][<b>--meminfo&nbsp;none</b>|<i>mode</i>:<i>valueflags</i>][<b>snapshot--iptables&nbsp;delete</b><i>nameCTID</i>][<b>--netdev_add&nbsp;id</b><i>ifnameuuid</i>][<b>--netdev_del&nbsp;</b><i>ifname</i>][<b>--diskquota&nbsp;yes</b>|<b>no</bp>][<b>--diskspace&nbsp;</b><itd>num</itr>][<b>--diskinodes&nbsp;</btr valign="top" align="left"><i>num</i>][<btd width="11%">--quotatime&nbsp;</b><i>seconds</itd>][<btd width="7%">--quotaugidlimit&nbsp;</b><i>num</i>][<b>--noatime&nbsp;yes</b>|<b>no</b>][<bp>--capability&nbsp;</b><i>capnamevzctl</i>:<b>on</b>|<bp>off</btd>][<btd width="2%">--devnodes&nbsp;</btd><i>param</i>][<b>--devices&nbsp;</b><itd width="80%">param</i>][<b>--pci_add&nbsp;</b><i>dev</i>][<bp>--pci_del&nbsp;</b><i>dev</i>][<b>--features&nbsp;</b><i>paramflags</i>:<b>on</b>|<b>off</b>][<b>snapshot--applyconfig&nbsp;mount</b><i>nameCTID</i>][<b>--applyconfig_map&nbsp;id</b><i>groupuuid</i>][<b>--ioprio&nbsp;target</b><i>numdir</i>]</p> </td></tr><tr valign="top" align="left">
<td width="11%"></td>
<td width="7%">
<td width="80%">
<p>[<i>flags</i>] <b>destroy</b> | <b>delete</b> |<b>mount</b> | <b>snapshot-umount</b> | <bi>statusCTID</bi> |<b>quotaon--id</b> | <b>quotaoff</b> | <b>quotainit</b><i>CTIDuuid</i></p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>execsnapshot-list</b> | <i>CTID</i>[<b>-H</b>] [<b>exec2-o</b> <i>CTIDfield</i>[,<i>field</i>...]command[<b>--id</b> <i>uuid</i>]</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="80%"> <p> [<i>argflags</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="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>enterset</b> <i>CTID</i>[<b>--exec&nbsp;reset_ub</b><i>command&nbsp;</i>[<i>arg&nbsp;</i>...]]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>runscriptdestroy</b> | <b>delete</b> |<b>mount</b> | <b>umount</b> | <b>status</b> |<b>quotaon</b> | <b>quotaoff</b> | <b>quotainit</b><i>CTID script</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>--helpconsole</b> | <bi>CTID</i>[<i>--versionttynum</bi>]</p></td></tr><tr valign="top" align="left"><td width="11%"></tabletd><td width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width= DESCRIPTION =="80%">
<p style="margin>[<i>flags</i>] <b>convert</b> <i>CTID</i>[<b>--left:11%layout&nbsp; margin-topploop</b>[<b>: 1em"</b>{<b>expanded</b>|<b>plain</b>Utility|<b>vzctlraw</b> runs on the host system (otherwise known as}]]</p> </td></tr>Hardware Node, or HN) and performs direct manipulations with<tr valign="top" align="left">containers (CTs).<td width="11%"></ptd><td width="7%">
<p style="margin-left:11%; margin-top: 1em">Containers canbe referred to by either numeric <ib>vzctl</b></p>CTID</itd> or by name (see<btd width="2%">--name</btd> option). Note that CT ID &lt;= 100 arereserved for OpenVZ internal purposes.</ptd width="80%">
<p>[<i>flags</i>] <b>compact</b> <i>CTID</i></p></td></tr><tr valign="top" align= OPTIONS "left"><td width="11%"></td><td width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width== Flags ==="80%">
<p style="margin-top: 1em">These [<i>flags come before a</i>] <b>exec</b> | <b>exec2</b> <i>CTIDcommand, and can be used with any command</i> [<i>arg</i> ... They affect]</p></td></tr>logging to console (terminal) only, and do not affect<tr valign="top" align="left">logging to a log file.<td width="11%"></ptd><td width="7%">
<p style="margin-left:11%;"><b>--quietvzctl</b></p></td><td width="2%"></td><td width="80%">
<p style>[<i>flags</i>] <b>enter</b> <i>CTID</i>[<b>--exec&nbsp;</b><i>command&nbsp;</i>[<i>arg&nbsp;</i>...]]</p> </td></tr><tr valign="top" align="margin-left:17"><td width="11%;">Disables output. Note that</td>scripts run by vzctl are still able to produce someoutput.</ptd width="7%">
<p style="margin-left:11%;"><b>--verbosevzctl</b></p></td><td width="2%"></td><td width="80%">
<p style="margin-left:17%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of [<i>flags</i>] <b>VERBOSErunscript</b> parameter in theglobal configuration file [[Man<i>CTID script</vz.conf.5|i><b/p>vz.conf</btd>(5)]], or to <b/tr>0</btr valign="top" align="left">if not set by <btd width="11%">VERBOSE</btd> parameter.</ptd width="7%">
<p><b>vzctl</b></p></td><td width="2%"></td><td width== Setting container parameters ==="80%">
<p style="margin-left:11%;"><b>set--help</b> | <ib>CTIDparameters--version</i> [<b>--save</bp>] [<b/td>--force</btr>]</ptable>
<p style="margin-left:17%;">This command sets variouscontainer parameters. If a <b>--save</b> flag is given,parameters are saved in container configuration file[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]]. Use <b>--force</b> to save theparameters even if the current kernel doesn&rsquo;t supportOpenVZ. If the container is currently running, <b>vzctl</b>applies these parameters to the container.</p>= DESCRIPTION ==
<p style="margin-left:1711%; margin-top: 1em">The followingUtilityparameters can be used with <b>setvzctl</b> commandruns on the host system (otherwise known asHardware Node, or HN) and performs direct manipulations withcontainers (CTs).</p>
<p style="margin-left:11%; margin-top: 1em">Containers canbe referred to by either numeric <i>CTID</i> or by name (see<b>--name</b> option). Note that CT ID &lt;=== Miscellaneous ====100 arereserved for OpenVZ internal purposes. A numeric ID shouldnot be more than <b>2147483644</b>.</p>
<p style="margin-left:11%;"><b>--onboot yes</b> |<b>no</b></p>= OPTIONS ==
<p style="margin-left:17%;">Sets whether the container willbe started during system boot. The container will not beauto-started unless this parameter is set to <b>yes</b>.</p>== Flags ===
<p style="margin-lefttop:11%;1em"><b>--bootorder</b>These flags come before acommand, and can be used with any command. They affectlogging to console (terminal) only, and do not affect<i>number</i>logging to a log file.</p>
<p style="margin-left:1711%;">Sets the boot order priorityfor this CT. The higher the <i>number</i> is, the earlier inthe boot process this container starts. By default thisparameter is unset, which is considered to be the lowestpriority, so containers with unset <b>bootorder--quiet</b> willstart last.</p>
<p style="margin-left:1117%;"><b>--root</b> <i>path</i>Disables output. Note thatscripts run by vzctl are still able to produce someoutput.</p>
<p style="margin-left:1711%;">Sets the path to root directory(<b>VE_ROOT--verbose</b>) for this container. This is essentially amount point for container&rsquo;s root directory. Argumentcan contain literal string <b>$VEID</b>, which will besubstituted with the numeric CT ID.</p>
<p style="margin-left:1117%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of <b>VERBOSE</b> parameter in theglobal configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]], or to <b>--private0</b>if not set by <ib>pathVERBOSE</ib>parameter.</p>
<p style="margin-left:17%;">Sets the path to privatedirectory (<b>VE_PRIVATE</b>) for this == Setting container. This is adirectory in which all the container&rsquo;s files arestored. Argument can contain literal string <b>$VEID</b>,which will be substituted with the numeric CT ID.</p>parameters ===
<p styletable width="margin-left:11100%;" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><b>--userpasswd</btr valign="top" align="left"><itd width="11%">user</itd>:<i>password</i></ptd width="4%">
<p style="margin-lefttop:17%;1em">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 <b>--saveset</b> flag is useless), it isapplied to the container (by modifying its </etcp></passwd andtd><td width="2%"></etc/shadow files).td></ptd width="83%">
<p style="margin-left:17%; margin-top: 1em">In case<i>CTID</i>[<b>--onboot&nbsp;yes</b>|<b>no</b>][<b>--bootorder&nbsp;</b><i>number</i>]container [<b>--root filesystem is not mounted, it is&nbsp;</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>]automatically mounted, then all the appropriate file changes[<b>--mount_opts&nbsp;</b><i>options</i>]are applied, then it is unmounted.[<b>--userpasswd&nbsp;</b><i>user</i>:<i>pass</pi>][<b>--disabled&nbsp;yes</b>|<b>no</b>][<p style="marginb>--left:17%name&nbsp; margin</b><i>name</i>][<b>--top: 1em"description&nbsp;</b><i>string</i>Note that]container should be created before using this option.[<b>--ostemplate&nbsp;</b><i>string</pi>][<b>--stop-timeout&nbsp;</b><i>seconds</i>][<p style="marginb>--left:11%ipadd&nbsp;"</b><i>addr</i>][<b>--disabled yesipdel&nbsp;</b><i>addr</i> |<b>all</b>][<b>--hostname&nbsp;</b><i>name</i>][<b>no--nameserver&nbsp;</b><i>addr</pi>][<b>--searchdomain&nbsp;</b><i>name</i>][<p style="marginb>--left:17%netif_add&nbsp;"</b><i>dev</i>[,<i>params</i>Disable container start. To..]]force the start of a disabled container, use [<b>--netif_del&nbsp;</b><i>dev</i>|<b>all</b>][<b>--ifname</b>vzctl start<i>dev</i>[<b>--forcemac&nbsp;</b>.<i>hwaddr</pi>][<b>--host_ifname&nbsp;</b><i>dev</i>][<p style="marginb>--left:11%host_mac&nbsp;"</b><i>hwaddr</i>][<b>--namebridge&nbsp;</b> <i>name</i>][<b>--mac_filter&nbsp;on</b>|<b>off</pb>]][<b>--numproc&nbsp;</b><i>items</i>][<p style="marginb>--left:17%numtcpsock&nbsp;"</b><i>items</i>Add a name for a container. The][<b>--numothersock&nbsp;</b><i>nameitems</i> can later be used in subsequent calls to][<b>vzctl--vmguarpages&nbsp;</b> in place of <i>CTIDpages</i>][<b>--kmemsize&nbsp;</b><i>.bytes</pi>][<b>--tcpsndbuf&nbsp;</b><i>bytes</i>][<p style="marginb>--left:11%tcprcvbuf&nbsp;"</b><i>bytes</i>][<b>--descriptionothersockbuf&nbsp;</b><i>bytes</i>][<b>--dgramrcvbuf&nbsp;</b><i>bytes</i>string][<b>--oomguarpages&nbsp;</b><i>pages</pi>][<b>--lockedpages&nbsp;</b><i>pages</i>][<p style="marginb>--left:17%privvmpages&nbsp;"</b><i>pages</i>Add a textual description for a]container.[<b>--shmpages&nbsp;</b><i>pages</pi>][<b>--numfile&nbsp;</b><i>items</i>][<p style="marginb>--left:11%numflock&nbsp;"</b><i>items</i>][<b>--setmodenumpty&nbsp;</b><i>items</i>]restart[<b>--numsiginfo&nbsp;</b>|<i>items</i>][<b>ignore--dcachesize&nbsp;</b><i>bytes</pi>][<b>--numiptent&nbsp;</b><i>num</i>][<p style="marginb>--physpages&nbsp;</b><i>pages</i>][<b>--left:17%swappages&nbsp;"</b><i>pages</i>Whether to restart a container]after applying parameters that require the container to be[<b>--ram&nbsp;</b><i>bytes</i>]restarted in order to take effect.[<b>--swap&nbsp;</b><i>bytes</pi>][<b>--vm_overcommit&nbsp;</b><i>float</i>]==== Networking ====[<b>--cpuunits&nbsp;</b><i>num</i>][<b>--cpulimit&nbsp;</b><i>num</i>][<p style="marginb>--left:11%cpus&nbsp;"</b><i>num</i>][<b>--ipaddcpumask&nbsp;</b> <i>addrcpus</i>|<b>auto</pb>|<b>all</b>][<b>--nodemask&nbsp;</b><i>nodes</i>|<b>all</b>][<p style="marginb>--leftmeminfo&nbsp;none</b>|<i>mode</i>:17%<i>value</i>][<b>--iptables&nbsp;"</b><i>name</i>[<b>,</b>Adds IP address to a given...]]container. Note that this option is incremental, so[<b>--netfilter&nbsp;disabled</b>|<b>stateless</b>|<b>stateful</b>|<b>full</b>][<b>--netdev_add&nbsp;</b><i>ifname</i>addr][<b>--netdev_del&nbsp;</b><i> are added to already existing ones.ifname</pi>][<b>--diskquota&nbsp;yes</b>|<b>no</b>][<p style="marginb>--left:11%diskspace&nbsp;"</b><i>num</i>][<b>--ipdeldiskinodes&nbsp;</b> <i>addrnum</i> |][<b>all--quotatime&nbsp;</b><i>seconds</pi>][<b>--quotaugidlimit&nbsp;</b><i>num</i>][<p style="marginb>--left:17%capability&nbsp;"</b>Removes IP address <i>addrcapname</i>from a container:<b>on</b>|<b>off</b>[<b>,</b>... If you want to remove all the addresses,]]use [<b>--ipdel alldevnodes&nbsp;</b>.<i>param</pi>][<b>--devices&nbsp;</b><i>param</i>][<p style="marginb>--left:11%pci_add&nbsp;"</b><i>dev</i>][<b>--hostnamepci_del&nbsp;</b><i>dev</i>][<b>--features&nbsp;</b><i>name</i>:<b>on</b>|<b>off</b>[<b>,</b>...]][<b>--applyconfig&nbsp;</b><i>name</pi>][<b>--applyconfig_map&nbsp;</b><i>group</i>][<p style="marginb>--left:17%ioprio&nbsp;"</b><i>num</i>Sets container hostname.][<b>vzctl--iolimit&nbsp;</b> writes it to the appropriate file inside a<i>mbps</i>]container (distribution[<b>--iopslimit&nbsp;</b><i>iops</i>] [<b>--dependent).save</pb>][<b>--force</b>] [<b>--reset_ub</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>]</p style> </td></tr><tr valign="top" align="margin-left:"><td width="11%;"></td><td width="4%"></td><td width="2%"></td><td width="83%"> <p>This command sets various container parameters. If thecontainer is currently running, <b>--nameservervzctl</b>applies theseparameters to the container. The following options can beused with <ib>addrset</ib>command.</p></td></tr></table> ==== Flags ====
<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>--nameserversave</b> optionmultiple times in one call to <b>vzctl</b>, as all the nameserver values set in previous calls to <b>vzctl</b> areoverwritten.</p>
<p style="margin-left:1117%;">If this flag is given,parameters are saved in container configuration file[[Man/ctid.conf.5|<b>--searchdomainctid.conf</b><i>name</i>(5)]].</p>
<p style="margin-left:1711%;">Sets DNS search domains for acontainer. If you want to set several search domains, youshould do it at once, so use <b>--searchdomainforce</b> optionmultiple times in one call to <b>vzctl</b>, as all thesearch domain values set in previous calls to <b>vzctl</b>are overwritten.</p>
<p style="margin-left:1117%;">If this flag is given togetherwith <b>--netif_addsave</b>, parameters are saved even if the currentkernel doesn&rsquo;t support OpenVZ. Note this flag does notmake sense without <ib>ifname[--save</ib>,so <ib>mac--save</i>,<i>host_ifname</i>,<i>host_mac</i>,<i>bridge]</ib>isrequired.</p>
<p style="margin-left:1711%;">Adds a virtual Ethernet device(veth) to a given container. Here <ib>ifname--reset_ub</ib> is theEthernet device name in the container, <i>mac</i> is its MACaddress, <i>host_ifname</i> is the Ethernet device name onthe host, and <i>host_mac</i> is its MAC address. MACaddresses should be in the format like XX:XX:XX:XX:XX:XX.<i>bridge</i> is an optional parameter which can be used incustom network start scripts to automatically add theinterface to a bridge. All parameters except <i>ifname</i>are optional and are automatically generated if notspecified.</p>
<p style="margin-left:1117%;">If this flag is given,<b>--netif_delvzctl</b>applies all User Beancounter parameters from<the configuration file to a running container. This ishelpful in case configuration file is modified manually.Please note this flag is exclusive, i>dev_name</i> | <b>all</b>.e. it can not becombined with any other options or flags.</p>
<p style="margin-left:1711%;">Removes virtual Ethernet devicefrom a container. If you want to remove all devices, use<b>--setmode restart</b> |<b>allignore</b>.</p>
<p style==== veth interface configuration ===="margin-left:17%;">A few parameters can only beapplied by restarting the container. By default,<b>vzctl</b> prints a warning if such parameters aresupplied and a container is running. Use <b>--setmoderestart</b> together with <b>--save</b> flag to restart acontainer in such a case, or <b>--setmode ignore</b> tosuppress the warning.</p>
<p style="margin-left:11%; 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>=== Miscellaneous ====
<p style="margin-left:2211%;">MAC address of interface inside<b>--onboot yes</b> |a container.<b>no</b></p>
<p style="margin-left:1117%;">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>--host_ifnameyes</b>, or the container was running just beforelast reboot, and this parameter is not set to <ib>nameno</ib>.Default value is unset, meaning the container will bestarted if it was running before the last reboot.</p>
<p style="margin-left:2211%;">interface name for virtual<b>--bootorder</b>interface in the host system.<i>number</i></p>
<p style="margin-left:1117%;">Sets the boot order priorityfor this CT. The higher the <bi>--host_macnumber</bi>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 <ib>XX:XX:XX:XX:XX:XXbootorder</ib>willstart last.</p>
<p style="margin-left:2211%;">MAC address of interface in thehost system.<b>--root</b> <i>path</i></p>
<p style="margin-left:1117%;">Sets the path to root directory(<b>--bridgeVE_ROOT</b> ) for this container. This is essentially amount point for container&rsquo;s root directory. Argumentcan contain literal string <ib>name$VEID</ib>, which will besubstituted with the numeric CT ID.</p>
<p style="margin-left:2211%;">Bridge name. Custom network<b>--private</b>start scripts can use this value to automatically add theinterface to a bridge.<i>path</i></p>
<p style="margin-left:1117%;">Sets the path to privatedirectory (<b>--mac_filter onVE_PRIVATE</b> |) for this container. This is adirectory in which all the container&rsquo;s files arestored. Argument can contain literal string <b>off$VEID</b>,which will be substituted with the numeric CT ID.</p>
<p style="margin-left:2211%;">Enables<b>--mount_opts</disables MAC addressb>filtering for the Container veth device and the possibilityof configuring the MAC address of this device from insidethe Container. If the filtering is turned on: <bri>option</i>[<b>,</b><i>&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); option<br/i>&bull; it is impossible to modify the veth MAC address frominside the Container...]</p>
<p style="margin-left:2217%; margin-top: 1em">By default,Sets additional mount optionsthis functionality is enabled for all veth devices existingcontainer file system. Only applicable for <b>ploop</b>inside the Containerlayout, ignored otherwise.</p>
<p style==== Resource limits ===="margin-left:11%;"><b>--userpasswd</b><i>user</i>:<i>password</i></p>
<p style="margin-left:1117%; margin-top: 1em">The followingSets password for the givenoptions sets barrier and limit for various userin a container, creating the user if it does notbeancountersexists. Each Note that this option requires one or two arguments. Inis not saved in configurationcase of one argument, file at all (so <b>vzctl--save</b> sets barrier and limit flag is useless), it isapplied directly tothe same value. In case of two colon-separated argumentscontainer,by runningdistribution-specific programs inside the first is a barrier, and the second container. It is a limit. Eachargument is either a number, a number not recommended to combine this option with a suffix, or aany otherspecial value <b>unlimited</b>options.</p>
<p style="margin-left:1117%; margin-top: 1em">Arguments areIn casein itemscontainer was not running, pages or bytes. Note that page size it isautomatically started thenarchitecture-specificall the appropriate changes are applied, then it is 4096 bytes on x86 and x86_64platformsstopped.</p>
<p style="margin-left:1117%; margin-top: 1em">You can alsoNote thatspecify different suffixes for <b>set</b> parameters (exceptfor the parameters which names start with <b>num</b>). Forexample, <b>vzctl set</b> <i>CTID</i> <b>--privvmpages5M:6M</b> container should set <b>privvmpages</b>&rsquo; barrier to 5megabytes and its limit to 6 megabytesbe created before using this option.</p>
<p style="margin-left:11%; margin"><b>-top: 1em"-disabled yes</b>Available|suffixes are:<b>no</b></p>
<table widthp style="100margin-left:17%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0;">Disable container start. Toforce the start of a disabled container, use <tr valign="top" align="left"b>vzctl start--force<td width="11%"/b>.</td><td width="6%"p>
<pstyle="margin-left:11%;"><b>T--name</b>, <bi>tname</bi></p></td><td width="5%"></td><td width="44%">
<pstyle="margin-left:17%;">terabytes;Add a name for a container. The</pi>name</tdi>can later be used in subsequent calls to<td width="34%"b>vzctl</tdb>in place of </tri>CTID<tr valign="top" align="left"/i>. Note this option cannot be used without <td width="11%"b>--save</tdb>.<td width="6%"/p>
<pstyle="margin-left:11%;"><b>G--description</b>, <bi>gstring</bi></p></td><td width="5%"></td><td width="44%">
<p>gigabytes;</p></td><td widthstyle="34margin-left:17%;">Add a textual description for acontainer.</td></tr><tr valign="top" align="left"><td width="11%"></td><td width="6%"p>
<pstyle="margin-left:11%;"><b>M--ostemplate</b>, <bi>mstring</bi></p></td><td width="5%"></td><td width="44%">
<p>megabytes;</p></td><td widthstyle="34margin-left:17%;">Sets a new value of</tdb>OSTEMPLATE</trb>parameter in container configuration file[[Man/ctid.conf.5|<b>ctid.conf<tr valign="top" align="left"/b>(5)]]. Requires <td width="11%"b>--save</tdb>flag. Usefulafter a change/upgrade of a distribution running insidecontainer, as vzctl uses the value of OSTEMPLATE to rundistribution-specific scripts.<td width="6%"/p>
<pstyle="margin-left:11%;"><b>K--stop-timeout</b>, <bi>kseconds</bi></p></td><td width="5%"></td><td width="44%">
<p>kilobytes;</p></td><td widthstyle="34margin-left:17%;">Sets a time to wait forcontainer to stop on </tdb>vzctl stop</trb>before forcibly<tr valign="top" align="left">killing it, in seconds. Note this option can not be usedwithout <td width="11%"b>--save</tdb>flag.<td width="6%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Special valueof <b>P</b>, <b>p0</b>means to use compiled-in default.</p></td><td width="5%"></td><td width="44%">
<p>memory pages (arch-specific).</p></td><td width="34%"></td></tr></table>=== Networking ====
<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>--numprocipadd</b> <i>items</i>[:<i>itemsaddr</i>]</p>
<p style="margin-left:2217%;">Maximum number of processes andAdds an IP address <i>addr</i>kernel-level threadsto a given container. Setting Address can optionally have a netmaskspecified in the barrier and the limit CIDR notation (e.g. <b>10.1.2.3/25</b>).Note that this option is incremental, so <i>addr</i> areadded todifferent values does not make practical sensealready existing ones.</p>
<p style="margin-left:11%;"><b>--numtcpsockipdel</b><i>itemsaddr</i>[:|<ib>itemsall</ib>]</p>
<p style="margin-left:2217%;">Maximum number of TCP socketsRemoves IP address <i>addr</i>from a container.This parameter limits If you want to remove all the number of TCP connections andaddresses,thus, the number of clients the server application canhandle in parallel. Setting the barrier and the limit todifferent values does not make practical senseuse <b>--ipdel all</b>.</p>
<p style="margin-left:11%;"><b>--numothersockhostname</b><i>itemsname</i>[:<i>items</i>]</p>
<p style="margin-left:2217%;">Maximum number of non-TCPsockets (local sockets, UDP and other types of sockets)Sets container hostname.Setting <b>vzctl</b> writes it to the barrier and the limit to different values doesappropriate file inside anot make practical sensecontainer (distribution-dependent).</p>
<p style="margin-left:11%;"><b>--vmguarpagesnameserver</b><i>pagesaddr</i>[:<i>pages</i>]</p>
<p style="margin-left:2217%;">Memory allocation guarantee.Sets DNS server IP address forThis parameter controls how much memory is available to acontainer. The barrier is the amount of memory thatIf you want to set several nameservers, youshould do it at once, so use <b>--nameserver</b> optioncontainer&rsquo;s applications are guaranteed multiple times in one call to be able toallocate. The meaning of <b>vzctl</b>, as all the limit is currently unspecified;nameit should be server values set in previous calls to <b>unlimitedvzctl</b>areoverwritten.</p>
<p style="margin-left:1117%;margin-top: 1em">A special valueof <b>--kmemsizeinherit</b>can be used to auto-propagate nameservervalue(s) from the host system&rsquo;s<ib>bytes</i>[:<i>bytesetc/resolv.conf</ib>]file.</p>
<p style="margin-left:2211%;">Maximum amount of kernel memoryused. This parameter is related to <b>--numprocsearchdomain</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>kmemsizename</bi> usage under the limit.</p>
<p style="margin-left:1117%;">Sets DNS search domains for acontainer. If you want to set several search domains, youshould do it at once, so use <b>--tcpsndbufsearchdomain</b>optionmultiple times in one call to <ib>bytesvzctl</ib>[:, as all thesearch domain values set in previous calls to <ib>bytesvzctl</ib>]are overwritten.</p>
<p style="margin-left:2217%;margin-top: 1em">Maximum size A special valueof TCP sendbuffers. Barrier should <b>inherit</b> can be not less than 64 KB, anddifference between barrier and limit should be equal used to orauto-propagate searchmore than domain value of (s) from the host system&rsquo;s<b>numtcpsock/etc/resolv.conf</b> multiplied by 2.5KBfile.</p>
<p style="margin-left:11%;"><b>--tcprcvbufnetif_add</b><i>bytesifname[</i>,<i>mac</i>[,<i>host_ifname</i>,<i>host_mac</i>,<i>bridge]</i></p> <p style="margin-left:17%;">Adds a virtual Ethernet device(veth) to a given container. Here <i>ifname</i> is theEthernet device name in the container, <i>mac</i> is its MACaddress, <i>host_ifname</i> is the Ethernet device name onthe host, and <i>host_mac</i> is its MAC address. MACaddresses should be in the format like XX:XX:XX:XX:XX:XX.<i>bridge</i>bytesis 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 size of TCP receive<b>--netif_del</b>buffers. Barrier should be not less than 64 KB, anddifference between barrier and limit should be equal to ormore than value of <i>dev_name</i> | <b>numtcpsockall</b> multiplied by 2.5KB.</p>
<p style="margin-left:1117%;">Removes virtual Ethernet devicefrom a container. If you want to remove all devices, use<b>--othersockbufall</b><i>bytes</i>[:<i>bytes</i>].</p>
==== veth interface configuration ==== <p style="margin-left:2211%;margin-top: 1em">Maximum size of other (nonThe followingoptions can be used to reconfigure the already-TCP)createdsocket send buffersvirtual Ethernet interface. If container&rsquo;s processes needs To select the interface tosend very large datagramsconfigure, the barrier should be setaccordinglyuse <b>--ifname</b> <i>name</i> option. Increased limit is necessary for high<b><br>performance of communications through local (UNIX-domain)sockets.-mac</b> <i>XX:XX:XX:XX:XX:XX</i></p>
<p style="margin-left:1122%;"><b>--dgramrcvbuf</b>MAC address of interface inside<i>bytes</i>[:<i>bytes</i>]a container.</p>
<p style="margin-left:2211%;">Maximum size of other (non<b>-TCP)-host_ifname</b>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.<i>name</i></p>
<p style="margin-left:1122%;"><b>--oomguarpages</b>interface name for virtual<i>pages</i>[:<i>pages</i>]interface in the host system.</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-of-memory guarantee. If the <b>oomguarpages--host_mac</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 <bi>unlimitedXX:XX:XX:XX:XX:XX</bi>.</p>
<p style="margin-left:1122%;"><b>--lockedpages</b>MAC address of interface in the<i>pages</i>[:<i>pages</i>]host system.</p>
<p style="margin-left:22%;margin-top: 1em">Maximum number of pagesIf you want anindependent communication with the Container through thebridge, you should specify a multicast MAC address hereacquired by <b>mlock</b>(2FE:FF:FF:FF:FF:FF).</p>
<p style="margin-left:11%;"><b>--privvmpagesbridge</b><i>pagesname</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">Allows controlling the amountof memory allocated by the applicationsBridge name. For shared (mappedas <b>MAP_SHARED</b>) pages, each container really using aCustom networkmemory page is charged for start scripts can use this value to automatically add the fraction of the page(depending on the number of others using it). For&quot;potentially private&quot; pages (mapped as<b>MAP_PRIVATE</b>), container is charged either for interface to afraction of the size or for the full size if the allocatedaddress space. In the latter case, the physical pagesassociated with the allocated address space may be inmemory, in swap or not physically allocated yetbridge.</p>
<p style="margin-left:2211%; "><b>--mac_filter on</b> |<b>off</b></p> <p style="margin-topleft: 1em22%;">The barrier Enables/disables MAC addressfiltering for the Container veth device andthe possibilityof configuring the limit MAC address of this parameter control device from insidethe upper boundary ofContainer. If the filtering is turned on: <br>&bull; the total size veth device accepts only those packets that havea MAC address in their headers corresponding to that of allocated memory. Note that this upperboundary does not guarantee that container will be able todevice (excluding all broadcast and multicast packets); <br>allocate that much memory. The primary mechanism &bull; it is impossible to controlmodify the veth MAC address frommemory allocation is inside the <b>--vmguarpages</b> guaranteeContainer.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>--shmpages</b>By default,this functionality is enabled for all veth devices existing<i>pages</i>[:<i>pages</i>]inside the Container.</p>
<p style="margin-left:22%;">Maximum IPC SHM segment size.Setting the barrier and the limit to different values doesnot make practical sense.</p>=== VSwap limits ====
<p style="margin-left:11%;margin-top: 1em"><b>The followingoptions sets memory and swap limits for VSwap--numfile</b>enabled<i>items</i>[:<i>items</i>]kernels (kernel version 042stab042 or greater).</p>
<p style="margin-left:2211%;margin-top: 1em">Maximum number of open filesArgument is inbytes, unless otherwise specified by an optional suffix.In most cases the barrier and the limit should be set to theAvailable suffixes are:</p> <p style="margin-left:11%; margin-top: 1em">&bull;<b>T</b>, <b>t</b> - terabytes; <br>&bull; <b>G</b>, <b>g</b> - gigabytes; <br>&bull; <b>M</b>, <b>m</b> - megabytes; <br>same value. Setting the barrier to &bull; <b>K</b>, <b>0k</b> effectively- kilobytes; <br>disables pre&bull; <b>P</b>, <b>p</b> - memory pages (arch-charging optimization for this beancounter inspecific,usually 4KB); <br>the kernel&bull; <b>B</b>, which leads to <b>b</b> - bytes (this is the held value being precise butdefault).<b><br>could slightly degrade file open performance.--ram</b> <i>bytes</i></p>
<p style="margin-left:1122%;">Sets physical memory (RAM)available to a container. Actually, the option is a shortcutfor setting <b>--numflockphyspages</b>limit (the barrier is set to<i>items</i>[:<i>items</i>]0).</p>
<p style="margin-left:2211%;">Maximum number of file locks.Safety gap should be between barrier and limit.<b>--swap</b> <i>bytes</i></p>
<p style="margin-left:1122%;">Set swap space available to acontainer. Actually, the option is a shortcut for setting<b>--numptyswappages</b><i>items</i>[:<i>items</i>]limit (the barrier is set to 0).</p>
<p style="margin-left:2211%;">Number of pseudo<b>--terminalsvm_overcommit</b>(PTY). Note that in OpenVZ each container can have not morethan 255 PTYs. Setting the barrier and the limit todifferent values does not make practical sense.<i>float</i></p>
<p style="margin-left:1122%;">Set VM overcommitment value to<bi>--numsiginfofloat</bi>. If set, it is used to calculate<ib>itemsprivmmpages</ib>[:parameter in case it is not setexplicitly (see below). Default value is <ib>items0</ib>], meaningunlimited privvmpages.</p>
<p style="margin-left:2211%;margin-top: 1em">Number of siginfo structures.<b>vzctl</b>Setting the barrier checks if running kernel is VSwap capable, and the limit refuses to different values doesnot make practical senseuse these parameters otherwise. This behavior can beoverriden by using <b>--force</b> flag beforeparameters.</p>
<p style="margin-left:11%;margin-top: 1em"><b>--dcachesize</b>In VSwap mode,all beancounters other than RAM and swap become optional.Note though that if some optional beancounters are not set,they are calculated and set by vzctl implicitly, using the<i>bytes</i>[following formulae:<i>bytes</i>]</p>
<p style="margin-left:2211%;margin-top: 1em">Maximum size offilesystem-related caches, such as directory entry and inode<b>&bull;cacheslockedpages. 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 failbarrier = oomguarpages. Safety gapshould be between barrier and limit.= ram</b></p>
<p style="margin-left:11%;margin-top: 1em"><b>--numiptent&bull;lockedpages.limit = oomguarpages.limit = unlimited</b><i>num</i>[:<i>num</i>]</p>
<p style="margin-left:2211%;margin-top: 1em">Number of iptables (netfilter)<b>&bull;entriesvmguarpages. Setting the barrier and the = vmguarpages.limit to differentvalues does not make practical sense.= ram + swap</b></p>
<p style="margin-left:11%;margin-top: 1em"><b>--physpages&bull;privvmpages.barrier = privvmpages.limit = (ram + swap) *vm_overcommit</b><i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:2211%;margin-top: 1em">On VSwap-enabled kernels, thislimits the amount of physical memory (RAM) available to aifcontainer. The barrier should be set to <b>vm_overcommit</b> is <b>0</b>or not set, and thelimit <b>privvmpages</b> is set to a total size of RAM that can be used used by acontainer.&quot;unlimited&quot;)</p>
<p style="margin-left:2211%; margin-top: 1em">For olderkernels, this Here is an accounting-only parameter, showing theusage example of RAM by this setting container. Barrier should be set 777 tohave 512 megabytes of<b>0</b>, RAM and limit should be set to <b>unlimited</b>.1 gigabyte of swap:</p>
<p pre style="margin-left:11%;"><b> vzctl set 777 --ram 512M --swap 1G --swappages</b><i>pages</i>[:<i>pages</i>]save</ppre>
<p style="margin-left:22%;">The limit, if set, is used toshow a total amount of swap space available inside thecontainer. The barrier of this parameter is currentlyignored. The default value is <b>unlimited</b>, meaningtotal swap will be reported as 0.</p>=== User Beancounter limits ====
<p style="margin-left:2211%; margin-top: 1em">Note that inThe followingorder options sets barrier and limit for the value to be shown as total swap space,various user<b>--meminfo</b> parameter should be set to value other than<b>none</b>beancounters.</p>
<p style==== CPU fair scheduler 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">TheseEach optionparameters control CPU usage by containerrequires one or two arguments. In case of one argument,<b>vzctl<br/b>sets barrier and limit to the same value. Incase of two colon--cpuunitsseparated arguments, the first is abarrier, and the second is a limit. Each argument is eithera number, a number with a suffix, or a special value</b> <i>numunlimited</ib>.</p>
<p style="margin-left:2211%;margin-top: 1em">CPU weight for a container.Arguments areArgument is positive non-zero numberin items, passed to and used inthe kernel fair schedulerpages or bytes. The larger the number Note that page size is, themore CPU time this container gets. Maximum value is 500000architecture-specific,minimal it is 8. Number is relative to weights of all the otherrunning containers. If <b>cpuunits</b> are not specified,4096 bytes on x86 and x86_64default value of 1000 is usedplatforms.</p>
<p style="margin-left:2211%; margin-top: 1em">You can set CPUalsoweight specify different suffixes for CT0 User Beancounter parameters(host system itselfexcept for those which names start with <b>num</b>) as well (use . Forexample, <b>vzctlset 0 --cpuunits</b> <i>numCTID</i>). Usually, OpenVZ initscript<b>--privvmpages(5M:6M</b> should set <b>/etc/init.d/vzprivvmpages</b>) takes care of setting this&rsquo; barrier to 5megabytes and its limit to 6 megabytes.</p>
<p style="margin-left:11%;margin-top: 1em"><b>--cpulimit</b>Available<i>num</i>[<b>%</b>]suffixes are:</p>
<p style="margin-left:2211%;margin-top: 1em">Limit of CPU usage for the&bull;container<b>T</b>, in per cent. Note if the computer has 2 CPUs<b>t</b> - terabytes; <br>&bull; <b>G</b>, it<b>g</b> - gigabytes; <br>has total of 200% CPU time. Default CPU limit is &bull; <b>M</b>, <b>m</b> - megabytes; <br>&bull; <b>K</b>, <b>0k</b> - kilobytes; <br>&bull; <b>P</b>, <b>p</b> - memory pages (no CPU limitarch-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>--cpusnumproc</b> <i>numitems</i>[:<i>items</i>]</p>
<p style="margin-left:22%;">sets Maximum number of CPUs availableprocesses andin kernel-level threads. Setting the containerbarrier and the limit todifferent values does not make practical sense.</p>
<p style="margin-left:11%;"><b>--cpumasknumtcpsock</b> <i>cpusitems</i> |[:<bi>allitems</bi>]</p>
<p style="margin-left:22%;">sets list Maximum number of allowed CPUs forTCP sockets.This parameter limits the container. Input format is a comma-separated list number ofdecimal numbers TCP connections and ranges. Consecutively set bits are shown,as two hyphen-separated decimal numbersthus, the smallest andnumber of clients the server application canlargest bit numbers set handle in parallel. Setting the range. For example, if youwant barrier and the container limit to execute on CPUs 0, 1, 2, 7, you shouldpass <b>0-2,7</b>. Default value is <b>all</b> (thecontainer can execute on any CPU)different values does not make practical sense.</p>
<p style==== Memory output parameters ===="margin-left:11%;"><b>--numothersock</b><i>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%; margin-top: 1em">This parameterMaximum number of non-TCPcontrol output sockets (local sockets, UDP and other types of /proc/meminfo inside a containersockets). <b><br>--meminfo none</b>Setting the barrier and the limit to different values doesnot make practical sense.</p>
<p style="margin-left:2211%;">No <b>--vmguarpages</procb><i>pages</meminfo virtualization(the same as on host system).i>[:<i>pages</i>]</p>
<p style="margin-left:1122%;"><b>--meminfo</b>Memory allocation guarantee.<i>mode</i>:<i>value</i></p> <p style="margin-left:22%;">Configure total This parameter controls how much memory outputis available to ain a container. Reported free The barrier is the amount of memory is evaluatedthataccordingly container&rsquo;s applications are guaranteed to be able to allocate. The meaning of the mode being set. Reported swap limit iscurrently unspecified;evaluated according it should be set to the settings of <b>--swappagesunlimited</b>parameter.</p>
<p style="margin-left:2211%; margin-top: 1em">You can use thefollowing modes for <i>mode</i>: <br>&bull; <b>pages--kmemsize</b>:<i>valuebytes</i> - sets total memory inpages; <br>&bull; <b>privvmpages</b>[:<i>value</i> - sets total memoryas <b>privvmpages</b> * <i>valuebytes</i>.]</p>
<p style="margin-left:22%; margin">Maximum amount of kernel memoryused. This parameter is related to <b>-top: 1em"-numproc</b>Default . Eachprocess consumes certain amount of kernel memory - 16 KB atleast, 30-50 KB typically. Very large processes may consumea bit more. It isimportant 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<b>privvmpages:1kmemsize</b>usage under the limit.</p>
<p style="margin-left:2211%; margin-top: 1em">Note that if<b>--physpagestcpsndbuf</b> is set on a VSwap-enabled kernel, ittakes a precedence over <bi>--meminfobytes</bi>, [:<i.e. setting<b>--meminfobytes</bi> does not take any effect.]</p>
<p style="margin-left:22%;">Maximum size of TCP sendbuffers. Barrier should be not less than 64 KB, anddifference between barrier and limit should be equal to ormore than value of <b>numtcpsock</b> multiplied by 2.5KB.</p> <p style=== iptables control parameters ===="margin-left:11%;"><b>--tcprcvbuf</b><i>bytes</i>[:<i>bytes</i>]</p>
<p style="margin-left:1122%;">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>--iptablesnumtcpsock</b>multiplied by 2.5<i>name</i>KB.</p>
<p style="margin-left:2211%;">Allow to use the functionality<b>--othersockbuf</b>of <i>namebytes</i> iptables module inside the container. Tospecify multiple [:<i>namebytes</i>s, repeat --iptables for each,or use space-separated list as an argument (enclosed insingle or double quotes to protect spaces).]</p>
<p style="margin-left:22%; margin-top: 1em">The defaultMaximum size of other (non-TCP)socket send buffers. If container&rsquo;s processes needs tolist of enabled iptables modules is specified by send very large datagrams, thebarrier should be set<b>IPTABLES</b> variable in [[Man/vzaccordingly.conf.5|<b>vz.conf</b>Increased limit is necessary for highperformance of communications through local (5UNIX-domain)]]sockets.</p>
<p style="margin-left:2211%; margin-top: 1em">You can use thefollowing values for <i>name</i>: <b>iptable_filter--dgramrcvbuf</b>,<bi>iptable_manglebytes</bi>, [:<bi>ipt_limitbytes</b>,<b>ipt_multiport</b>, <b>ipt_tos</b>, <b>ipt_TOS</b>,<b>ipt_REJECT</b>, <b>ipt_TCPMSS</b>, <b>ipt_tcpmss</b>,<b>ipt_ttl</b>, <b>ipt_LOG</b>, <b>ipt_length</b>,<b>ip_conntrack</b>, <b>ip_conntrack_ftp</b>,<b>ip_conntrack_irc</b>, <b>ipt_conntrack</b>,<b>ipt_state</b>, <b>ipt_helper</b>, <b>iptable_nat</b>,<b>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>ipt_REDIRECT</b>,<b>xt_mac</b>, <b>ipt_recent</b>, <b>ipt_owner</bi>.]</p>
<p style==== Network devices control parameters ===="margin-left:22%;">Maximum size of other (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 not needed.</p>
<p style="margin-left:11%;"><b>--netdev_addoomguarpages</b><i>namepages</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">move network device from 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 thebarrier, processes of this container areguaranteed not to be killed in out-of-memory situations. Themeaning of limit is currently unspecified; it should be sethost system to a specified container<b>unlimited</b>.</p>
<p style="margin-left:11%;"><b>--netdev_dellockedpages</b><i>namepages</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">delete network device from aMaximum number of pagesspecified containeracquired by <b>mlock</b>(2).</p>
<p style==== Disk quota parameters ===="margin-left:11%;"><b>--privvmpages</b><i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:1122%;">Allows controlling the amountof memory allocated by the applications. For shared (mappedas <b>--diskquota yesMAP_SHARED</b> |) pages, each container really using amemory page is charged for the fraction of the page(depending on the number of others using it). For&quot;potentially private&quot; pages (mapped as<b>noMAP_PRIVATE</b>), container is charged either for afraction of the size or for the full size if the allocatedaddress space. In the latter case, the physical pagesassociated with the allocated address space may be inmemory, in swap or not physically allocated yet.</p>
<p style="margin-left:22%;margin-top: 1em">allows 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 to enable or disabledisk quota for a containerallocate that much memory. By default, a global valueThe primary mechanism to control(<b>DISK_QUOTA</b>) from [[Man/vz.conf.5|<b>vz.conf</b>(5)]] memory allocation is used.</p> <p style="margin-left:11%;">the <b>--diskspacevmguarpages</b><i>num</i>[:<i>num</i>]guarantee.</p>
<p style="margin-left:2211%;">sets soft and hard disk quotalimits, in blocks. First parameter is soft limit, second ishard limit. One block is currently equal to 1Kb. Suffixes<b>G--shmpages</b>, <bi>Mpages</bi>, [:<bi>Kpages</bi> can also be specified (see<b>Resource limits</b> section for more info onsuffixes).]</p>
<p style="margin-left:1122%;"><b>--diskinodes</b>Maximum IPC SHM segment size.Setting the barrier and the limit to different values does<i>num</i>[:<i>num</i>]not make practical sense.</p>
<p style="margin-left:2211%;">sets soft and hard disk quota<b>--numfile</b>limits, in <i-nodes. First parameter is soft limit, second ishard limit.>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%;">Maximum number of open files.In most cases the barrier and the limit should be set to thesame value. Setting the barrier to <b>--quotatime0</b>effectivelydisables pre-charging optimization for this beancounter inthe kernel, which leads to the held value being precise but<i>seconds</i>could slightly degrade file open performance.</p>
<p style="margin-left:2211%;">sets quota grace period.<b>--numflock</b>Container is permitted to exceed its soft limits for thegrace period, but once it has expired, the soft limit isenforced as a hard limit.<i>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%;"><b>--quotaugidlimit</b>Maximum number of file locks.<i>num</i>Safety gap should be between barrier and limit.</p>
<p style="margin-left:2211%;">sets maximum number ofuser/group IDs in a container for which disk quota insidethe container will be accounted. If this value is set to<b>0--numpty</b>, user and group quotas inside the container willnot be accounted.<i>items</i>[:<i>items</i>]</p>
<p style="margin-left:22%; margin-top: 1em">Number of pseudo-terminals(PTY). Note that ifin OpenVZ each container can have not moreyou have previously set value of this parameter than 255 PTYs. Setting the barrier and the limit to <b>0</b>,changing it while the container is running will different values does not takeeffectmake practical sense.</p>
<p style==== Mount option ===="margin-left:11%;"><b>--numsiginfo</b><i>items</i>[:<i>items</i>]</p>
<p style="margin-left:1122%;"><b>--noatime yes</b> |Number of siginfo structures.Setting the barrier and the limit to different values does<b>no</b>not make practical sense.</p>
<p style="margin-left:2211%;">Sets noatime flag (do not<b>--dcachesize</b>update inode access times) on filesystem.<i>bytes</i>[:<i>bytes</i>]</p>
<p style==== Capability option ===="margin-left:22%;">Maximum size offilesystem-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:11%;"><b>--capabilitynumiptent</b><i>capnamenum</i>[:<bi>onnum</b>|<b>off</bi>]</p>
<p style="margin-left:22%;">Sets a capability for aNumber of iptables (netfilter)containerentries. Note that setting capability when Setting the barrier and the containerlimit to differentis running values does not take immediate effect; restart thecontainer in order for the changes to take effect. Note acontainer has default set of capabilities, thus anyoperation on capabilities is &quot;logical and&quot; withthe default capability maskmake practical sense.</p>
<p style="margin-left:2211%; margin-top: 1em">You can use thefollowing values for <i>capname</i>: <b>chown--physpages</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"><b>WARNING</b>:On VSwap-enabled kernels, thissetting some limits the amount of those capabilities may have far reachingphysical memory (RAM) available to asecurity implications, so do not do it unless you know whatyou are doingcontainer. Also note that setting The barrier should be set to <b>setpcap:on0</b> for, and thelimit to a total size of RAM that can be used used by acontainer will most probably lead to inability to startit.</p>
<p style==== Device access management ===="margin-left:22%; margin-top: 1em">For olderkernels, this is an accounting-only parameter, showing theusage of RAM by this container. Barrier should be set to<b>0</b>, and limit should be set to <b>unlimited</b>.</p>
<p style="margin-left:11%;"><b>--devnodesswappages</b><i>devicepages</i>[:[<bi>rpages</b>][<b>w</bi>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:22%;">Give For VSwap-enabled kernels(042stab042 or greater), this parameter limits the amount ofswap space available to a container an access. The barrier should be(set to <b>r0</b> - read, <b>w</b> - write, <b>q</b> - disk quotamanagement, <b>none</b> - no access) and the limit to a device designatedtotal size of swap thatcan be used by the special file /dev/<i>device</i>. Device file iscreated in a container by <b>vzctl</b>. Example: <b>vzctlset 777 --devnodes sdb:rwq</b>.</p>
<p style="margin-left:1122%;margin-top: 1em"><b>For older(pre--devicesVSwap) kernels, the limit is used to show a totalamount of swap space available inside the container. Thebarrier of this parameter is ignored. The default value isb</b>|<b>c</b>:<i>major</i>:<i>minor</i>|<b>all</b>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>noneunlimited</b>, meaning total swap will be reported as0.</p>
<p style="margin-left:22%;">Give the container an access toa <b>b</b>lock or <b>c</b>haracter device designated by its<i>major</i> and <i>minor</i> numbers. Device file have tobe created manually.</p>=== CPU fair scheduler parameters ====
<p style==== PCI device management ===="margin-left:11%; margin-top: 1em">Theseparameters control CPU usage by container. <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>--pci_addcpuunits</b>are not specified,[<i>domain</i>:]<i>bus</i>:<i>slot</i>default value of 1000 is used.<i>func</i></p>
<p style="margin-left:22%;margin-top: 1em">Give the container an access toYou can set CPUa specified PCI device. All numbers are hexadecimal weight for CT0 (host system itself) aswell (use <b>vzctlprinted by set 0 --cpuunits</b>lspci<i>num</i>). Usually, OpenVZ initscript(<b>/etc/init.d/vz</b>(8) in the first column)takes care of setting this.</p>
<p style="margin-left:11%;"><b>--pci_delcpulimit</b>[<i>domainnum</i>:][<ib>bus%</i>:<i>slot</i>.<i>func</ib>]</p>
<p style="margin-left:22%;">Delete a PCI device from Limit of CPU usage for thecontainer, in per cent. Note if the computer has 2 CPUs, ithas total of 200% CPU time. Default CPU limit is <b>0</b>(no CPU limit).</p>
<p style="margin-left:2211%; margin-top: 1em">Note that<b>vps-pci</b> configuration script is executed by<b>vzctl-cpus</b> then configuring PCI devices. The script isusually located at <bi>/usr/lib[64]/vzctl/scripts/num</bi>.</p>
<p style==== Features management ===="margin-left:22%;">sets number of CPUs availablein the container.</p>
<p style="margin-left:11%;"><b>--featurescpumask</b><i>namecpus</i>:|<b>onauto</b>|<b>offall</b></p>
<p style="margin-left:22%;">Enable or disable Sets list of allowed CPUs forthe container. Input format is a specificcomma-separated list ofcontainer featuredecimal numbers and/or ranges. Known features Consecutively set bits are: <b>sysfs</b>shown as two hyphen-separated decimal numbers, the smallestand largest bit numbers set in the range. For example,if<b>nfs</b>you want the container to execute on CPUs 0, 1, 2, 7, youshould pass <b>sit</b>0-2, <b>ipip7</b>, . Default value is <b>pppall</b>,(thecontainer can execute on any CPU). If used with the<b>ipgre--nodemask</b>option, value of <b>bridge</b>, <b>nfsdauto</b>assigns allCPUs from the specified NUMA node to a container.</p>
<p style==== Apply config ===="margin-left:11%;"><b>--nodemask</b> <i>nodes</i>| <b>all</b></p>
<p style="margin-left:1122%;">Sets list of allowed NUMA nodesfor the container. Input format is the same as for<b>--applyconfigcpumask</b>. Note that <b>--nodemask</b> must be usedwith the <ib>name--cpumask</ib>option.</p>
<p style="margin-left:22%;">Read container === Memory output parameters fromthe container sample configuration file<tt>/etc/vz/conf/ve-</tt><i>name</i><tt>.conf-sample</tt>,and apply them, if <b>--save</b> option specified save tothe container config file. The following parameters are notchanged: <b>HOSTNAME</b>, <b>IP_ADDRESS</b>,<b>OSTEMPLATE</b>, <b>VE_ROOT</b>, and<b>VE_PRIVATE</b>.</p>====
<p style="margin-left:11%;margin-top: 1em">ForVSwap-enabled kernels (042stab042 or greater), thisparameter is ignored. For older kernels, it controls theoutput of /proc/meminfo inside a container. <b><br>--applyconfig_mapmeminfo none</b><i>group</i></p>
<p style="margin-left:22%;">Apply container configparameters selected by <i>group</i>. Now the only possiblevalue for <i>group<No /i> is <b>name<proc/b>: to restore containermeminfo virtualizationname based (the same as on <b>NAME</b> variable in containerconfiguration filehost system).</p>
<p style="margin-left:11%;"><b>--meminfo</b><i>mode</i>:<i>value</i></p> <p style=== I"margin-left:22%;">Configure total memory outputin a container. Reported free memory is evaluatedaccordingly to the mode being set. Reported swap isevaluated according to the settings of <b>--swappages</b>parameter.</O priority management ====p>
<p style="margin-left:1122%;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> -iopriosets total memoryas <b>privvmpages</b>* <i>priorityvalue</i>.</p>
<p style="margin-left:22%;margin-top: 1em">Assigns I/O priority tocontainer. <i>Priority</i> range is <b>0-7</b>. The greater<i>priority</i> Default is, the more time for I/O activity containerhas. By default each container has <i>priority</i> of<b>4privvmpages:1</b>.</p>
=== Checkpointing and restore = Netfilter (iptables) control parameters ====
<p style="margin-topleft: 1em11%;">Checkpointing is a feature ofOpenVZ kernel which allows to save a complete state of arunning container, and to restore it later.<b>--netfilter&nbsp;disabled</b>|<b>stateless</b>|<b>stateful</b>|<b>full</b></p>
<p style="margin-left:1122%;"><b>chkpnt<Restrict access tonetfilter/b> <i>CTID</i>iptables modules for a container. This option[replaces obsoleted <b>--dumpfileiptables</b> <i>name</i>].</p>
<p style="margin-left:1722%;margin-top: 1em">This command saves a completeNote thatstate of a running changing this parameter requires container to a dump filerestart, and stops thesocontainer. If an option consider using <b>--dumpfilesetmode</b> is not set,default dump file name <b>/vz/dump/Dump.</b><i>CTID</i> isusedoption.</p>
<p style="margin-left:1122%;margin-top: 1em">The followingarguments can be used: <b>restore</b> <i>CTID</ibr>[<b>--dumpfile&bull; disabled</b> <i>name</i>]</p>
<p style="margin-left:1732%;">This command restores acontainer from the dump file created by the <b>chkpnt</b>command.no modules are allowed</p>
<p style=== Performing container actions ==="margin-left:22%;"><b>&bull; stateless</b></p>
<p style="margin-left:1132%;"><b>create</b> <i>CTID</i>all modules except NAT and[<b>--ostemplate</b> <conntracks are allowed (i>name</i>] [<b>--config</b>.e. filter and mangle); this is the<i>name</i>] [<b>--private</b> <i>path</i>] <br>[<b>--root</b> <i>path</i>] [<b>--ipadd</b> <i>addr</i>][<b>--hostname</b> <i>name</i>]default</p>
<p style="margin-left:1722%;">Creates a new container area.This operation should be done once, before the first startof the container.<b>&bull; stateful</b></p>
<p style="margin-left:1732%; margin-top: 1em">If the<b>--config</b> option is specified, values from exampleconfiguration file<b>/etc/vz/conf/ve-</b><i>name</i><b>.conf-sample</b> all modules except NAT areput into the container configuration file. If this containerconfiguration file already exists, it will be removed.allowed</p>
<p styletable width="margin-left:17100%; margin-top: 1em">You can useborder="0" rules="none" frame="void"<b>--root</b> <i>path</i cellspacing="0" cellpadding="0"> option to sets the path to themount point for the container root directory (default is<btr valign="top" align="left">VE_ROOT</b> specified in [[Man/vz.conf.5|<b>vz.conf</b>(5)]] file).Argument can contain literal string <btd width="22%">$VEID</btd>, which willbe substituted with the numeric CT ID.</ptd width="9%">
<p style="margin-left:17%; margin-top: 1em">You can use<b>--private&bull; full</b> <i>path</ip> option to set the path todirectory in which all the files and directories specific tothis very container are stored (default is <b>VE_PRIVATE</btd>specified in [[Man/vz.conf.5|<btd width="1%">vz.conf</btd>(5)]] file). Argument can containliteral string <b>$VEID</b>, which will be substituted withthe numeric CT ID.</ptd width="36%">
<p style>all modules are allowed</p></td><td width="margin-left:1732%; margin-top: 1em">You can use<b>--ipadd</b> <itd>addr</itr> option to assign an IP address toa container. Note that this option can be used multipletimes.</ptable>
<p style="margin-left:1711%; margin-top: 1em">You can use<b>--hostnameiptables</b> <i>name</i> option to set a host name fora container[<b>,</b>...]</p>
<p style="margin-left:1122%;"><b>destroyNote</b> |this option isobsoleted, <b>delete--netfilter</b>should be used instead.</p>
<p style="margin-left:1722%;margin-top: 1em">Removes a container privateAllow to usearea by deleting all files, directories and the functionality of <i>name</i> iptables module inside theconfiguration file of this container. Multiple comma-separated <i>name</i>s can bespecified.</p>
<p style="margin-left:1122%;margin-top: 1em">The defaultlist of enabled iptables modules is defined by the<b>startIPTABLES</b> variable in [[Man/vz.conf.5|<b>--waitvz.conf</b>(5)][<b>--force</b>].</p>
<p style="margin-left:1722%;margin-top: 1em">Mounts (if necessary) andYou 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>,starts a container. Unless <b>--waitip_conntrack</b>, <b>ip_conntrack_ftp</b>,<b>ip_conntrack_irc</b>, <b>ipt_conntrack</b> option is,specified<b>ipt_state</b>, <b>vzctlipt_helper</b> will return immediately; otherwise, <b>iptable_nat</b>,an attempt to wait till the default runlevel is reached will<b>ip_nat_ftp</b>, <b>ip_nat_irc</b>, <b>ipt_REDIRECT</b>,be made by <b>vzctlxt_mac</b>, <b>ipt_recent</b>, <b>ipt_owner</b>.</p>
<p style="margin-left:17%; margin-top: 1em">Specify<b>--force</b> if you want to start a container which isdisabled (see <b>--disabled</b>).</p>=== Network devices control parameters ====
<p style="margin-left:1711%; margin-top: 1em">Note that thiscommand can lead to execution of <b>premount--netdev_add</b>,<bi>mountname</b> and <b>start</b> action scripts (see <b>ACTIONSCRIPTS</bi> below).</p>
<p style="margin-left:1122%;"><b>stop</b> [<b>--fast</b>]move network device from thehost system to a specified container</p>
<p style="margin-left:1711%;">Stops and unmounts a container.Normally, <b>halt</b>(8) is executed inside a container;option <b>--fastnetdev_del</b> makes <bi>vzctlname</b> use <bi>reboot</b>(2)syscall instead which is faster but can lead to uncleancontainer shutdown.</p>
<p style="margin-left:1722%; margin-top: 1em">Note that thisdelete network device from acommand can lead to execution of <b>stop</b>, <b>umount</b>and <b>postumount</b> action scripts (see <b>ACTIONSCRIPTS</b> below).specified container</p>
<p style="margin-left:11%;"><b>restart</b> [<b>--wait</b>][<b>--force</b>] [<b>--fast</b>]</p>=== Disk quota parameters ====
<p style="margin-left:1711%;">Restarts a container, i.e.stops it if it is running, and starts again. Accepts all the<b>start--diskquota yes</b> and |<b>stopno</b> options.</p>
<p style="margin-left:1722%; margin-top: 1em">Note that thisallows to enable or disabledisk quota for a container. By default, a global valuecommand can lead to execution of some action scripts (see<b>ACTION SCRIPTSDISK_QUOTA</b>) from [[Man/vz.conf.5|<b>vz.conf</b> below(5)]] is used.</p>
<p style="margin-left:1122%;margin-top: 1em">Note that thisparameter is ignored for <b>statusploop</b>layout.</p>
<p style="margin-left:1711%;">Shows a container status. This<b>--diskspace</b>is a line with five or six words, separated by spaces.<i>num</i>[:<i>num</i>]</p>
<p style="margin-left:1722%; margin-top: 1em">First word isliterally For <b>CTIDsimfs</b>layout, setssoft and hard disk quota limits. First parameter is softlimit, second is hard limit.</p>
<p style="margin-left:1722%; margin-top: 1em">Second word For<b>ploop</b> layout, initiates the procedure of resizing theploop image file to the new size. Since there isnothe numeric soft/hard limit concept in ploop, second <i>CT IDnum</i>, ifspecified, is ignored.</p>
<p style="margin-left:1722%; margin-top: 1em">Third word By default,ploop resize is done online, i.e. on a mounted ploop. Thisisa preferred way of doing resize. Although, in a rare caseshowing whether this a container exists or notwas using lots of disk space and should now beresized to a much smaller size, it can an offline resize might beeither more appropriate. In this case, make sure the container isstopped and unmounted and use additional<b>exist--offline-resize</b> or <b>deleted</b>.option</p>
<p style="margin-left:1722%; margin-top: 1em">Fourth word Note that ploopresize isshowing the status of the NOT performed on container filesystemstart, it can beso foreither consistency <b>mounted--diskspace</b> or must be used together with<b>unmounted--save</b>flag.</p>
<p style="margin-left:1722%; margin-top: 1em">Fifth wordSuffixesshows if the container is running<b>G</b>, <b>M</b>, it can be either<b>runningK</b> or can also be specified (see<b>downResource limits</b>section for more info on suffixes).If suffix is not specified, value is in kilobytes.</p>
<p style="margin-left:1711%; margin-top: 1em">Sixth word, ifexists, is <b>suspended--diskinodes</b>. It appears if both a containerand its dump file exist (see <bi>num</i>[:<i>chkpntnum</bi>).]</p>
<p style="margin-left:1722%; margin-top: 1em">This commandsets soft and hard disk quotalimits, in i-nodes. First parameter is soft limit, second iscan also be usable from scriptshard limit.</p>
<p style="margin-left:1122%;margin-top: 1em">Note that thisparameter is ignored for <b>mountploop</b>layout.</p>
<p style="margin-left:1711%;">Mounts container private area.Note that this command can lead to execution of<b>premount--quotatime</b> and <b>mount</b> action scripts (see<bi>ACTION SCRIPTSseconds</bi> below).</p>
<p style="margin-left:1122%;"><b>umount</b>sets quota grace period.Container is permitted to exceed its soft limits for thegrace period, but once it has expired, the soft limit isenforced as a hard limit.</p>
<p style="margin-left:1722%;margin-top: 1em">Unmounts container privatearea. Note that this command can lead to execution of<b>umount</b> and <b>postumount</b> action scripts (seeparameter is ignored for <b>ACTION SCRIPTSploop</b> below)layout.</p>
<p style="margin-left:1711%; margin-top: 1em">Note that<b>stop--quotaugidlimit</b> does <bi>umountnum</bi> automatically.</p>
<p style="margin-left:1122%;">Enables or disablesin-container per-user and per-group disk quotas. If thevalue is set to <b>quotaon0</b> <i>ctid</i>or not set, disk quotas inside thecontainer is disabled and not accounted.</p>
<p style="margin-left:1722%;margin-top: 1em">Turn disk quota on. Not thatFor<b>mountsimfs</b> and <b>start<layout containers, non-zero value sets maximumnumber of user/b> does that automaticallygroup IDs for which disk quota isaccounted.</p>
<p style="margin-left:1122%;margin-top: 1em">For<b>quotaoffploop</b> <i>ctid<layout containers, any non-zero value enablesdisk quota inside the container; the number of user/i>groupIDs used by disk quota is not limited by OpenVZ.</p>
<p style="margin-left:1722%;margin-top: 1em">Turn Note thatenabling or disabling in-container disk quota off. Not thatquotas requirescontainer restart, so consider using <b>umount--setmode</b> and <b>stop</b> does that automaticallyoption.</p>
<p style="margin-left:11%;"><b>quotainit</b><i>ctid</i></p>=== Capability option ====
<p style="margin-left:1711%;">Initialize disk quota (i.e. run<b>vzquota init--capability</b>) with the parameters taken from the CTconfiguration file [[Man<i>capname</i>:<b>on</ctid.conf.5b>|<b>ctid.confoff</b>[<b>,</b>(5)]...].</p>
<p style="margin-left:1122%;"><b>exec</b> <i>CTIDSets a capability for acontainer. Multiple comma-separated capabilities can becommand</i>specified.</p>
<p style="margin-left:1722%;margin-top: 1em">Executes <i>command</i> in Note thatsetting acapability when the container. Environment variables are is running does not set inside take immediate effect; restart thecontainer. Signal handlers may differ from default settings.in order forIf <i>command</i> is the changes to take effect (consider using <b>--setmode</b>, commands are read fromstdinoption).</p>
<p style="margin-left:1122%;margin-top: 1em"><b>exec2</b> <i>CTIDA container hasthe default set of capabilities, thus any operation oncapabilities is &quot;logical AND&quot; with the defaultcommand</i>capability mask.</p>
<p style="margin-left:1722%;margin-top: 1em">The same as You can use thefollowing values for <i>capname</i>: <b>chown</b>,<b>dac_override</b>, <b>dac_read_search</b>, <b>fowner</b>,<b>fsetid</b>, <b>kill</b>, <b>setgid</b>, <b>setuid</b>,<b>setpcap</b>, <b>linux_immutable</b>,<b>net_bind_service</b>, <b>net_broadcast</b>,<b>net_admin</b>, <b>net_raw</b>, <b>ipc_lock</b>,<b>ipc_owner</b>, <b>sys_module</b>, <b>sys_rawio</b>,<b>sys_chroot</b>, <b>sys_ptrace</b>, <b>sys_pacct</b>,<b>sys_admin</b>, <b>sys_boot</b>, <b>sys_nice</b>,<b>sys_resource</b>, <b>execsys_time</b>, <b>sys_tty_config</b>, butreturn code is <b>mknod</b>, <b>lease</b>, <b>setveid</b>, <b>ve_admin</b>.For detailed description, see <b>capabilities</b>(7).</p> <p style="margin-left:22%; margin-top: 1em"><b>WARNING</b>:setting some of those capabilities may have far reachingsecurity implications, so do not do it unless you know whatyou are doing. Also note that of setting <ib>commandsetpcap:on</ib>fora container will most probably lead to inability to startit.</p> ==== Device access management ====
<p style="margin-left:11%;"><b>runscript--devnodes</b> <i>CTIDscriptdevice</i>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:1722%;">Run specified shell script inGive the container. Argument an access(<ib>scriptr</ib> 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<b>w</b> - write, it enters the container, mountscontainer&rsquo;s root filesystem, executes the script, and<b>q</b> - disk quotaunmounts CT root. In the latter casemanagement, the container is notreally started, no file systems other than root (such as<b>/procnone</b>- no access) are mounted, no startup scripts are executedto a device designatedetcby the special file /dev/<i>device</i>. Thus the environment in which the script is running Device file isfar from normal and is only usable for very basicoperationscreated in a container by <b>vzctl</b>.Example:</p>
<p pre style="margin-left:1122%;"><b>enter</b> [<b> vzctl set 777 --exec</b><i>command</i> [<i>arg</i> ...]]devnodes sdb:rwq</ppre>
<p style="margin-left:1711%;">Enters into a container (givinga container&rsquo;s root shell). This option is a back<b>--doordevicesfor host root only. The proper way to have CT root shell isto use b</b>|<b>c</b>:<i>major</i>:<i>minor</i>|<b>all</b>:[<b>r</b>][<b>w</b>][<b>q</b>]|<b>sshnone</b>(1).</p>
<p style="margin-left:1722%; margin-top: 1em">OptionGive the container an access toa <b>--execb</b> is used to run lock or <ib>commandc</ib> with argumentsharacter device designated by itsafter entering into container. This is useful if command tobe run requires a terminal (so <bi>vzctl execmajor</bi> can not beused) and for some reason you can not use <bi>sshminor</bi>(1)numbers. Device file have tobe created manually.</p>
<p style="margin-left:17%; margin-top: 1em">You need to logout manually from the shell to finish session (even if youspecified <b>--exec</b>).</p>=== PCI device management ====
<p style=== Other options ==="margin-left:11%;"><b>--pci_add</b>[<i>domain</i>:]<i>bus</i>:<i>slot</i>.<i>func</i></p>
<p style="margin-left:1122%;">Give the container an access toa specified PCI device. All numbers are hexadecimal (asprinted by <b>--helplspci</b>(8) in the first column).</p>
<p style="margin-left:1711%;">Prints help message with a<b>--pci_del</b>brief list of possible options[<i>domain</i>:]<i>bus</i>:<i>slot</i>.<i>func</i></p>
<p style="margin-left:1122%;"><b>--version</b>Delete a PCI device from thecontainer.</p>
<p style="margin-left:1722%;margin-top: 1em">Prints Note that<b>vps-pci</b> configuration script is executed by<b>vzctl</b>then configuring PCI devices. The script isversionusually located at <b>/usr/libexec/vzctl/scripts/</b>.</p>
== ACTION SCRIPTS == Features management ====
<p style="margin-left:11%; margin-top: 1em"><b>vzctl</b>has an ability to execute user-defined scripts when aspecific <b>vzctl-features</b> command is run for a container. Thefollowing <bi>vzctlname</bi> commands can trigger execution ofaction scripts: <b>starton</b>, |<b>stopoff</b>, [<b>restart</b>,<b>mount</b> and <b>umount</b>...]</p>
<p style="margin-left:1122%; margin-top: 1em">Action scriptsEnable or disable a specificcontainer feature. Known features are located in the : <b>sysfs</etcb>,<b>nfs</vzb>, <b>sit</confb>, <b>ipip</b>, <b>ppp</b> directory. There are,global and per-CT scripts. Global scripts have a literalprefix of <b>vps.ipgre</b>, <b>bridge</b> and are executed for all containers.Per-CT scripts have a , <ib>CTIDnfsd</ib> numeric prefix and are. A few features canexecuted for the given container onlybe specified at once, comma-separated.</p>
<p style="margin-left:11%; margin-top: 1em">There are 8action scripts currently defined: <b><br>vps.premount</b>, <i>CTID</i><b>.premount</b></p>=== Apply config ====
<p style="margin-left:2211%;">Global and per<b>--CT mount scriptsapplyconfig</b>which are executed for a container before it is mounted.Scripts are executed in the host OS context, while a CT isnot yet mounted or running. Global script, if exists, isexecuted first.<i>name</i></p>
<p style="margin-left:1122%;">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>vpsoption specified save tothe container config file.mountThe following parameters are notchanged: <b>HOSTNAME</b>, <b>IP_ADDRESS</b>,<ib>OSTEMPLATE</b>, <b>CTIDVE_ROOT</ib>, and<b>.mountVE_PRIVATE</b>.</p>
<p style="margin-left:2211%;">Global and per-CT mount scriptswhich are executed for a container right after it ismounted. Otherwise they are the same as <b>.premount--applyconfig_map</b>scripts.<i>group</i></p>
<p style="margin-left:1122%;">Apply container configparameters selected by <i>CTIDgroup</i>. Now the only possiblevalue for <i>group</i> is <b>.startname</b>: to restore containername based on <b>NAME</b>variable in containerconfiguration file.</p>
<p style="margin-left:22%;">Right after <b>vzctl<=== I/b> hasstarted a container, it executes this script in a containercontext.</p>O scheduling ====
<p style="margin-left:11%;"><ib>CTID--ioprio</ib><bi>.stoppriority</bi></p>
<p style="margin-left:22%;">Right before Assigns disk I/O priority tocontainer. <i>Priority</i> range is <b>vzctl0-7</b> has. The greaterstopped a <i>priority</i> is, the more time for I/O activity container, it executes this script in a has. By default each containerhas <i>priority</i> ofcontext<b>4</b>.</p>
<p style="margin-left:11%;"><b>vps.umount--iolimit</b>,<i>CTIDlimit</i>[<b>.umountB</b>|<b>K</b>|<b>M</b>|<b>G</b>]</p>
<p style="margin-left:22%;">Global and per-CT umountAssigns disk I/O bandwidthscripts which are executed limit for a container before it . Value iseither a number with anunmountedoptional suffix, or a literal string <b>unlimited</b>. Scripts are executed in the host OS context,Valuewhile of <b>0</b> means &quot;unlimited&quot;. By default a CT is mountedcontainer has no I/O limit. Global script, if exists, Maximum allowed limit is executed2gigabytes per second; values exceeding the limit arefirsttruncated.</p>
<p style="margin-left:1122%;margin-top: 1em">If no suffix isprovided, the <i>limit</i> is assumed to be in megabytes persecond. Available suffixes are: <br>&bull; <b>b</b>, <b>B</b> -- bytes per second; <br>&bull; <b>k</b>, <b>vps.postumountK</b> -- kilobytes per second; <br>&bull; <b>m</b>,<b>M</b> -- megabytes per second (default);<ibr>&bull; <b>CTIDg</ib>, <b>.postumountG</b>-- gigabytes per second;</p>
<p style="margin-left:2211%;">Global and per-CT umountscripts which are executed for a container right after it isunmounted. Otherwise they are the same as <b>.umount--iopslimit</b>scripts.<i>iops</i></p>
<p style="margin-left:22%; margin-top: 1em">The environmentAssigns IOPS limit for apassed to all the <b>*mount<container, in number of input/b> scripts is the standardenvironment of the parent (i.eoutput operations per second. <b>vzctl</b>) with twoadditional variables: Value is a number or a literal string <b>$VEID</b> and <b>$VE_CONFFILEunlimited</b>.The first one holds the ID Value 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_ROOT0</b>, it needs to get thosemeans &quot;unlimited&quot;. By default afrom global and per-CT configuration filescontainer has no IOPS limit.</p>
<p style="margin-left:22%; margin-top: 1em">Here is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container(s). Script name can eitherbe <b>/etc/vz/conf/vps.mount</b> or<b>/etc/vz/conf/</b><i>CTID</i><b>.mount</b>.</p>== Suspending and resuming ===
<pre p style="margin-left:11%; margin-top: 1em"> # If one Checkpointing is a feature of these files does not exist then something # is really broken [ OpenVZ kernel which allows to save a complete in-f /etc/sysconfig/vz ] || exit 1kernel [ -f $VE_CONFFILE ] || exit 1 # Source both files. Note the order is important. . /etc/vz/vz.conf state of a running container, and to restore it later. $VE_CONFFILE mount -n --bind /mnt/disk $VE_ROOT/mnt/disk</prep>
<p style== DIAGNOSTICS =="margin-left:11%;"><b>suspend</b>|<b>chkpnt</b><i>CTID</i> [<b>--dumpfile</b> <i>name</i>]</p>
<p style="margin-left:1117%; margin">This command suspends acontainer to a dump file If an option <b>-top: 1em"-dumpfile</b>Returns 0 uponissuccessnot set, or an appropriate error code in case of andefault dump file nameerror:<b>/vz/dump/Dump.</b><i>CTID</i> is used.</p>
<table widthp style="100margin-left:11%;" border="0" rules="none" frame="void"><b>resume</b>|<b>restore</b> cellspacing="0" cellpadding="0"<i>CTID</i> [<b>--dumpfile<tr valign="top" align="left"/b><td width="11%"i>name</tdi>]<td width="4%"/p>
<pstyle="margin-left:17%;">1This command restores acontainer from the dump file created by the </pb>suspend</tdb><td width="7%">command.</tdp><td width=== Snapshotting ==="78%">
<p>Failed to set a UBC parameter</p></td></tr><tr valignstyle="margin-top" align="left: 1em">Snapshotting is a feature based<td width="11%">on checkpointing and ploop shapshots. It allows to save acomplete state of container file system. Plus, if thecontainer is running, it&rsquo;s in-memory state (as incheckpointing). Note that snapshot functionality is onlyworking for containers on ploop device.</td><td width="4%"p>
<pstyle="margin-left:11%;"><b>2snapshot</pb> <i>CTID</i>[<b>--id</b> <i>uuid</i>] [<b>--name</b> <i>name</tdi>][<b>--description<td width="7%"/b> <i>desc</tdi>] <br>[<b>--skip-suspend</b>] [<b>--skip-config</b>]<td width="78%"/p>
<p>Failed to set a fair scheduler parameter</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Creates a container snapshot,<td width="11%">i.e. saves the current container state, including its filesystem state, running processes state, and configurationfile.</td><td width="4%"p>
<p>3</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">If a containeris running, and <b>--skip-suspend</tdb>option is notspecified, a container is checkpointed and then restored,and CT memory dump becomes the part of snapshot.<td width="78%"/p>
<p>Generic system error</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">Unless<td width="11%"b>--skip-config</tdb>option is given, containerconfiguration file is saved to the snapshot.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">If <i>uuid</i>5is not specified, it is auto-generated. Options<b>--name</pb> and <b>--description</tdb>can be used tospecify the snapshot name and description, respectively.Name is displayed by <td width="7%"b>snapshot-list</tdb>.<td width="78%"/p>
<pstyle="margin-left:11%;"><b>snapshot-switch</b>The running kernel is not an OpenVZ kernel (or someOpenVZ modules are not loaded)<i>CTID</pi> [<b>--skip-resume</tdb> | <b>--must-resume</trb>][<b>--skip-config</b>] <tr valign="top" align="left"b><br>--id</b> <td width="11%"i>uuid</tdi><td width="4%"/p>
<p>6</p></td><td widthstyle="7margin-left:17%;">Switches the container to asnapshot identified by <i>uuid</tdi>, restoring its filesystem state, configuration (if available) and its runningstate (if available).<td width="78%"/p>
<p>Not enough system resources</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em"><td width="11%"b>Note thatthe current state of a container (including its file systemstate and its configuration file) is lost!</tdb><td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">7Option</pb>--skip-resume</tdb>is used to ignore a CT memory dump filein a snapshot, as a result the container will end up beingin a stopped state (same as if a snapshot has been takenwith <td width="7%"b>--skip-suspend</tdb>).<td width="78%"/p>
<p><b>ENV_CREATE</b> ioctl failed</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">If option<td width="11%"b>--must-resume</tdb>is set, absense of a memory dump istreated as an error, and the inability to restore from thememory dump is treated as an error rather than warning.<td width="4%"/p>
<p>8</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Option option<b>--skip-config</tdb>is used to ignore the CT configurationfile in a snapshot, i.e. the current configuration file willbe left as is.<td width="78%"/p>
<pstyle="margin-left:11%;">Command executed by <b>vzctl execsnapshot-delete</b> returned non-zeroexit code</pi>CTID</tdi></trb>--id<tr valign="top" align="left"/b><td width="11%"i>uuid</tdi><td width="4%"/p>
<p>9</p></td><td widthstyle="7margin-left:17%;">Removes a specifiedsnapshot.</td><td width="78%"p>
<pstyle="margin-left:11%;">Container is locked by another <b>vzctlsnapshot-mount</b>invocation<i>CTID</pi> <b> --id</tdb> <i>uuid</tri><tr valign="top" align="left"b>--target</b><td width="11%"i>directory</tdi><td width="4%"/p>
<pstyle="margin-left:17%;">10Mounts a snapshot specified by<i>uuid</i> to a <i>directory</i>. Note this mount isread-only.</p> <pstyle="margin-left:11%;"><b>snapshot-umount</tdb><td widthi>CTID</i> <b>--id</b> <i>uuid</i></p> <p style="7margin-left:17%;">Unmounts a specifiedsnapshot.</tdp> <td widthp style="78margin-left:11%;"><b>snapshot-list</b><i>CTID</i> [<b>-H</b>] [<b>-o</b><i>field</i>[,<i>field</i>...] [<b>--id</b> <i>uuid</i>]</p>
<p>Global OpenVZ configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]] notfound</p> </td></tr><tr valign="top" alignstyle="margin-left:17%;">List container&rsquo;s<td width="11%">snapshots.</td><td width="4%"p>
<p>11</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">A vzctl helper script file not foundYou 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>12</p></td><td width="7%"></td><td width="78%">= Performing container actions ===
<p>Permission denied</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>13</p></td><td width="72%"></td>
<td width="78%">
<pstyle="margin-top: 1em"><i>CTID</i>[<b>--ostemplate&nbsp;</b><i>name</i>][<b>--config&nbsp;</b><i>name</i>][<b>--layout&nbsp;simfs</b>|<b>ploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]][<b>--diskspace&nbsp;</b><i>kbytes</i>][<b>--diskinodes&nbsp;</b><i>num</i>][<b>--private&nbsp;</b><i>path</i>][<b>--root&nbsp;</b><i>path</i>][<b>--ipadd&nbsp;</b><i>addr</i>][<b>--hostname&nbsp;</b><i>Capability setting failedname</pi>][<b>--name&nbsp;</tdb><i>name</tri>][<b>--local_uid&nbsp;<tr valign="top" align="left"/b><i>uid</i>][<b>--local_gid&nbsp;</b><i>gid</i>]</p> </td width="11%"></tdtr><td width="4%"/table>
<p>14</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Creates a newcontainer area. This operation should be done once, beforethe first start of the container.</td><td width="78%"p>
<pstyle="margin-left:17%; margin-top: 1em">Container configuration file By default, anOS template denoted by <b>DEF_OSTEMPLATE</b> parameter of[[Man/ctidvz.conf.5|<b>ctidvz.conf</b>(5)]] notis used to create a container. This can befoundoverwritten by </pb> --ostemplate</tdb>option.</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">15By default, anew container configuration file is created from a sampleconfiguration denoted by value of </pb>CONFIGFILE</tdb>parameter of [[Man/vz.conf.5|<td width="7%"b>vz.conf</tdb>(5)]]. If the containerconfiguration file already exists, it will not bemodified.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Timeout on The value of<b>vzctl execCONFIGFILE</b>can be overwritten by using the</pb>--config</tdb></tri>name<tr valign="top" align="left"/i>option. This option can not be<td width="11%">used if the container configuration file already exists.</td><td width="4%"p>
<pstyle="margin-left:17%; margin-top: 1em">A new containercan either be created using <b>simfs</b> filesystem or on a<b>ploop</b> device. The default is set by value of<b>16VE_LAYOUT</pb> 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, one can additionally specify ploop disk imageformat after a colon. Possible ploop formats are<b>expanded</b>, <b>plain</b> and <b>raw</tdb>. Default is<td width="7%"b>expanded</b>. Using value other than <b>expanded</tdb>isnot recommended and is currently not supported.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Error during You can use<b>vzctl chkpnt--diskspace</b>and </pb>--diskinodes</td></trb>options to<tr valign="top" align="left">specify container file system size. Note that for<td width="11%"b>ploop</tdb>layout, you will not be able to change inodesvalue later.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">If<b>DISKSPACE</b> is not specified either in the sampleconfiguration file used for creation or in globalconfiguration file [[Man/vz.conf.5|<b>17vz.conf</pb>(5)]], <b>--diskspace</tdb>parameter is required for <td width="7%"b>ploop</tdb>layout.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Error during Suffixes<b>vzctl restoreG</b>, </pb>M</tdb>, </trb>K<tr valign="top" align="left"/b>can also be specified (see<td width="11%"b>Resource limits</tdb>section for more info onsuffixes).<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">18You can use<b>--root</pb> <i>path</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</tdb>(5)]] file).Argument can contain literal string <td width="7%"b>$VEID</tdb>, which willbe substituted with the numeric CT ID.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Error from You can use<b>setluid()--private</b> syscall<i>path</pi>option to set the path todirectory in which all the files and directories specific tothis very container are stored (default is </tdb>VE_PRIVATE</trb>specified in [[Man/vz.conf.5|<b>vz.conf<tr valign="top" align="left"/b>(5)]] file). Argument can containliteral string <td width="11%"b>$VEID</tdb>, which will be substituted withthe numeric CT ID.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">20You can use</pb>--ipadd</tdb><td width="7%"i>addr</tdi>option to assign an IP address toa container. Note that this option can be used multipletimes.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Invalid command line parameterYou can use</pb>--hostname</tdb></tri>name<tr valign="top" align="left"/i>option to set a host name for<td width="11%">a container.</td><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>21--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">Invalid value for command line parameter</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>22destroy</pb> | <b>delete</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<p style="margin-left:17%;">Removes a container privatearea by deleting all files, directories and theconfiguration file of this container.</p>Container root directory ( <p style="margin-left:11%;"><b>VE_ROOTstart</b>) not set<i>CTID</pi>[<b>--wait</tdb>] [<b>--force</trb>] [<b>--skip-fsck<tr valign="top" align="left"/b>][<td width="11%"b>--skip-remount</tdb>]<td width="4%"/p>
<pstyle="margin-left:17%;">Mounts (if necessary) andstarts a container. Unless <b>23--wait</pb> option isspecified, <b>vzctl</tdb>will return immediately; otherwisean attempt to wait till the default runlevel is reached willbe made by <td width="7%"b>vzctl</tdb>.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Container private directory (Specify<b>VE_PRIVATE--force</b>) notif you want to start a container which issetdisabled (see </pb> --disabled</tdb>).</tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"p>
<p>24</p></td><td widthstyle="7margin-left:17%; margin-top: 1em">Specify<b>--skip-fsck</tdb>to skip fsck for ploop-based containerfilesystem (this option is used by vz initscript).<td width="78%"/p>
<p>Container template directory (<b>TEMPLATE</b>) notset</p> </td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">By default, ifa container to be started happens to be already mounted, itis unmounted and mounted again. This behavior can be turnedoff by using <td width="11%"b>--skip-remount</tdb>flag.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">Note that thiscommand can lead to execution of <b>premount</b>,<b>28mount</pb> and <b>start</tdb>action scripts (see <b>ACTIONSCRIPTS<td width/b> below).</p> <p style="7margin-left:11%;"><b>stop</tdb> <i>CTID</i>[<b>--fast<td width="78%"/b>] [<b>--skip-umount</b>]</p>
<pstyle="margin-left:17%;">Stops a container and unmountsit (unless <b>Not all required UBC parameters are set--skip-umount</b> is given). Normally, unable to start<b>halt</b>(8) is executed inside a container; option</pb> --fast</tdb>makes </trb>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>29vzctl 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">OS template is not specified, unable Note that thiscommand can lead to createcontainerexecution of <b>stop</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%;">31<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%;">Container not Restarts a container, i.e.stops it if it is running, and starts again. Accepts all the</pb>start</tdb>and </trb>stop<tr valign="top" align="left"><td width="11%"/b>options.</td><td width="4%"p>
<p>32</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%;">Container already running</pb>status</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<p>33</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 stop container</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>34</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 add IP address to 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">40Fourth 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">Container not mountedFifth wordshows if the container is 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">41Sixth 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>Container already mounted</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%;">43</pb>mount</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Container Mounts container private area not found.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%;">44</pb>umount</tdb><td width="7%"i>CTID</tdi><td width="78%"/p>
<pstyle="margin-left:17%;">Container Unmounts container private area already exists. Note that this command can lead to execution of</pb>umount</tdb>and </trb>postumount<tr valign="top" align="left"/b>action scripts (see<td width="11%"b>ACTION SCRIPTS</tdb>below).<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">46Note that</pb>stop</tdb>does <td width="7%"b>umount</tdb>automatically.<td width="78%"/p>
<pstyle="margin-left:11%;"><b>Not enough disk spaceconvert</pb></tdi>CTID</tri>[<tr valign="top" align="left"b>--layoutploop</b>[<b>:<td width="11%"/b>{<b>expanded</b>|<b>plain</b>|<b>raw</tdb>}]]<td width="4%"/p>
<p>47</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%;">Bad/broken container (<b>/sbin/initcompact</b> or<bi>/bin/shCTID</bi> not found)</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%">
<p>48</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%;">Unable to create a new container private area</pb>quotaon</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">49Turn 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%;">Unable to create a new container root area</pb>quotaoff</tdb></tri>CTID<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">50Turn 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%;">Unable to mount container</pb>quotainit</td></trb><tr valign="top" align="left"i>CTID<td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">51Initialize 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%;">Unable to unmount container</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>52command</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%;">Unable to delete a container</pb>exec2</tdb></tri>CTIDcommand<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<pstyle="margin-left:17%;">53The same as </pb>exec</tdb>, butreturn code is that of <td width="7%"i>command</tdi>.<td width="78%"/p>
<pstyle="margin-left:11%;">Container private area not exist</pb>runscript</tdb></tri>CTIDscript<tr valign="top" align="left"><td width="11%"/i></td><td width="4%"p>
<p>60</p></td><td widthstyle="7margin-left:17%;">Run specified shell script inthe container. Argument <i>script</tdi>is a file on the hostsystem which contents is read by vzctl and executed in the<td width="78%">context of the container. For a running container, thecommand jumps into the container and executes the script.For a stopped container, it enters the container, mountscontainer&rsquo;s root filesystem, executes the script, andunmounts CT root. In the latter case, the container is notreally started, no file systems other than root (such as<p><b>vzquota on/proc</b> failed</p></td></tr>) are mounted, no startup scripts are executedetc. Thus the environment in which the script is running is<tr valign="top" align="left">far from normal and is only usable for very basic<td width="11%">operations.</td><td width="4%"p>
<pstyle="margin-left:11%;"><b>61enter</pb> <i>CTID</tdi>[<b>--exec</b> <i>command</i> [<td width="7%"i>arg</tdi>...]]<td width="78%"/p>
<p><b>vzquota init</b> failed</p></td></tr><tr valign="top" alignstyle="margin-left:17%;">Enters into a container (givinga container&rsquo;s root shell). This option is a back-doorfor host root only. The proper way to have CT root shell isto use <td width="11%"b>ssh</tdb>(1).<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">62Option<b>--exec</pb> is used to run <i>command</tdi>with argumentsafter entering into container. This is useful if command tobe run requires a terminal (so <td width="7%"b>vzctl exec</tdb>can not beused) and for some reason you can not use <b>ssh<td width="78%"/b>(1).</p>
<p><b>vzquota setlimit</b> failed</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">You need to logout manually from the shell to finish session (even if youspecified <td width="11%"b>--exec</tdb>).<td width="4%"/p>
<pstyle="margin-left:11%;"><b>63console</pb> <i>CTID</tdi>[<td width="7%"i>ttynum</tdi>]<td width="78%"/p>
<pstyle="margin-left:17%;">Attach to a container console.Optional <i>ttynum</i>Parameter argument is tty number (such as<b>DISKSPACE4</b> not setfor </pb>tty4</tdb>), default is </trb>1<tr valign="top" align="left"/b>which is usedfor container&rsquo;s <td width="11%"b>/dev/console</tdb>.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">64Note theconsoles are persistent, meaning that: </pbr>&bull; it can be attached to even if the container is notrunning; </tdbr>&bull; there is no automatic detachment upon the containerstop; <td width="7%"br>&bull; detaching from the console leaves anything running inthis console as is.</td><td width="78%"p>
<p>Parameter <b>DISKINODES</b> not set</p></td></tr><tr valignstyle="margin-left:17%; margin-top" align="left: 1em">The followingescape sequences are recognized by <td width="11%"b>vzctl console</tdb>.Note that these sequences are only recognized at thebeginning of a line.<td width="4%"/p>
<pstyle="margin-left:17%; margin-top: 1em">66&bull;</pb>Esc</tdb>then <td width="7%"b>.</tdb>to detach from the console.<td width="78%"/p>
<pstyle="margin-left:17%; margin-top: 1em">&bull;<b>vzquota offEsc</b> failedthen </pb>!</td></trb>to kill anything running on the<tr valign="top" align="left">console (SAK). This is helpful when one expects a login<td width="11%">prompt but there isn&rsquo;t one.</td><td width="4%"p>
<p>67</p></td><td width="7%"></td><td width="78%">= Other options ===
<p>ugid quota not initialized</p></td></tr><tr valign="top" alignstyle="margin-left:11%;"><td width="11%"b>--help</tdb><td width="4%"/p>
<p>71</p></td><td widthstyle="7margin-left:17%;">Prints help message with abrief list of possible options.</td><td width="78%"p>
<p>Incorrect IP address format</p></td></tr><tr valign="top" alignstyle="margin-left:11%;"><td width="11%"b>--version</tdb><td width="4%"/p>
<p>74</p></td><td widthstyle="7margin-left:17%;">Prints <b>vzctl</tdb>version.<td width="78%"/p>
<p>Error changing password</p></td></tr><tr valign="top" align="left"><td widthACTION SCRIPTS ="11%"></td><td width="4%">
<pstyle="margin-left:11%; margin-top: 1em"><b>vzctl</b>has an ability to execute user-defined scripts when aspecific <b>vzctl</b> command is run for a container. Thefollowing <b>vzctl</b> commands can trigger execution ofaction scripts: <b>start</b>, <b>stop</b>, <b>restart</b>,<b>mount</b> and <b>umount</b>.</p> <p style="margin-left:11%; margin-top: 1em">Action scriptsare located in the <b>/etc/vz/conf/</b> directory. There areglobal and per-CT scripts. Global scripts have a literalprefix of <b>vps.</b> and are executed for all containers.Per-CT scripts have a <i>CTID</i><b>.</b> numeric prefix andare executed for the given container only.</p> <p style="margin-left:11%; margin-top: 1em">Please notescripts are executed in a host system (CT0) context, withthe exception of <b>.start</b> and <b>.stop</b> scripts,which are executed in a container context.</p> <p style="margin-left:11%; margin-top: 1em">The followingaction scripts are currently defined: <b><br>vps.premount</b>, <i>CTID</i><b>.premount</b></p> <p style="margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container before it is mounted.Scripts are executed in the host system context, while a CTis not yet mounted or running. Global script, if exists, isexecuted first.</p> <p style="margin-left:11%;"><b>vps.mount</b>,<i>CTID</i><b>.mount</b></p> <p style="margin-left:22%;">Global and per-CT mount scriptswhich are executed for a container right after it ismounted. Otherwise they are the same as <b>.premount</b>scripts.</p> <p style="margin-left:11%;"><i>CTID</i><b>.start</b></p> <p style="margin-left:22%;">Right after <b>vzctl</b> hasstarted a container, it executes this script in a containercontext.</p> <p style="margin-left:11%;"><i>CTID</i><b>.stop</b></p> <p style="margin-left:22%;">Right before <b>vzctl</b> hasstopped a container, it executes this script in a containercontext.</p> <p style="margin-left:11%;"><b>vps.umount</b>,<i>CTID</i><b>.umount</b></p> <p style="margin-left:22%;">Global and per-CT umountscripts which are executed for a container before it isunmounted. Scripts are executed in the host system context,while a CT is mounted. Global script, if exists, is executedfirst.</p> <p style="margin-left:11%;"><b>vps.postumount</b>,<i>CTID</i><b>.postumount</b></p> <p style="margin-left:22%;">Global and per-CT umountscripts which are executed for a container right after it isunmounted. Otherwise they are the same as <b>.umount</b>scripts.</p> <p style="margin-left:11%; margin-top: 1em">The environmentpassed to all the <b>*mount</b> scripts is the standardenvironment of the parent (i.e. <b>vzctl</b>) with twoadditional variables: <b>$VEID</b> and <b>$VE_CONFFILE</b>.The first one holds the ID of the container, and the secondone holds the full path to the container configuration file.If the script needs to get other CT configurationparameters, such as <b>$VE_ROOT</b>, it needs to get thosefrom global and per-CT configuration files.</p> <p style="margin-left:11%; margin-top: 1em">Here is anexample of a mount script, which makes host system&rsquo;s/mnt/disk available to container(s). Script name can eitherbe <b>/etc/vz/conf/vps.mount</b> or<b>/etc/vz/conf/</b><i>CTID</i><b>.mount</b>.</p> <pre style="margin-left:11%; margin-top: 1em"> # If one of these files does not exist then something # is really broken [ -f /etc/vz/vz.conf ] || exit 1 [ -f $VE_CONFFILE ] || exit 1 # Source both files. Note the order is important. . /etc/vz/vz.conf . $VE_CONFFILE SRC=/mnt/disk DST=/mnt/disk mount -n -t simfs $SRC ${VE_ROOT}${DST} -o $SRC</pre> == EXIT STATUS == <p style="margin-left:11%; margin-top: 1em">Returns 0 uponsuccess, or an appropriate error code in case of anerror:</p> <table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>1</p></td><td width="7%"></td><td width="78%"> <p>Failed to set a UBC parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>2</p></td><td width="7%"></td><td width="78%"> <p>Failed to set a fair scheduler parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>3</p></td><td width="7%"></td><td width="78%"> <p>Generic system error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>5</p></td><td width="7%"></td><td width="78%"> <p>The running kernel is not an OpenVZ kernel (or someOpenVZ modules are not loaded)</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>6</p></td><td width="7%"></td><td width="78%"> <p>Not enough system resources</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>7</p></td><td width="7%"></td><td width="78%"> <p><b>ENV_CREATE</b> ioctl failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>8</p></td><td width="7%"></td><td width="78%"> <p>Command executed by <b>vzctl exec</b> returned non-zeroexit code</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>9</p></td><td width="7%"></td><td width="78%"> <p>Container is locked by another <b>vzctl</b>invocation</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>10</p></td><td width="7%"></td><td width="78%"> <p>Global OpenVZ configuration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]] notfound</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>11</p></td><td width="7%"></td><td width="78%"> <p>A vzctl helper script file not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>12</p></td><td width="7%"></td><td width="78%"> <p>Permission denied</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>13</p></td><td width="7%"></td><td width="78%"> <p>Capability setting failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>14</p></td><td width="7%"></td><td width="78%"> <p>Container configuration file [[Man/ctid.conf.5|<b>ctid.conf</b>(5)]] notfound</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>15</p></td><td width="7%"></td><td width="78%"> <p>Timeout on <b>vzctl exec</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>16</p></td><td width="7%"></td><td width="78%"> <p>Error during <b>vzctl suspend</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>17</p></td><td width="7%"></td><td width="78%"> <p>Error during <b>vzctl resume</b></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>18</p></td><td width="7%"></td><td width="78%"> <p>Error from <b>setluid()</b> syscall</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>20</p></td><td width="7%"></td><td width="78%"> <p>Invalid command line parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>21</p></td><td width="7%"></td><td width="78%"> <p>Invalid value for command line parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>22</p></td><td width="7%"></td><td width="78%"> <p>Container root directory (<b>VE_ROOT</b>) not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>23</p></td><td width="7%"></td><td width="78%"> <p>Container private directory (<b>VE_PRIVATE</b>) notset</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>24</p></td><td width="7%"></td><td width="78%"> <p>Container template directory (<b>TEMPLATE</b>) notset</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>28</p></td><td width="7%"></td><td width="78%"> <p>Not all required UBC parameters are set, unable to startcontainer</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>29</p></td><td width="7%"></td><td width="78%"> <p>OS template is not specified, unable to createcontainer</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>31</p></td><td width="7%"></td><td width="78%"> <p>Container not running</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>32</p></td><td width="7%"></td><td width="78%"> <p>Container already running</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>33</p></td><td width="7%"></td><td width="78%"> <p>Unable to stop container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>34</p></td><td width="7%"></td><td width="78%"> <p>Unable to add IP address to container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>40</p></td><td width="7%"></td><td width="78%"> <p>Container not mounted</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>41</p></td><td width="7%"></td><td width="78%"> <p>Container already mounted</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>43</p></td><td width="7%"></td><td width="78%"> <p>Container private area not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>44</p></td><td width="7%"></td><td width="78%"> <p>Container private area already exists</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>46</p></td><td width="7%"></td><td width="78%"> <p>Not enough disk space</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>47</p></td><td width="7%"></td><td width="78%"> <p>Bad/broken container (<b>/sbin/init</b> or<b>/bin/sh</b> not found)</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>48</p></td><td width="7%"></td><td width="78%"> <p>Unable to create a new container private area</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>49</p></td><td width="7%"></td><td width="78%"> <p>Unable to create a new container root area</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>50</p></td><td width="7%"></td><td width="78%"> <p>Unable to mount container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>51</p></td><td width="7%"></td><td width="78%"> <p>Unable to unmount container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>52</p></td><td width="7%"></td><td width="78%"> <p>Unable to delete a container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>53</p></td><td width="7%"></td><td width="78%"> <p>Container private area not exist</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>60</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota on</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>61</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota init</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>62</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota setlimit</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>63</p></td><td width="7%"></td><td width="78%"> <p>Parameter <b>DISKSPACE</b> not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>64</p></td><td width="7%"></td><td width="78%"> <p>Parameter <b>DISKINODES</b> not set</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>65</p></td><td width="7%"></td><td width="78%"> <p>Error setting in-container disk quotas</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>66</p></td><td width="7%"></td><td width="78%"> <p><b>vzquota off</b> failed</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>67</p></td><td width="7%"></td><td width="78%"> <p>ugid quota not initialized</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>71</p></td><td width="7%"></td><td width="78%"> <p>Incorrect IP address format</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>74</p></td><td width="7%"></td><td width="78%"> <p>Error changing password</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>78</p></td><td width="7%"></td><td width="78%"> <p>IP address already in use</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>79</p></td><td width="7%"></td><td width="78%"> <p>Container action script returned an error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>82</p></td><td width="7%"></td><td width="78%"> <p>Config file copying error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>86</p></td><td width="7%"></td><td width="78%"> <p>Error setting devices (<b>--devices</b> or<b>--devnodes</b>)</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>89</p></td><td width="7%"></td><td width="78%"> <p>IP address not available</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>91</p></td><td width="7%"></td><td width="78%"> <p>OS template not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>99</p></td><td width="7%"></td><td width="78%"> <p>Ploop is not supported by either the running kernel orvzctl.</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>100</p></td><td width="7%"></td><td width="78%"> <p>Unable to find container IP address</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>104</p></td><td width="7%"></td><td width="78%"> <p><b>VE_NETDEV</b> ioctl error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>105</p></td><td width="7%"></td><td width="78%"> <p>Container start disabled</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>106</p></td><td width="7%"></td><td width="78%"> <p>Unable to set iptables on a running container</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>107</p></td><td width="7%"></td><td width="78%"> <p>Distribution-specific configuration file not found</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>109</p></td><td width="7%"></td><td width="78%"> <p>Unable to apply a config</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>129</p></td><td width="7%"></td><td width="78%"> <p>Unable to set meminfo parameter</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>130</p></td><td width="7%"></td><td width="78%"> <p>Error setting veth interface</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>131</p></td><td width="7%"></td><td width="78%"> <p>Error setting container name</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>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>IP address already in use</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>79139</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container action script returned an errorError saving container configuration file</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>82148</p></td>
<td width="7%"></td>
<td width="78%">
<p>Config file copying error</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>86</p></td><td width="7%"></td><td width="78%"> <p>Error setting devices container IO parameters (<b>--devices</b> or<b>--devnodes</b>ioprio)</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>89</p></td><td width="7%"></td><td width="78%"> <p>IP address not available</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>91</p></td><td width="7%"></td><td width="78%"> <p>OS template not found</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>100150</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to find container IP addressPloop image file not found</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>104151</p></td>
<td width="7%"></td>
<td width="78%">
<p><b>VE_NETDEV</b> ioctl errorError creating ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>105152</p></td>
<td width="7%"></td>
<td width="78%">
<p>Container start disabledError mounting ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>106153</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to set iptables on a running containerError unmounting ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>107154</p></td>
<td width="7%"></td>
<td width="78%">
<p>Distribution-specific configuration file not foundError resizing ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>109155</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable Error converting container to apply a configploop layout</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>129156</p></td>
<td width="7%"></td>
<td width="78%">
<p>Unable to set meminfo parameterError creating ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>130157</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting veth interfacemerging ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>131158</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting container namedeleting ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>133159</p></td>
<td width="7%"></td>
<td width="78%">
<p>Waiting for container start failedError switching ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>139166</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error saving container configuration filecompacting ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>148167</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error setting container IO parameters (ioprio)listing ploop snapsots</p></td></tr>
</table>
== FILES ==
<p pre style="margin-left:11%; margin-top: 1em">/etc/vz/vz.conf<br>/etc/vz/conf/<i>CTID</i>.conf <br>/etc/vz/conf/vps.{premount,mount,umount,postumount} <br> 
/etc/vz/conf/<i>CTID</i>.{premount,mount,start,stop,umount,postumount}
<br>/proc/vz/veinfo <br>/proc/vz/vzquota <br>/proc/user_beancounters <br>/proc/bc/* <br>/proc/fairsched</ppre>
== SEE ALSO ==
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2000-20112013, Parallels, Inc. Licensed under GNU GPL.</p>
2,253
edits

Navigation menu