Changes

Jump to: navigation, search

Man/vzctl.8

13,737 bytes added, 18:21, 23 April 2015
Automated import of articles *** existing text overwritten ***
<p>[<i>flags</i>] <b>start</b> <i>CTID</i> [<b>--wait</b>]
[<b>--force</b>] [<b>--skip-fsck</b>][<b>--skip-remount</b>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>stop</b> <i>CTID</i>[<b>--fast</b>][<b>--fastskip-umount</b>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<p>[<i>flags</i>] <b>restart</b> <i>CTID</i>
[<b>--wait</b>] [<b>--force</b>] [<b>--fast</b>][<b>--skip-fsck</b>] [<b>--skip-remount</b>]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>chkpntsuspend</b> | <b>restoreresume</b><i>CTID</i> [<b>--dumpfile&nbsp;</b><i>name</i>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>snapshot</b> <i>CTID</i>
[<b>--id&nbsp;</b><i>uuid</i>]
[<b>--name&nbsp;</b><i>name</i>]
[<b>--description&nbsp;</b><i>desc</i>]
[<b>--skip-suspend</b>] [<b>--skip-config</b>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>snapshot-switch</b> <i>CTID</i>[<b>--skip-resume</b> |<b>--must-resume</b>][<b>snapshot-delete -skip-config</b>] <b>--id</b> <i>uuid</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>snapshot-listdelete</b> <i>CTID</i><b>--id</b> <i>uuid</i></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>setsnapshot-mount</b> <i>CTID --parameter value</i>[...] [<b>--saveid</b>] [<bi>--forceuuid</bi>] [<b>--reset_ubtarget</b>][<bi>--setmode&nbsp;restartdir</b>|<b>ignore</bi>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>destroy</b> | <b>delete</b> |<b>mount</b> | <b>snapshot-umount</b> | <bi>statusCTID</bi> |<b>quotaon--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>consolesnapshot-list</b> <i>CTID</i>[<b>-H</b>] [<b>-o</b> <i>field</i>[,<i>field</i>...][<b>--id</b> <i>ttynumuuid</i>]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>convertset</b> <i>CTID--parameter value</i>[...] [<b>--layout&nbsp;ploopsave</b>] [<b>:--force</b>{][<b>expanded--setmode&nbsp;restart</b>|<b>plainignore</b>|<b>raw</b>}]]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>exec</b> | <b>exec2set</b> <i>CTIDcommand</i> [<ib>arg--reset_ub</ib> ...]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>enterdestroy</b> | <ib>delete</b> |<b>mount</b> | <b>umount</b> | <b>CTIDstatus</ib>|[<b>--exec&nbsp;quotaon</b> | <b>quotaoff</b>| <ib>command&nbsp;quotainit</ib>[<i>arg&nbsp;CTID</i>...]]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>runscriptconsole</b> <i>CTID script</i>[<i>ttynum</i>]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="80%">
<p>[<i>flags</i>] <b>convert</b> <i>CTID</i>[<b>--helplayout&nbsp;ploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b> | <b>--versionraw</b>}]]</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>[<i>flags</i>] <b>compact</b> <i>CTID</i></p></td></tr><tr valign="top" align="margin-left:11%; margin-top: 1em">Utility<btd width="11%">vzctl</btd> runs on the host system (otherwise known asHardware Node, or HN) and performs direct manipulations withcontainers (CTs).</ptd 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>exec</b> | <b>exec2</b> <i>CTIDcommand</i> [<i>arg</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>enter</b> <i>CTID</i>[<b>--exec&nbsp;</b><i>command, and can be used with any command&nbsp;</i>[<i>arg&nbsp;</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="margin-left:17%;">Disables output. Note thatscripts run by vzctl are still able to produce someoutput.</p> [<p style="margin-left:11%;"i><b>--verboseflags</bi></p> <p style="margin-left:17%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of ] <b>VERBOSErunscript</b> parameter in theglobal configuration file [[Man/vz.conf.5|<bi>vz.confCTID script</b>(5)]], or to <bi>0</bp>if not set by <b>VERBOSE</btd> parameter.</p> === Setting container parameters === <table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="47%">
<p style="margin-top: 1em"><b>setvzctl</b></p></td>
<td width="2%"></td>
<td width="8380%">
<p style="margin-top: 1em"><ib>CTID--help</ib>[| <b>--onboot&nbsp;yesversion</b>|<b/p>no</btd>][<b>--bootorder&nbsp;<</btr><i>number</itable>][== DESCRIPTION == <b>p style="margin-left:11%; margin-root&nbsp;top: 1em">Utility</b><i>pathvzctl</ib>]runs on the host system (otherwise known as[<b>--private&nbsp;Hardware Node, or HN) and performs direct manipulations withcontainers (CTs).</bp><i>path</i>][<b>p style="margin-left:11%; margin-userpasswd&nbsp;</btop: 1em">Containers canbe referred to by either numeric <i>userCTID</i>:or by name (see<ib>pass--name</i>][<b>--disabledoption). Note that CT ID &nbsplt;yes= 100 arereserved for OpenVZ internal purposes. A numeric ID shouldnot be more than </b>|2147483644</b>no.</bp>][== OPTIONS == === Flags === <bp style="margin-top: 1em">--name&nbsp;These flags come before acommand, and can be used with any command. They affectlogging to console (terminal) only, and do not affectlogging to a log file.</bp> <i>name</ip style="margin-left:11%;">][<b>--description&nbsp;quiet</b><i>string</ip>][<b>p style="margin--ipadd&nbspleft:17%;</b"><i>addrDisables output. Note thatscripts run by vzctl are still able to produce someoutput.</ip>][<b>p style="margin--ipdel&nbspleft:11%;"></b><i>addr--verbose</i>|<b>all</bp>][<b>p style="margin--hostname&nbspleft:17%;">Increments logging level upfrom the default. Can be used multiple times. Default valueis set to the value of </b>VERBOSE<i/b>name</i>]parameter in theglobal configuration file [[Man/vz.conf.5|<b>--nameserver&nbsp;vz.conf</b><i(5)]], or to <b>addr0</ib>][if not set by <b>--searchdomain&nbsp;VERBOSE</b><i>nameparameter.</ip>][<b>--netif_add&nbsp;=== Setting container parameters === </b><i>dev</itable width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0">[,<itr valign="top" align="left"><td width="11%">params</itd>...]][<btd width="4%"<p style="margin--netif_del&nbsp;top: 1em"><b>set</b><i/p>dev</itd>|<btd width="2%">all</btd>][<btd width="83%"<p style="margin--ifname</btop: 1em"> <i>devCTID</i>[<b>--maconboot&nbsp;yes</b>|<ib>hwaddrno</ib>][<b>--host_ifnamebootorder&nbsp;</b><i>devnumber</i>][<b>--host_macroot&nbsp;</b><i>hwaddrpath</i>][<b>--bridgeprivate&nbsp;</b><i>namepath</i>][<b>--mac_filtermount_opts&nbsp;on</b>|<bi>offoptions</bi>]][<b>--numprocuserpasswd&nbsp;</b><i>itemsuser</i>:<i>pass</i>][<b>--numtcpsockdisabled&nbsp;yes</b>|<ib>itemsno</ib>][<b>--numothersockname&nbsp;</b><i>itemsname</i>][<b>--vmguarpagesdescription&nbsp;</b><i>pagesstring</i>][<b>--kmemsizeostemplate&nbsp;</b><i>bytesstring</i>][<b>--tcpsndbufstop-timeout&nbsp;</b><i>bytesseconds</i>][<b>--tcprcvbufipadd&nbsp;</b><i>bytesaddr</i>][<b>--othersockbufipdel&nbsp;</b><i>bytesaddr</i>|<b>all</b>][<b>--dgramrcvbufhostname&nbsp;</b><i>bytesname</i>][<b>--oomguarpagesnameserver&nbsp;</b><i>pagesaddr</i>][<b>--lockedpagessearchdomain&nbsp;</b><i>pagesname</i>][<b>--privvmpagesnetif_add&nbsp;</b><i>pagesdev</i>[,<i>params</i>...]][<b>--shmpagesnetif_del&nbsp;</b><i>pagesdev</i>|<b>all</b>][<b>--numfile&nbsp;ifname</b><i>itemsdev</i>][<b>--numflockmac&nbsp;</b><i>itemshwaddr</i>][<b>--numptyhost_ifname&nbsp;</b><i>itemsdev</i>][<b>--numsiginfohost_mac&nbsp;</b><i>itemshwaddr</i>][<b>--dcachesizebridge&nbsp;</b><i>bytesname</i>][<b>--numiptentmac_filter&nbsp;on</b>|<ib>numoff</ib>]][<b>--physpagesnumproc&nbsp;</b><i>pagesitems</i>][<b>--swappagesnumtcpsock&nbsp;</b><i>pagesitems</i>][<b>--ramnumothersock&nbsp;</b><i>bytesitems</i>][<b>--swapvmguarpages&nbsp;</b><i>bytespages</i>][<b>--cpuunitskmemsize&nbsp;</b><i>numbytes</i>][<b>--cpulimittcpsndbuf&nbsp;</b><i>numbytes</i>][<b>--cpustcprcvbuf&nbsp;</b><i>numbytes</i>][<b>--cpumaskothersockbuf&nbsp;</b><i>cpusbytes</i>|][<b>all--dgramrcvbuf&nbsp;</b><i>bytes</i>][<b>--meminfooomguarpages&nbsp;none</b>|<i>mode</i>:<i>valuepages</i>][<b>--iptableslockedpages&nbsp;</b><i>namepages</i>[<b>,</b>...]][<b>--netdev_addprivvmpages&nbsp;</b><i>ifnamepages</i>][<b>--netdev_delshmpages&nbsp;</b><i>ifnamepages</i>][<b>--diskquotanumfile&nbsp;yes</b>|<bi>noitems</bi>][<b>--diskspacenumflock&nbsp;</b><i>numitems</i>][<b>--diskinodesnumpty&nbsp;</b><i>numitems</i>][<b>--quotatimenumsiginfo&nbsp;</b><i>secondsitems</i>][<b>--quotaugidlimitdcachesize&nbsp;</b><i>numbytes</i>][<b>--noatimenumiptent&nbsp;yes</b>|<bi>nonum</bi>][<b>--capabilityphyspages&nbsp;</b><i>capnamepages</i>:][<b>on--swappages&nbsp;</b>|<bi>offpages</b>[<bi>,</b>...]][<b>--devnodesram&nbsp;</b><i>parambytes</i>][<b>--devicesswap&nbsp;</b><i>parambytes</i>][<b>--pci_addvm_overcommit&nbsp;</b><i>devfloat</i>][<b>--pci_delcpuunits&nbsp;</b><i>devnum</i>][<b>--featurescpulimit&nbsp;</b><i>namenum</i>:][<b>on--cpus&nbsp;</b>|<bi>offnum</bi>][<b>,--cpumask&nbsp;</b>...]][<i>cpus</i>|<b>--applyconfig&nbsp;auto</b>|<ib>nameall</ib>][<b>--applyconfig_mapnodemask&nbsp;</b><i>groupnodes</i>|<b>all</b>][<b>--iopriomeminfo&nbsp;none</b>|<i>nummode</i>] [:<bi>--savevalue</bi>][<b>--forceiptables&nbsp;</b>] <i>name</i>[<b>--reset_ub,</b>...]][<b>--setmodenetfilter&nbsp;restartdisabled</b>|<b>ignorestateless</b>]|</pb> stateful</tdb>|</trb>full<tr valign="top" align="left"/b>][<td width="11%"b>--netdev_add&nbsp;</tdb><td width="4%"i>ifname</tdi>][<td width="2%"b>--netdev_del&nbsp;</tdb><td width="83%"> i>ifname<p/i>This command sets various container parameters. If the]container is currently running, [<b>vzctl--diskquota&nbsp;yes</b> applies theseparameters to the container. The following options can beused with |<b>setno</b> command.][</pb>--diskspace&nbsp;</tdb></tri>num</tablei>] ==== Flags ==== <p style="margin-left:11%;">[<b>--savediskinodes&nbsp;</b><i>num</pi>] [<p style="marginb>--left:17%quotatime&nbsp;"</b>If this flag is given,parameters are saved in container configuration file<i>seconds</i>][[Man/ctid.conf.5|<b>ctid.conf--quotaugidlimit&nbsp;</b>(5)]].<i>num</pi>] <p style="margin-left:11%;">[<b>--forcecapability&nbsp;</b><i>capname</pi<p style="margin-left:17%;">If this flag is given togetherwith <b>--saveon</b>, parameters are saved even if the currentkernel doesn&rsquo;t support OpenVZ.|<b>off</p> <p style="margin-left:11%;"b>[<b>--reset_ub,</b>...]][</pb<p style="margin-left:17%-devnodes&nbsp;">If this flag is given,</b>vzctl<i>param</bi> 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 not compatible with [<b>--save<devices&nbsp;</b>,<i>param</i>]and it is usually a bad idea to combine it with any otheroptions.[<b>--pci_add&nbsp;</b><i>dev</i>][<b>--pci_del&nbsp;</b><i>dev</i>][<b>--features&nbsp;</b><i>name</i>:<b>on</b>|<b>off</b>[<b>,</b>...]][<b>--applyconfig&nbsp;</b><i>name</i>][<b>--applyconfig_map&nbsp;</b><i>group</i>][<b>--ioprio&nbsp;</b><i>num</i>][<b>--iolimit&nbsp;</b><i>mbps</i>][<b>--iopslimit&nbsp;</b><i>iops</i>] [<b>--save</b>][<b>--force</b>] [<b>--reset_ub</b>][<b>--setmode&nbsp;restart</b>|<b>ignore</b>]</p> </td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"></td><td width="2%"></td><td width="83%">
<p>This command sets various container parameters. If thecontainer is currently running, <b>vzctl</b> applies theseparameters to the container. The following options can beused with <b>set</b> command.</p></td></tr></table> ==== Flags ==== <p style="margin-left:11%;"><b>--save</b></p> <p style="margin-left:17%;">If this flag is given,parameters are saved in container configuration file[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]].</p> <p style="margin-left:11%;"><b>--force</b></p> <p style="margin-left:17%;">If this flag is given togetherwith <b>--save</b>, parameters are saved even if the currentkernel doesn&rsquo;t support OpenVZ. Note this flag does notmake sense without <b>--save</b>, so <b>--save</b> isrequired.</p> <p style="margin-left:11%;"><b>--reset_ub</b></p> <p style="margin-left:17%;">If this flag is given,<b>vzctl</b> applies all User Beancounter parameters fromthe configuration file to a running container. This ishelpful in case configuration file is modified manually.Please note this flag is exclusive, i.e. it can not becombined with any other options or flags.</p> <p style="margin-left:11%;"><b>--setmode restart</b> |<b>ignore</b></p>
<p style="margin-left:17%;">A few parameters can only be
applied by restarting the container. By default,
<b>vzctl</b> warns prints a warning if such parameters are present supplied and acontainer is running. Use <b>--setmode restart</b> together with <b>--save</b> flag torestart a container in such a case, or <b>--setmodeignore</b> to suppress the above mentioned warning.</p>
==== Miscellaneous ====
<p style="margin-left:17%;">Sets whether the container will
be started during system boot. The container will not bestartedauto-started unless on boot by <b>vz</b> initscript if either this parameter is set to <b>yes</b>, or the container was running just beforelast reboot, and this parameter is not set to <b>no</b>.Default value is unset, meaning the container will bestarted if it was running before the last reboot.</p>
<p style="margin-left:11%;"><b>--bootorder</b>
stored. Argument can contain literal string <b>$VEID</b>,
which will be substituted with the numeric CT ID.</p>
 
<p style="margin-left:11%;"><b>--mount_opts</b>
<i>option</i>[<b>,</b><i>option</i>...]</p>
 
<p style="margin-left:17%;">Sets additional mount options
for container file system. Only applicable for <b>ploop</b>
layout, ignored otherwise.</p>
<p style="margin-left:11%;"><b>--userpasswd</b>
exists. Note that this option is not saved in configuration
file at all (so <b>--save</b> flag is useless), it is
applied directly to the container (, by modifying its /etc/passwd andrunning/etc/shadow files)distribution-specific programs inside the container. It isnot recommended to combine this option with any otheroptions.</p>
<p style="margin-left:17%; margin-top: 1em">In case
container root filesystem is was not mountedrunning, it isautomatically mounted, started then all the appropriate file changesare applied, then it is unmountedstopped.</p>
<p style="margin-left:17%; margin-top: 1em">Note that
<p style="margin-left:17%;">Add a name for a container. The
<i>name</i> can later be used in subsequent calls to
<b>vzctl</b> in place of <i>CTID</i>. Note this option cannot be used without <b>--save</b>.</p>
<p style="margin-left:11%;"><b>--description</b>
container.</p>
<p style==== Networking ===="margin-left:11%;"><b>--ostemplate</b><i>string</i></p>
<p style="margin-left:17%;">Sets a new value of<b>OSTEMPLATE</b> parameter in container configuration file[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]]. Requires <b>--save</b> flag. Usefulafter a change/upgrade of a distribution running insidecontainer, as vzctl uses the value of OSTEMPLATE to rundistribution-specific scripts.</p> <p style="margin-left:11%;"><b>--stop-timeout</b><i>seconds</i></p> <p style="margin-left:17%;">Sets a time to wait forcontainer to stop on <b>vzctl stop</b> before forciblykilling it, in seconds. Note this option can not be usedwithout <b>--save</b> flag.</p> <p style="margin-left:17%; margin-top: 1em">Special valueof <b>0</b> means to use compiled-in default.</p> ==== Networking ==== <p style="margin-left:11%;"><b>--ipadd</b> <i>addr</i></p>
<p style="margin-left:17%;">Adds an IP address <i>addr</i>
server values set in previous calls to <b>vzctl</b> are
overwritten.</p>
 
<p style="margin-left:17%; margin-top: 1em">A special value
of <b>inherit</b> can be used to auto-propagate nameserver
value(s) from the host system&rsquo;s
<b>/etc/resolv.conf</b> file.</p>
<p style="margin-left:11%;"><b>--searchdomain</b>
search domain values set in previous calls to <b>vzctl</b>
are overwritten.</p>
 
<p style="margin-left:17%; margin-top: 1em">A special value
of <b>inherit</b> can be used to auto-propagate search
domain value(s) from the host system&rsquo;s
<b>/etc/resolv.conf</b> file.</p>
<p style="margin-left:11%;"><b>--netif_add</b>
&bull; <b>P</b>, <b>p</b> - memory pages (arch-specific,
usually 4KB); <br>
&bull; <b>B</b>, <b>b</b> - bytes(this is the default). <b><br>
--ram</b> <i>bytes</i></p>
container. Actually, the option is a shortcut for setting
<b>--swappages</b> limit (the barrier is set to 0).</p>
 
<p style="margin-left:11%;"><b>--vm_overcommit</b>
<i>float</i></p>
 
<p style="margin-left:22%;">Set VM overcommitment value to
<i>float</i>. If set, it is used to calculate
<b>privmmpages</b> parameter in case it is not set
explicitly (see below). Default value is <b>0</b>, meaning
unlimited privvmpages.</p>
 
<p style="margin-left:11%; margin-top: 1em"><b>vzctl</b>
checks if running kernel is VSwap capable, and refuses to
use these parameters otherwise. This behavior can be
overriden by using <b>--force</b> flag before
parameters.</p>
 
<p style="margin-left:11%; margin-top: 1em">In VSwap mode,
all beancounters other than RAM and swap become optional.
Note though that if some optional beancounters are not set,
they are calculated and set by vzctl implicitly, using the
following formulae:</p>
 
<p style="margin-left:11%; margin-top: 1em"><b>&bull;
lockedpages.barrier = oomguarpages.barrier = ram</b></p>
 
<p style="margin-left:11%; margin-top: 1em"><b>&bull;
lockedpages.limit = oomguarpages.limit = unlimited</b></p>
 
<p style="margin-left:11%; margin-top: 1em"><b>&bull;
vmguarpages.barrier = vmguarpages.limit = ram + swap</b></p>
 
<p style="margin-left:11%; margin-top: 1em"><b>&bull;
privvmpages.barrier = privvmpages.limit = (ram + swap) *
vm_overcommit</b></p>
 
<p style="margin-left:11%; margin-top: 1em">(if
<b>vm_overcommit</b> is <b>0</b> or not set,
<b>privvmpages</b> is set to &quot;unlimited&quot;)</p>
<p style="margin-left:11%; margin-top: 1em">Here is an
<p style="margin-left:11%;"><b>--cpumask</b> <i>cpus</i> |
<b>auto</b> | <b>all</b></p>
<p style="margin-left:22%;">sets Sets list of allowed CPUs for
the container. Input format is a comma-separated list of
decimal numbers and /or ranges. Consecutively set bits are shownas two hyphen-separated decimal numbers, the smallest andlargest bit numbers set in the range. For example, if youwant the container to execute on CPUs 0, 1, 2, 7, you shouldpass <b>0-2,7</b>. Default value is <b>all</b> (thecontainer can execute on any CPU). If used with the<b>--nodemask</b> option, value of <b>auto</b> assigns allCPUs from the specified NUMA node to a container.</p> <p style="margin-left:11%;"><b>--nodemask</b> <i>nodes</i>| <b>all</b></p> <p style="margin-left:22%;">Sets list of allowed NUMA nodesfor the container. Input format is the same as for<b>--cpumask</b>. Note that <b>--nodemask</b> must be usedwith the <b>--cpumask</b> option.</p>
==== Memory output parameters ====
<b>privvmpages:1</b>.</p>
==== Netfilter (iptables ) control parameters ==== <p style="margin-left:11%;"><b>--netfilter&nbsp;disabled</b>|<b>stateless</b>|<b>stateful</b>|<b>full</b></p> <p style="margin-left:22%;">Restrict access tonetfilter/iptables modules for a container. This optionreplaces obsoleted <b>--iptables</b>.</p>
<p style="margin-left:1122%;margin-top: 1em">Note thatchanging this parameter requires container restart, soconsider using <b>--iptables</b><i>name</i>[<b>,setmode</b>option...]</p>
<p style="margin-left:22%;margin-top: 1em">Allow to use the functionalityThe followingof arguments can be used: <ib>name</ibr> iptables module inside the container.Multiple comma-separated <i>name&bull; disabled</ib>s can be specified.</p>
<p style="margin-left:2232%; margin-top: 1em">The defaultlist of enabled iptables no modules is defined by the<b>IPTABLES</b> variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]].are allowed</p>
<p style="margin-left:22%;"><b>&bull; stateless</b></p> <p style="margin-left:32%;">all modules except NAT andconntracks are allowed (i.e. filter and mangle); this is thedefault</p> <p style="margin-left:22%;"><b>&bull; stateful</b></p> <p style="margin-left:32%;">all modules except NAT areallowed</p> <table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="22%"></td><td width="9%"> <p><b>&bull; full</b></p></td><td width="1%"></td><td width="36%"> <p>all modules are allowed</p></td><td width="32%"></td></tr></table> <p style="margin-left:11%;"><b>--iptables</b><i>name</i>[<b>,</b>...]</p> <p style="margin-left:22%;"><b>Note</b> this option isobsoleted, <b>--netfilter</b> should be used instead.</p> <p style="margin-left:22%; margin-top: 1em">Allow to usethe functionality of <i>name</i> iptables module inside thecontainer. Multiple comma-separated <i>name</i>s can bespecified.</p> <p style="margin-left:22%; margin-top: 1em">The defaultlist of enabled iptables modules is defined by the<b>IPTABLES</b> variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]].</p> <p style="margin-left:22%; margin-top: 1em">You can use thefollowing values for <i>name</i>: <b>iptable_filter</b>,
<b>iptable_mangle</b>, <b>ipt_limit</b>,
<b>ipt_multiport</b>, <b>ipt_tos</b>, <b>ipt_TOS</b>,
<p style="margin-left:22%;">For <b>simfs</b> layout, sets
soft and hard disk quota limits, in blocks. First parameteris soft limit, second is hard limit. One block is currentlyequal to 1Kb.</p>
<p style="margin-left:22%; margin-top: 1em">For
<b>ploop</b> layout, sets initiates the size procedure of resizing the ploop image fileto the new size. Since there is nosoft/hard limit concept in ploop, second <i>num</i>, ifspecified,is ignored.</p> <p style="margin-left:22%; margin-top: 1em">By default,ploop resize is done online, i.e. on a mounted ploop. Thisis a preferred way of doing resize. Although, in kilobytesa rare casea container was using lots of disk space and should now beresized to a much smaller size, an offline resize might bemore appropriate. In this case, make sure the container isstopped and unmounted and use additional<b>--offline-resize</b> option</p> <p style="margin-left:22%; margin-top: 1em">Note that ploopresize is NOT performed on container start, so forconsistency <b>--diskspace</b> must be used together with<b>--save</b> flag.</p>
<p style="margin-left:22%; margin-top: 1em">Suffixes
<b>G</b>, <b>M</b>, <b>K</b> can also be specified (see
<b>Resource limits</b> section for more info onsuffixes).If suffix is not specified, value is in kilobytes.</p>
<p style="margin-left:11%;"><b>--diskinodes</b>
option.</p>
==== Mount Capability option ====
<p style="margin-left:11%;"><b>--noatime yes</b> |<b>no</b></p> <p style="margin-left:22%;">Sets noatime flag (do notupdate inode access times) on filesystem.</p> ==== Capability option ==== <p style="margin-left:11%;"><b>--capability</b>
<i>capname</i>:<b>on</b>|<b>off</b>[<b>,</b>...]</p>
<b>vps-pci</b> configuration script is executed by
<b>vzctl</b> then configuring PCI devices. The script is
usually located at <b>/usr/lib[64]libexec/vzctl/scripts/</b>.</p>
==== Features management ====
configuration file.</p>
==== I/O priority management scheduling ====
<p style="margin-left:11%;"><b>--ioprio</b>
<i>priority</i></p>
<p style="margin-left:22%;">Assigns disk I/O priority to
container. <i>Priority</i> range is <b>0-7</b>. The greater
<i>priority</i> is, the more time for I/O activity container
<b>4</b>.</p>
<p style="margin-left:11%;"><b>--iolimit</b><i>limit</i>[<b>B</b>|<b>K</b>|<b>M</b>|<b>G</b>]</p> <p style="margin-left:22%;">Assigns disk I/O bandwidthlimit for a container. Value is either a number with anoptional suffix, or a literal string <b>unlimited</b>. Valueof <b>0</b> means &quot;unlimited&quot;. By default acontainer has no I/O limit. Maximum allowed limit is 2gigabytes per second; values exceeding the limit aretruncated.</p> <p style= Checkpointing "margin-left:22%; margin-top: 1em">If no suffix isprovided, the <i>limit</i> is assumed to be in megabytes persecond. Available suffixes are: <br>&bull; <b>b</b>, <b>B</b> -- bytes per second; <br>&bull; <b>k</b>, <b>K</b> -- kilobytes per second; <br>&bull; <b>m</b>, <b>M</b> -- megabytes per second (default);<br>&bull; <b>g</b>, <b>G</b> -- gigabytes per second;</p> <p style="margin-left:11%;"><b>--iopslimit</b><i>iops</i></p> <p style="margin-left:22%;">Assigns IOPS limit for acontainer, in number of input/output operations per second.Value is a number or a literal string <b>unlimited</b>.Value of <b>0</b> means &quot;unlimited&quot;. By default acontainer has no IOPS limit.</p> === Suspending and restore resuming ===
<p style="margin-top: 1em">Checkpointing is a feature of
OpenVZ kernel which allows to save a complete in-kernelstate of arunning container, and to restore it later.</p>
<p style="margin-left:11%;"><b>suspend</b>|<b>chkpnt</b> <i>CTID</i>[<b>--dumpfile</b> <i>name</i>]</p>
<p style="margin-left:17%;">This command saves suspends a completestate of a running container to a dump file, and stops thecontainer. If an option <b>--dumpfile</b> is not set,default dump file name <b>/vz/dump/Dump.</b><i>CTID</i> isused.</p>
<p style="margin-left:11%;"><b>resume</b>|<b>restore</b> <i>CTID</i>[<b>--dumpfile</b> <i>name</i>]</p>
<p style="margin-left:17%;">This command restores a
container from the dump file created by the <b>chkpntsuspend</b>
command.</p>
[<b>--id</b> <i>uuid</i>] [<b>--name</b> <i>name</i>]
[<b>--description</b> <i>desc</i>] <br>
[<b>--skip-suspend</b>] [<b>--skip-config</b>]</p>
<p style="margin-left:17%;">Creates a container snapshot,i.e. saves the current container state, including its fileIf <i>uuid</i> is not specifiedsystem state, running processes state, it is auto-generatedand configurationfile.</p>
<p style="margin-left:17%; margin-top: 1em">If a container
is running, and <b>--skip-suspend</b> option is not
specified, a container is checkpointed and then restored,
and CT memory dump becomes the part of snapshot. Otherwise</p> <p style="margin-left:17%; margin-top: 1em">Unless<b>--skip-config</b> option is given,containeronly configuration file system state is savedto the snapshot.</p>
<p style="margin-left:17%; margin-top: 1em">If <i>uuid</i>is not specified, it is auto-generated. Options
<b>--name</b> and <b>--description</b> can be used to
specify the snapshot name and description, respectively.
<p style="margin-left:11%;"><b>snapshot-switch</b>
<i>CTID</i> [<b>--skip-resume</b> | <b>--must-resume</b>][<b>--skip-config</b>] <b><br>--id</b> <i>uuid</i></p>
<p style="margin-left:17%;">Switches the container to a
snapshot identified by <i>uuid</i>, restoring its filesystem state, configuration (if available) and its runningstate (if available). </p> <p style="margin-left:17%; margin-top: 1em"><b>Note that the currentstate of a container (including its file systemcontainer state and its configuration file system state ) is lost! </b></p> <p style="margin-left:17%; margin-top: 1em">Option<b>--skip-resume</b> is used to ignore a CT memory dump filein a snapshot, as a result the container will end up beingin a stopped state (same as if a snapshot has been takenwith <b>--skip-suspend</b>).</p> <p style="margin-left:17%; margin-top: 1em">If givenoptionsnapshot contains CT <b>--must-resume</b> is set, absense of a memory dumpistreated as an error, it and the inability to restore from thememory dump is restoredtreated as an error rather than warning.</p> <p style="margin-left:17%; margin-top: 1em">Option option<b>--skip-config</b> is used to ignore the CT configurationfile in a snapshot, otherwisei.e. the current configuration file willit be left as is stopped.</p>
<p style="margin-left:11%;"><b>snapshot-delete</b>
<p style="margin-left:17%;">Removes a specified
snapshot.</p>
 
<p style="margin-left:11%;"><b>snapshot-mount</b>
<i>CTID</i> <b>--id</b> <i>uuid</i> <b>--target</b>
<i>directory</i></p>
 
<p style="margin-left:17%;">Mounts a snapshot specified by
<i>uuid</i> to a <i>directory</i>. Note this mount is
read-only.</p>
 
<p style="margin-left:11%;"><b>snapshot-umount</b>
<i>CTID</i> <b>--id</b> <i>uuid</i></p>
 
<p style="margin-left:17%;">Unmounts a specified
snapshot.</p>
<p style="margin-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 style="margin-left:17%;">List container&rsquo;ssnapshots.</p> <p style="margin-left:17%; margin-top: 1em">You cansuppress displaying header using <b>-H</b> option.</p>
<p style="margin-left:17%;margin-top: 1em">Lists all snapshotsYou can use the<b>-o</b> option to display only the specified<i>field</i>(s). ActiveList of available fields can be obtainedsnapshot is marked with using <b>*-L</b> signoption.</p>
=== Performing container actions ===
[<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>name</i>]
[<b>--name&nbsp;</b><i>name</i>][<b>--local_uid&nbsp;</b><i>uid</i>][<b>--local_gid&nbsp;</b><i>gid</i>]</p> </td></tr>
</table>
format after a colon. Possible ploop formats are
<b>expanded</b>, <b>plain</b> and <b>raw</b>. Default is
<b>expanded</b>. Using value other than <b>rawexpanded</b> is not recommended and iscurrently not supported.</p>
<p style="margin-left:17%; margin-top: 1em">You can use
<b>--diskspace</b> option and <b>--diskinodes</b> options to specify container file systemsize. Suffixes Note that for<b>Gploop</b>layout, you will not be able to change inodesvalue later.</p> <p style="margin-left:17%; margin-top: 1em">If<b>MDISKSPACE</b>is not specified either in the sampleconfiguration file used for creation or in globalconfiguration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]], <b>K--diskspace</b> can also bespecified (see parameter is required for <b>Resource limitsploop</b> section for more infoon suffixes)layout.</p>
<p style="margin-left:17%; margin-top: 1em">Suffixes<b>G</b>, <b>M</b>, <b>K</b> can also be specified (see<b>Resource limits</b> section for more info onsuffixes).</p> <p style="margin-left:17%; margin-top: 1em">You can use<b>--root</b> <i>path</i> option to sets the path to the
mount point for the container root directory (default is
<b>VE_ROOT</b> specified in [[Man/vz.conf.5|<b>vz.conf</b>(5)]] file).
<b>--hostname</b> <i>name</i> option to set a host name for
a container.</p>
 
<p style="margin-left:17%; margin-top: 1em">When running
with an upstream Linux Kernel that supports user namespaces
(&gt;= 3.8), the parameters <b>--local_uid</b> and
<b>--local_gid</b> can be used to select which <i>uid</i>
and <i>gid</i> respectively will be used as a base user in
the host system. Note that user namespaces provide a 1:1
mapping between container users and host users. If these
options are not specified, the values <b>LOCAL_UID</b> and
<b>LOCAL_GID</b> from global configuration file
[[Man/vz.conf.5|<b>vz.conf</b>(5)]] are used. An explicit <b>--local_uid</b>
value of 0 will disable user namespace support, and run the
container as a privileged user. In this case,
<b>--local_gid</b> is ignored.</p>
 
<p style="margin-left:17%; margin-top: 1em"><b>Warning:</b>
use <b>--local_uid</b> and <b>--local_gid</b> with care,
specially when migrating containers. In all situations, the
container&rsquo;s files in the filesystem needs to be
correctly owned by the host-side users.</p>
<p style="margin-left:11%;"><b>destroy</b> | <b>delete</b>
<p style="margin-left:11%;"><b>start</b> <i>CTID</i>
[<b>--wait</b>] [<b>--force</b>] [<b>--skip-fsck</b>][<b>--skip-remount</b>]</p>
<p style="margin-left:17%;">Mounts (if necessary) and
<b>--force</b> if you want to start a container which is
disabled (see <b>--disabled</b>).</p>
 
<p style="margin-left:17%; margin-top: 1em">Specify
<b>--skip-fsck</b> to skip fsck for ploop-based container
filesystem (this option is used by vz initscript).</p>
 
<p style="margin-left:17%; margin-top: 1em">By default, if
a container to be started happens to be already mounted, it
is unmounted and mounted again. This behavior can be turned
off by using <b>--skip-remount</b> flag.</p>
<p style="margin-left:17%; margin-top: 1em">Note that this
<p style="margin-left:11%;"><b>stop</b> <i>CTID</i>
[<b>--fast</b>] [<b>--skip-umount</b>]</p>
<p style="margin-left:17%;">Stops a container and unmounts a containerit (unless <b>--skip-umount</b> is given).Normally, <b>halt</b>(8) is executed inside a container;optionoption <b>--fast</b> makes <b>vzctl</b> use <b>reboot</b>(2)
syscall instead which is faster but can lead to unclean
container shutdown.</p>
 
<p style="margin-left:17%; margin-top: 1em">Note that
<b>vzctl stop</b> is not asyncronous, in other words vzctl
waits 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 changed
globally, by setting <b>STOP_TIMEOUT</b> in
[[Man/vz.conf.5|<b>vz.conf</b>(5)]], or per container (<b>STOP_TIMEOUT</b> in
[[Man/ctid.conf.5|<b>ctid.conf</b>(5)]], see <b>--stop-timeout</b>).</p>
<p style="margin-left:17%; margin-top: 1em">Note that this
<p style="margin-left:11%;"><b>restart</b> <i>CTID</i>
[<b>--wait</b>] [<b>--force</b>] [<b>--fast</b>][<b>--skip-fsck</b>]</p>
<p style="margin-left:17%;">Restarts a container, i.e.
<p style="margin-left:17%; margin-top: 1em">Sixth word, if
exists, is <b>suspended</b>. It appears if both a containerand its dump file exist exists for a stopped container (see <b>chkpntsuspend</b>).</p>
<p style="margin-left:17%; margin-top: 1em">This command
when a container is stopped, plus disk space quota should be
set.</p>
 
<p style="margin-left:11%;"><b>compact</b> <i>CTID</i></p>
 
<p style="margin-left:17%;">Compact container image. This
only makes sense for ploop layout.</p>
<p style="margin-left:11%;"><b>quotaon</b> <i>CTID</i></p>
<p style="margin-left:17%; margin-top: 1em">The following
escape sequences are recognized by <b>vzctl console</b>.
Note that these sequences are only recognized afterat the<b>Enter</b>beginning of a line.</p>
<p style="margin-left:17%; margin-top: 1em">&bull;
global and per-CT scripts. Global scripts have a literal
prefix of <b>vps.</b> and are executed for all containers.
Per-CT scripts have a <i>CTID</i><b>.</b> numeric prefix and areexecuted for the given container only.</p>
<p style="margin-left:11%; margin-top: 1em">Please note
<pre style="margin-left:11%; margin-top: 1em"> # If one of these files does not exist then something
# is really broken
[ -f /etc/sysconfigvz/vz .conf ] || exit 1
[ -f $VE_CONFFILE ] || exit 1
# Source both files. Note the order is important.
<td width="78%">
<p>Error during <b>vzctl chkpntsuspend</b></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="78%">
<p>Error during <b>vzctl restoreresume</b></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="78%">
<p>Parameter <b>DISKSPACE</b> not set (or set too high)</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<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 or
vzctl.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="78%">
<p>Error resizing ploop image</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>155</p></td><td width="7%"></td><td width="78%"> <p>Error converting container to ploop layout</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>156</p></td><td width="7%"></td><td width="78%"> <p>Error creating ploop snapshot</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>157</p></td><td width="7%"></td><td width="78%"> <p>Error merging ploop snapshot</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>158</p></td><td width="7%"></td><td width="78%"> <p>Error deleting ploop snapshot</p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="4%"> <p>159</p></td><td width="7%"></td><td width="78%"> <p>Error switching ploop snapshot</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>158166</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error deleting compacting ploop snapshotimage</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p>159167</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error switching listing ploop snapshotsnapsots</p></td></tr>
</table>
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2000-20112013, Parallels, Inc. Licensed under GNU GPL.</p>
2,253
edits

Navigation menu