Changes

Jump to: navigation, search

Man/vzctl.8

12,602 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>
<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-delete</b> <i>CTID</i><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>flags</i>] <b>snapshot-mount</b> <i>CTID</i><b>--id</b> <i>uuid</i> <b>--target</b> <i>dir</i></p></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="7%"> <p><b>vzctl</b></p></td><td width="2%"></td><td width="80%"> <p>[<i>flags</i>] <b>snapshot-umount</b> <i>CTID</i><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>flags</i>] <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></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<p>[<i>flags</i>] <b>set</b> <i>CTID --parameter value</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="7%">
 
<p><b>vzctl</b></p></td>
<td width="2%"></td>
<td width="80%">
 
<p>[<i>flags</i>] <b>set</b> <i>CTID</i>
<b>--reset_ub</b></p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
be referred to by either numeric <i>CTID</i> or by name (see
<b>--name</b> option). Note that CT ID &lt;= 100 are
reserved for OpenVZ internal purposes. A numeric ID shouldnot be more than <b>2147483644</b>.</p>
== OPTIONS ==
[<b>--name&nbsp;</b><i>name</i>]
[<b>--description&nbsp;</b><i>string</i>]
[<b>--ostemplate&nbsp;</b><i>string</i>]
[<b>--stop-timeout&nbsp;</b><i>seconds</i>]
[<b>--ipadd&nbsp;</b><i>addr</i>]
[<b>--ipdel&nbsp;</b><i>addr</i>|<b>all</b>]
[<b>--ram&nbsp;</b><i>bytes</i>]
[<b>--swap&nbsp;</b><i>bytes</i>]
[<b>--vm_overcommit&nbsp;</b><i>float</i>]
[<b>--cpuunits&nbsp;</b><i>num</i>]
[<b>--cpulimit&nbsp;</b><i>num</i>]
[<b>--cpus&nbsp;</b><i>num</i>]
[<b>--cpumask&nbsp;</b><i>cpus</i>|<b>auto</b>|<b>all</b>][<b>--nodemask&nbsp;</b><i>nodes</i>|<b>all</b>]
[<b>--meminfo&nbsp;none</b>|<i>mode</i>:<i>value</i>]
[<b>--iptables&nbsp;</b><i>name</i>[<b>,</b>...]]
[<b>--netfilter&nbsp;disabled</b>|<b>stateless</b>|<b>stateful</b>|<b>full</b>]
[<b>--netdev_add&nbsp;</b><i>ifname</i>]
[<b>--netdev_del&nbsp;</b><i>ifname</i>]
[<b>--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>
<p style="margin-left:17%;">If this flag is given together
with <b>--save</b>, parameters are saved even if the current
kernel 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>
the configuration file to a running container. This is
helpful in case configuration file is modified manually.
Please note this flag is exclusive, i.e. it can not compatible with <b>--save</b>,beand it is usually a bad idea to combine it combined with any otheroptionsor flags.</p>
<p style="margin-left:11%;"><b>--setmode restart</b> |
<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>
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>
<p style="margin-left:17%;">Add a textual description for a
container.</p>
 
<p style="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. Useful
after a change/upgrade of a distribution running inside
container, as vzctl uses the value of OSTEMPLATE to run
distribution-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 for
container to stop on <b>vzctl stop</b> before forcibly
killing it, in seconds. Note this option can not be used
without <b>--save</b> flag.</p>
 
<p style="margin-left:17%; margin-top: 1em">Special value
of <b>0</b> means to use compiled-in default.</p>
==== Networking ====
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>
<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 setexplicitly (see below). Default value is <b>0</b>, meaningunlimited privvmpages.</p> <p style="margin-left:11%; margin-top: 1em">Note that<b>vzctl</b> checks if running kernel is VSwap capable, andrefuses to use these parameters otherwise. This behavior canbebe 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:22%; margin-top: 1em">Note thatchanging this parameter requires container restart, soconsider using <b>--setmode</b> option.</p>
<p style="margin-left:1122%;margin-top: 1em">The followingarguments can be used: <b>--iptables</bbr><i>name</i>[<b>,&bull; disabled</b>...]</p>
<p style="margin-left:2232%;">Allow to use the functionalityof <i>name</i> iptables module inside the container.Multiple comma-separated <i>name</i>s can be specified.no modules are allowed</p>
<p style="margin-left:22%; margin-top: 1em">The defaultlist of enabled iptables modules is defined by the<b>IPTABLES&bull; stateless</b> variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]].</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>
<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,only file system state is saved.</p>
<p style="margin-left:17%; margin-top: 1em">Unless<b>--skip-config</b> option is given, containerconfiguration file is saved to 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. Note that for<b>ploop</b> layout, you will not be able to change inodesvalue later.</p> <p style="margin-left:17%; margin-top: 1em">If<b>DISKSPACE</b> is not specified either in the sampleconfiguration file used for creation or in globalconfiguration file [[Man/vz.conf.5|<b>vz.conf</b>(5)]], <b>--diskspace</b>sizeparameter is required for <b>ploop</b> layout. </p> <p style="margin-left:17%; margin-top: 1em">Suffixes <b>G</b>, <b>M</b>, <b>K</b> can also bespecified (see <b>Resource limits</b> section for more infoonon suffixes).</p>
<p style="margin-left:17%; margin-top: 1em">You can use
<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
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 a dump file
exists for a stopped container (see <b>chkpntsuspend</b>).</p>
<p style="margin-left:17%; margin-top: 1em">This command
<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>
<td width="4%">
<p>161166</p></td>
<td width="7%"></td>
<td width="78%">
<p>Error compacting ploop image</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
 
<p>167</p></td>
<td width="7%"></td>
<td width="78%">
 
<p>Error listing ploop snapsots</p></td></tr>
</table>
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2000-20112013, Parallels, Inc. Licensed under GNU GPL.</p>
2,253
edits

Navigation menu