Changes

Jump to: navigation, search

Man/vzctl.8

3,571 bytes added, 16:26, 23 March 2012
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;</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>]parameter value [<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>
<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>--bootorder&nbsp;</b><i>number</i>][<b>--root&nbsp;</b><i>path</i>][<b>--privateid&nbsp;</b><i>pathuuid</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/p>--ipadd&nbsp;</btd><i>addr</itr>][<btr valign="top" align="left">--ipdel&nbsp;</btd width="11%"><i>addr</itd>|<btd width="7%">all</b>][<bp>--hostname&nbsp;</b><i>namevzctl</i>][<b>--nameserver&nbsp;</b><ip>addr</itd>][<btd width="2%">--searchdomain&nbsp;</btd><itd width="80%">name</i>][<b>--netif_add&nbsp;</b><i>dev</ip>[,<i>paramsflags</i>...]][<b>snapshot--netif_del&nbsp;switch</b><i>dev</i>|<b>all</b>][<b>snapshot-delete -ifname-id</b> <i>devuuid</i>[<b/p>--mac&nbsp;</b><itd>hwaddr</itr>][<btr valign="top" align="left">--host_ifname&nbsp;</btd width="11%"><i>dev</itd>][<btd width="7%">--host_mac&nbsp;</b><i>hwaddr</i>][<bp>--bridge&nbsp;</b><i>namevzctl</i>][<b>--mac_filter&nbsp;on</bp>|<b>off</btd>]][<btd width="2%">--numproc&nbsp;</btd><itd width="80%">items </ip>][<b>--numtcpsock&nbsp;</b><i>itemsflags</i>][<b>snapshot--numothersock&nbsp;list</b><i>items</i>][<bp>--vmguarpages&nbsp;</btd><i>pages</itr>][<b>--kmemsize&nbsp;</btr valign="top" align="left"><itd width="11%">bytes</itd>][<btd width="7%">--tcpsndbuf&nbsp;</b><i>bytes</i>][<bp>--tcprcvbuf&nbsp;</b><i>bytesvzctl</i>][<b>--othersockbuf&nbsp;</b><ip>bytes</itd>][<btd width="2%">--dgramrcvbuf&nbsp;</btd><itd width="80%">bytes </ip>][<b>--oomguarpages&nbsp;</b><i>pagesflags</i>][<b>--lockedpages&nbsp;set</b><i>pages</i>][<b>CTID --privvmpages&nbsp;</b><i>pages</i>]parameter value[<b>--shmpages&nbsp;...]</b><i>pages</i>][<b>--numfile&nbsp;save</b><i>items</i>][<b>--numflock&nbsp;force</b><i>items</i>][<b>--numptysetmode&nbsp;restart</b><i>items</i>][|<b>--numsiginfo&nbsp;ignore</b><i>items]</i>][<bp>--dcachesize&nbsp;</btd><i>bytes</itr>][<b>--numiptent&nbsp;</btr valign="top" align="left"><itd width="11%">num</itd>][<btd width="7%">--physpages&nbsp;</b><i>pages</i>][<bp>--swappages&nbsp;</b><i>pagesvzctl</i>][<b>--ram&nbsp;</bp><i>bytes</itd>][<btd width="2%">--swap&nbsp;</btd><itd width="80%">bytes</i>][<b>--cpuunits&nbsp;</b><i>num</i>][<b>--cpulimit&nbsp;</bp><i>num</i>][<b>--cpus&nbsp;</b><i>numflags</i>][<b>--cpumask&nbsp;destroy</b><i>cpus</i>|<b>alldelete</b>]|[<b>--meminfo&nbsp;nonemount</b>|<i>mode</i>:<i>value</i>][<b>--iptables&nbsp;umount</b><i>name</i>][| <b>--netdev_add&nbsp;status</b><i>ifname</i>]|[<b>--netdev_del&nbsp;quotaon</b><i>ifname</i>][| <b>--diskquota&nbsp;yesquotaoff</b>|<b>noquotainit</b>]|[<b>--diskspace&nbsp;console</b><i>numCTID</i>][<b/p>--diskinodes&nbsp;</btd><i>num</itr>][<b>--quotatime&nbsp;</btr valign="top" align="left"><itd width="11%">seconds</itd>][<b>--quotaugidlimit&nbsp;</b><i>num</itd width="7%">][<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><itd width="80%">param </ip>][<b>--devices&nbsp;</b><i>paramflags</i>][<b>--pci_add&nbsp;convert</b><i>devCTID</i>][<b>--pci_dellayout&nbsp;ploop</b><i>dev</i>][<b>--features&nbsp;:</b><i>param</i>:{<b>onexpanded</b>|<b>offplain</b>][<b>--applyconfig&nbsp;</b><i>name</i>][|<b>--applyconfig_map&nbsp;raw</b><i>group</i>}][<b>--ioprio&nbsp;</b><i>num</i>]</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>umount</b> | <b>status</b> |<b>quotaon</b> | <b>quotaoff</b> | <b>quotainit</b> |<b>console</b> | <b>convert</b> <i>CTID</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>exec</b> | <b>exec2</b> <i>CTIDcommand</i> [<i>arg</i> ...]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
=== Setting container parameters ===
<p styletable width="margin-left:11100%;" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><b>set</btr valign="top" align="left"> <i>CTIDparameters</itd width="11%"> [<b>--save</btd>] [<b>--force</b>]</ptd width="4%">
<p style="margin-lefttop:17%;1em">This command sets variouscontainer parameters. If a <b>--saveset</b> flag is given,parameters are saved in container configuration file[[Man/ctid.conf.5|<b>ctid.conf</bp>(5)]]. Use <b>--force</btd> to save theparameters even if the current kernel doesn&rsquo;t supportOpenVZ. If the container is currently running, <btd width="2%">vzctl</btd>applies these parameters to the container.</ptd width="83%">
<p style="margin-left:17%; margin-top: 1em">The following<i>CTID</i>parameters can be used with [<b>set--onboot&nbsp;yes</b> command.|<b>no</pb>][<b>--bootorder&nbsp;</b><i>number</i>]==== Miscellaneous ====[<b>--root&nbsp;</b><i>path</i>][<b>--private&nbsp;</b><i>path</i>][<p style="marginb>--leftuserpasswd&nbsp;</b><i>user</i>:11%<i>pass</i>][<b>--disabled&nbsp;yes</b>|<b>no</b>][<b>--name&nbsp;</b><i>name</i>][<b>--description&nbsp;</b><i>string</i>][<b>--ipadd&nbsp;"</b><i>addr</i>][<b>--onboot yesipdel&nbsp;</b><i>addr</i> |<b>all</b>][<b>no--hostname&nbsp;</b><i>name</pi>][<b>--nameserver&nbsp;</b><i>addr</i>][<p style="marginb>--left:17%searchdomain&nbsp;"</b><i>name</i>Sets whether the container will]be started during system boot[<b>--netif_add&nbsp;</b><i>dev</i>[,<i>params</i>. The container will not be..]][<b>--netif_del&nbsp;</b><i>dev</i>|<b>all</b>][<b>--ifname</b> <i>dev</i>[<b>--mac&nbsp;</b><i>hwaddr</i>][<b>--host_ifname&nbsp;</b><i>dev</i>]auto[<b>-started unless this parameter is set to -host_mac&nbsp;</b><i>hwaddr</i>][<b>yes--bridge&nbsp;</b>.<i>name</pi>][<b>--mac_filter&nbsp;on</b>|<b>off</b>]][<p style="marginb>--left:11%numproc&nbsp;"</b><i>items</i>][<b>--bootordernumtcpsock&nbsp;</b><i>items</i>][<b>--numothersock&nbsp;</b><i>items</i>number][<b>--vmguarpages&nbsp;</b><i>pages</pi>][<b>--kmemsize&nbsp;</b><i>bytes</i>][<p style="marginb>--left:17%tcpsndbuf&nbsp;"</b><i>bytes</i>Sets the boot order priority]for this CT. The higher the [<b>--tcprcvbuf&nbsp;</b><i>numberbytes</i> is, the earlier in]the boot process this container starts. By default this[<b>--othersockbuf&nbsp;</b><i>bytes</i>]parameter is unset, which is considered to be the lowest[<b>--dgramrcvbuf&nbsp;</b><i>bytes</i>]priority, so containers with unset [<b>bootorder--oomguarpages&nbsp;</b> will<i>pages</i>]start last.[<b>--lockedpages&nbsp;</b><i>pages</pi>][<b>--privvmpages&nbsp;</b><i>pages</i>][<p style="marginb>--left:11%shmpages&nbsp;"</b><i>pages</i>][<b>--rootnumfile&nbsp;</b> <i>pathitems</i>][<b>--numflock&nbsp;</pb><i>items</i>][<b>--numpty&nbsp;</b><i>items</i>][<p style="marginb>--left:17%numsiginfo&nbsp;"</b><i>items</i>Sets the path to root directory]([<b>VE_ROOT--dcachesize&nbsp;</b>) for this container. This is essentially a<i>bytes</i>]mount point for container[<b>--numiptent&rsquonbsp;s root directory. Argument</b><i>num</i>]can contain literal string [<b>$VEID--physpages&nbsp;</b>, which will be<i>pages</i>]substituted with the numeric CT ID.[<b>--swappages&nbsp;</b><i>pages</pi>][<b>--ram&nbsp;</b><i>bytes</i>][<p style="marginb>--left:11%swap&nbsp;"</b><i>bytes</i>][<b>--privatecpuunits&nbsp;</b><i>num</i>][<b>--cpulimit&nbsp;</b><i>num</i>path][<b>--cpus&nbsp;</b><i>num</pi>][<b>--cpumask&nbsp;</b><i>cpus</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>--netdev_add&nbsp;"</b><i>ifname</i>Sets the path to private]directory ([<b>VE_PRIVATE--netdev_del&nbsp;</b>) for this container. This is a<i>ifname</i>]directory in which all the container[<b>--diskquota&rsquonbsp;s files areyes</b>|<b>no</b>]stored. Argument can contain literal string [<b>$VEID--diskspace&nbsp;</b>,<i>num</i>]which will be substituted with the numeric CT ID.[<b>--diskinodes&nbsp;</b><i>num</pi>][<b>--quotatime&nbsp;</b><i>seconds</i>][<p style="marginb>--left:11%quotaugidlimit&nbsp;"</b><i>num</i>][<b>--userpasswdnoatime&nbsp;yes</b>|<b>no</b>][<b>--capability&nbsp;</b><i>usercapname</i>:<b>on</b>|<b>off</b>][<b>--devnodes&nbsp;</b><i>param</i>][<b>--devices&nbsp;</b><i>param</i>password][<b>--pci_add&nbsp;</b><i>dev</pi>][<b>--pci_del&nbsp;</b><i>dev</i>][<p style="marginb>--leftfeatures&nbsp;</b><i>param</i>:17%<b>on</b>|<b>off</b>][<b>--applyconfig&nbsp;"</b><i>name</i>Sets password for the given]user in a container, creating the user if it does not[<b>--applyconfig_map&nbsp;</b><i>group</i>]exists. Note that this option is not saved in configuration[<b>--ioprio&nbsp;</b><i>num</i>] [<b>--save</b>]file at all (so [<b>--saveforce</b> flag is useless), it is]applied to the container (by modifying its [<b>--setmode&nbsp;restart</b>|<b>ignore</etcb>]</passwd andp> </td></tr><tr valign="top" align="left"><td width="11%"></etctd><td width="4%"></shadow files).td><td width="2%"></ptd><td width="83%">
<p>This command sets various container parameters.</p></td></tr></table> <p style="margin-left:17%; margin-top: 1em">In caseIf acontainer root filesystem <b>--save</b> flag is not mountedgiven, it isparameters are saved incontainer configuration file [[Man/ctid.conf.5|<b>ctid.conf</b>(5)]]. Useautomatically mounted, then all <b>--force</b> to save the parameters even if the appropriate file changescurrentare applied, then it is unmountedkernel doesn&rsquo;t support OpenVZ.</p>
<p style="margin-left:17%; margin-top: 1em">Note thatIf thecontainer should be created before using this optionis currently running, <b>vzctl</b> applies theseparameters to the container.</p>
<p style="margin-left:1117%;margin-top: 1em">Note that a fewparameters can only be applied by restarting the container.By default, <b>vzctl</b> warns if such parameters arepresent and a container is running. Use <b>--disabled yessetmoderestart</b> |to restart a container in such a case, or<b>no--setmode ignore</b>to suppress the above mentionedwarning.</p>
<p style="margin-left:17%;margin-top: 1em">Disable container start. ToThe followingforce the start of a disabled container, use parameters can be used with <b>vzctl start--forceset</b>command.</p>
<p style="margin-left:11%;"><b>--name</b> <i>name</i></p>=== Miscellaneous ====
<p style="margin-left:1711%;">Add a name for a container. The<ib>name--onboot yes</ib> can later be used in subsequent calls to|<b>vzctlno</b> in place of <i>CTID</i>.</p>
<p style="margin-left:1117%;">Sets whether the container willbe started during system boot. The container will not beauto-started unless this parameter is set to <b>--descriptionyes</b><i>string</i>.</p>
<p style="margin-left:1711%;">Add a textual description for a<b>--bootorder</b>container.<i>number</i></p>
<p style="margin-left:1117%;">Sets the boot order priorityfor this CT. The higher the <bi>--setmoderestartnumber</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 <b>ignorebootorder</b>willstart last.</p>
<p style="margin-left:1711%;">Whether to restart a containerafter applying parameters that require the container to berestarted in order to take effect.<b>--root</b> <i>path</i></p>
<p style==== Networking ===="margin-left:17%;">Sets the path to root directory(<b>VE_ROOT</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:11%;"><b>--ipaddprivate</b> <i>addrpath</i></p>
<p style="margin-left:17%;">Adds an IP address Sets the path to privatedirectory (<ib>addrVE_PRIVATE</ib>to a given ) for this container. Address can optionally have This is a netmaskspecified directory in which all the CIDR notation (e.gcontainer&rsquo;s files arestored. Argument can contain literal string <b>10.1.2.3/25$VEID</b>).Note that this option is incremental, so <i>addr</i> areadded to already existing oneswhich will be substituted with the numeric CT ID.</p>
<p style="margin-left:11%;"><b>--ipdeluserpasswd</b> <i>addruser</i> |:<bi>allpassword</bi></p>
<p style="margin-left:17%;">Removes IP address <i>addr</i>Sets password for the givenfrom user in a container, creating the user if it does notexists. If you want to remove Note that this option is not saved in configurationfile at all the addresses,use (so <b>--ipdel allsave</b>flag is useless), it isapplied to the container (by modifying its /etc/passwd and/etc/shadow files).</p>
<p style="margin-left:1117%;margin-top: 1em"><b>--hostname</b>In casecontainer root filesystem is not mounted, it isautomatically mounted, then all the appropriate file changes<i>name</i>are applied, then it is unmounted.</p>
<p style="margin-left:17%;margin-top: 1em">Sets container hostname.<b>vzctl</b> writes it to the appropriate file inside aNote thatcontainer (distribution-dependent)should be created before using this option.</p>
<p style="margin-left:11%;"><b>--nameserverdisabled yes</b>|<ib>addrno</ib></p>
<p style="margin-left:17%;">Sets DNS server IP address forDisable container start. Toforce the start of a disabled container. If you want to set several nameservers, youshould do it at once, so use <b>vzctl start--nameserverforce</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:11%;"><b>--searchdomainname</b><i>name</i></p>
<p style="margin-left:17%;">Sets DNS search domains Add a name for acontainer. If you want to set several search domains, youTheshould do it at once, so use <bi>--searchdomainname</bi> optionmultiple times can later be used in one call subsequent calls to <b>vzctl</b>, as all thesearch domain values set in previous calls to place of <bi>vzctlCTID</bi>are overwritten.</p>
<p style="margin-left:11%;"><b>--netif_adddescription</b><i>ifname[</i>,<i>mac</i>,<i>host_ifname</i>,<i>host_mac</i>,<i>bridge]string</i></p>
<p style="margin-left:17%;">Adds Add a virtual Ethernet device(veth) to textual description for 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> 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:11%;"><b>--netif_del</b><i>dev_name</i> | <b>all</b></p>=== Networking ====
<p style="margin-left:1711%;">Removes virtual Ethernet devicefrom a container. If you want to remove all devices, use<b>all--ipadd</b>.<i>addr</i></p>
<p style==== veth interface configuration ===="margin-left:17%;">Adds an IP address <i>addr</i>to a given container. Address can optionally have a netmaskspecified in the CIDR notation (e.g. <b>10.1.2.3/25</b>).Note that this option is incremental, so <i>addr</i> areadded to already existing ones.</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>--ifnameipdel</b> <i>nameaddr</i> option. |<b><br>--macall</b> <i>XX:XX:XX:XX:XX:XX</i></p>
<p style="margin-left:2217%;">MAC Removes IP address of interface inside<i>addr</i>from a container. If you want to remove all the addresses,use <b>--ipdel all</b>.</p>
<p style="margin-left:11%;"><b>--host_ifnamehostname</b>
<i>name</i></p>
<p style="margin-left:2217%;">interface name for virtualSets container hostname.interface in <b>vzctl</b> writes it to the host systemappropriate file inside acontainer (distribution-dependent).</p>
<p style="margin-left:11%;"><b>--host_macnameserver</b><i>XX:XX:XX:XX:XX:XXaddr</i></p>
<p style="margin-left:2217%;">MAC Sets DNS server IP address of interface fora container. If you want to set several nameservers, youshould do it at once, so use <b>--nameserver</b> optionmultiple times in one call to <b>vzctl</b>, as all thenameserver values set in previous calls to <b>vzctl</b> arehost systemoverwritten.</p>
<p style="margin-left:11%;"><b>--bridgesearchdomain</b> <i>name</i></p>
<p style="margin-left:2217%;">Bridge nameSets DNS search domains for acontainer. Custom networkIf you want to set several search domains, youstart scripts can should do it at once, so use this value <b>--searchdomain</b> optionmultiple times in one call to automatically add <b>vzctl</b>, as all theinterface search domain values set in previous calls to a bridge<b>vzctl</b>are overwritten.</p>
<p style="margin-left:11%;"><b>--mac_filter onnetif_add</b> |<bi>ifname[</i>,<i>mac</i>,<i>host_ifname</i>,<i>host_mac</i>,<i>offbridge]</bi></p>
<p style="margin-left:2217%;">Enables/disables MAC addressAdds a virtual Ethernet devicefiltering for the Container (veth device and ) to a given container. Here <i>ifname</i> is the possibilityof configuring Ethernet device name in the container, <i>mac</i> is its MAC address of this , <i>host_ifname</i> is the Ethernet device from insidename onthe Containerhost, and <i>host_mac</i> is its MAC address. If MACaddresses should be in the filtering is turned onformat like XX:XX:XX:XX:XX: XX.<i>bridge<br/i>is an optional parameter which can be used in&bull; custom network start scripts to automatically add the veth device accepts only those packets that haveinterface to a MAC address in their headers corresponding to that of thisdevice (excluding all broadcast and multicast packets); bridge. All parameters except <i>ifname<br/i>&bull; it is impossible to modify the veth MAC address fromare optional and are automatically generated if notinside the Containerspecified.</p>
<p style="margin-left:2211%; margin"><b>-top: 1em"-netif_del</b>By default,this functionality is enabled for <i>dev_name</i> | <b>all veth devices existinginside the Container.</b></p>
<p style="margin-left:17%;">Removes virtual Ethernet devicefrom a container. If you want to remove all devices, use<b>all</b>.</p> === VSwap limits = veth interface configuration ====
<p style="margin-left:11%; margin-top: 1em">The following
options sets memory and swap limits for VSwapcan be used to reconfigure the already-enabledcreatedkernels (kernel version 042stab042 or greater)virtual 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>
<p style="margin-left:1122%; margin-top: 1em">Argument is inMAC address of interface insidebytes, with an optional suffixa container. Available suffixes are:</p>
<table widthp style="100margin-left:11%;" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top" align="left"b>--host_ifname</b><td width="11%"i>name</tdi><td width="6%"/p>
<p><b>T</b>, <b>t</b></p></td><td widthstyle="5margin-left:22%;">interface name for virtualinterface in the host system.</td><td width="44%"p>
<p>terabytes;</p></td><td widthstyle="34margin-left:11%;"></tdb>--host_mac</tr><tr valign="top" align="left"b><td width="11%"i>XX:XX:XX:XX:XX:XX</tdi><td width="6%"/p>
<p><b>G</b>, <b>g</b></p></td><td widthstyle="5margin-left:22%;">MAC address of interface in thehost system.</td><td width="44%"p>
<p>gigabytes;</p></td><td widthstyle="34margin-left:11%;"></tdb>--bridge</tr><tr valign="top" align="left"b><td width="11%"i>name</tdi><td width="6%"/p>
<p><b>M</b>, <b>m</b></p></td><td widthstyle="5margin-left:22%;">Bridge name. Custom networkstart scripts can use this value to automatically add theinterface to a bridge.</tdp> <td widthp style="44margin-left:11%;"> <pb>megabytes;--mac_filter on</p></tdb>|<td width="34%"b>off</tdb></trp> <tr valign="top" alignp style="margin-left:22%;">Enables/disables MAC addressfiltering for the Container veth device and the possibilityof configuring the MAC address of this device from insidethe Container. If the filtering is turned on: <td width="11%"br>&bull; the veth device accepts only those packets that havea MAC address in their headers corresponding to that of thisdevice (excluding all broadcast and multicast packets); </tdbr>&bull; it is impossible to modify the veth MAC address frominside the Container.<td width="6%"/p>
<p><b>K</b>, <b>k</b></p></td><td widthstyle="5margin-left:22%; margin-top: 1em">By default,this functionality is enabled for all veth devices existinginside the Container.</td><td width="44%"p>
<p>kilobytes;</p></td><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"></td><td widthVSwap limits ===="6%">
<p><b>P</b>, <b>p</b></p></td><td widthstyle="5margin-left:11%; margin-top: 1em">The followingoptions sets memory and swap limits for VSwap-enabledkernels (kernel version 042stab042 or greater).</td><td width="44%"p>
<p>memory pages (arch-specific).</p></td><td widthstyle="34margin-left:11%; margin-top: 1em">Argument is in</td></tr>bytes, unless otherwise specified by an optional suffix.Available suffixes are:</tablep>
<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>&bull; <b>K</b>, <b>k</b> - kilobytes; <br>&bull; <b>P</b>, <b>p</b> - memory pages (arch-specific,usually 4KB); <br>&bull; <b>B</b>, <b>b</b> - bytes. <b><br>--ram</b> <i>bytes</i></p>
<p style="margin-left:22%;">Sets physical memory (RAM)
VSwap-enabled kernels (version 042stab042 or greater) these
limits are optional, you must only set <b>--ram</b> and
<b>--swap </b> (see above). For older kernels, these limits areobligatory.</p>
<p style="margin-left:11%; margin-top: 1em">Each option
suffixes are:</p>
<table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top" alignp style="margin-left"><td width=":11%; margin-top: 1em"></td><td width="6%">&bull;<p><b>T</b>, <b>t</b></p></td><td width="5%"></td><td width="44%"> <p>- terabytes;</p></td><td width="34%"br></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="6%"> <p>&bull; <b>G</b>, <b>g</b></p></td><td width="5%"></td><td width="44%"> <p>- gigabytes;</p></tdbr><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="6%"> <p>&bull; <b>M</b>, <b>m</b></p></td><td width="5%"></td><td width="44%"> <p>- megabytes;</p></tdbr><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="6%"> <p>&bull; <b>K</b>, <b>k</b></p></td><td width="5%"></td><td width="44%"> <p>- kilobytes;</p></tdbr><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="6%"> <p>&bull; <b>P</b>, <b>p</b></p></td><td width="5%"></td><td width="44%"> <p>- memory pages (arch-specific,usually 4KB).; </pbr>&bull; </tdb>B<td width="34%"/b>, </tdb>b</trb>- bytes.</tablep
<p style="margin-left:11%; margin-top: 1em">You can also
specify the literal word <b>unlimited</b> in place of a
disk quota for a container. By default, a global value
(<b>DISK_QUOTA</b>) from [[Man/vz.conf.5|<b>vz.conf</b>(5)]] is used.</p>
 
<p style="margin-left:22%; margin-top: 1em">Note that this
parameter is ignored for <b>ploop</b> layout.</p>
<p style="margin-left:11%;"><b>--diskspace</b>
<i>num</i>[:<i>num</i>]</p>
<p style="margin-left:22%;">For <b>simfs</b> layout, sets soft and hard disk quotalimits, in blocks. First parameter is soft limit, second ishard limit. One block is currently equal to 1Kb. </p> <p style="margin-left:22%; margin-top: 1em">For<b>ploop</b> layout, sets the size of the ploop image file,in kilobytes.</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 on
limits, in i-nodes. First parameter is soft limit, second is
hard limit.</p>
 
<p style="margin-left:22%; margin-top: 1em">Note that this
parameter is ignored for <b>ploop</b> layout.</p>
<p style="margin-left:11%;"><b>--quotatime</b>
grace period, but once it has expired, the soft limit is
enforced as a hard limit.</p>
 
<p style="margin-left:22%; margin-top: 1em">Note that this
parameter is ignored for <b>ploop</b> layout.</p>
<p style="margin-left:11%;"><b>--quotaugidlimit</b>
container from the dump file created by the <b>chkpnt</b>
command.</p>
 
=== Snapshotting ===
 
<p style="margin-top: 1em">Snapshotting is a feature based
on checkpointing and ploop shapshots. It allows to save a
complete state of container file system. Plus, if the
container is running, it&rsquo;s in-memory state (as in
checkpointing). Note that snapshot functionality is only
working for containers on ploop device.</p>
 
<p style="margin-left:11%;"><b>snapshot</b> |
<b>snapshot-create</b> <i>CTID</i> [<b>--id</b>
<i>uuid</i>]</p>
 
<p style="margin-left:17%;">Creates a container snapshot.
If <i>uuid</i> is not specified, it is auto-generated. If a
container is running, it&rsquo;s checkpointed and then
restored. If a container is not running, only file system
state is saved.</p>
 
<p style="margin-left:11%;"><b>snapshot-switch</b>
<i>CTID</i> <b>--id</b> <i>uuid</i></p>
 
<p style="margin-left:17%;">Switches the container to a
snapshot identified by <i>uuid</i>. Note that the current
container state and its file system state is lost! If given
snapshot contains CT memory dump, it is restored, otherwise
it is stopped.</p>
 
<p style="margin-left:11%;"><b>snapshot-delete</b>
<i>CTID</i> <b>--id</b> <i>uuid</i></p>
 
<p style="margin-left:17%;">Removes a specified
snapshot.</p>
 
<p style="margin-left:11%;"><b>snapshot-list</b>
<i>CTID</i></p>
 
<p style="margin-left:17%;">Lists all snapshots. Active
snapshot is marked with <b>*</b> sign.</p>
=== Performing container actions ===
<p styletable width="margin-left:11100%;"><b>create</b> <i>CTID</i>border="0" rules="none" frame="void"[<b>--ostemplate</b> <i>name</i>] [<b>--config</b cellspacing="0" cellpadding="0"><i>name</i>] [<b>--private</b> <i>path</i>] <brtr valign="top" align="left">[<b>--root</b> <itd width="11%">path</itd>] [<b>--ipadd</b> <i>addr</i>][<b>--hostname</b> <i>name</i>]</ptd width="9%">
<p style="margin-top: 1em"><b>create</b></p></td><td width="2%"></td><td width="78%"> <p style="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>--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>]</p> </td></tr></table> <p style="margin-left:17%;margin-top: 1em">Creates a new container area.This operation should be done once, before the first startof the container.</p>
<p style="margin-left:17%; margin-top: 1em">By default, an
<p style="margin-left:17%; margin-top: 1em">The value of
<b>CONFIGFILE</b> can be overwritten by using the
<b>--config</b><i>name</i> option. This option can not be
used if the container configuration file already exists.</p>
 
<p style="margin-left:17%; margin-top: 1em">A new container
can either be created using <b>simfs</b> filesystem or on a
<b>ploop</b> device. The default is set by value of
<b>VE_LAYOUT</b> parameter of [[Man/vz.conf.5|<b>vz.conf</b>(5)]] and can be
overwritten by <b>--layout</b> option. In case <b>ploop</b>
is used, one can additionally specify ploop disk image
format after a colon. Possible ploop formats are
<b>expanded</b>, <b>plain</b> and <b>raw</b>. Default is
<b>expanded</b>. Using <b>raw</b> is not recommended and is
not supported.</p>
 
<p style="margin-left:17%; margin-top: 1em">You can use
<b>--diskspace</b> option to specify container file system
size. Suffixes <b>G</b>, <b>M</b>, <b>K</b> can also be
specified (see <b>Resource limits</b> section for more info
on suffixes).</p>
<p style="margin-left:17%; margin-top: 1em">You can use
a container.</p>
<p style="margin-left:11%;"><b>destroy</b> |<b>delete</b><i>CTID</i></p>
<p style="margin-left:17%;">Removes a container private
configuration file of this container.</p>
<p style="margin-left:11%;"><b>start</b> <i>CTID</i>[<b>--wait</b>][<b>--force</b>]</p>
<p style="margin-left:17%;">Mounts (if necessary) and
SCRIPTS</b> below).</p>
<p style="margin-left:11%;"><b>stop</b> <i>CTID</i>[<b>--fast</b>]</p>
<p style="margin-left:17%;">Stops and unmounts a container.
SCRIPTS</b> below).</p>
<p style="margin-left:11%;"><b>restart</b> <i>CTID</i>[<b>--wait</b>][<b>--force</b>] [<b>--fast</b>]</p>
<p style="margin-left:17%;">Restarts a container, i.e.
<b>ACTION SCRIPTS</b> below).</p>
<p style="margin-left:11%;"><b>status</b> <i>CTID</i></p>
<p style="margin-left:17%;">Shows a container status. This
can also be usable from scripts.</p>
<p style="margin-left:11%;"><b>mount</b> <i>CTID</i></p>
<p style="margin-left:17%;">Mounts container private area.
<b>ACTION SCRIPTS</b> below).</p>
<p style="margin-left:11%;"><b>umount</b> <i>CTID</i></p>
<p style="margin-left:17%;">Unmounts container private
<b>stop</b> does <b>umount</b> automatically.</p>
<p style="margin-left:11%;"><b>convert</b> <i>CTID</i>[<b>--layoutploop</b>[<b>:</b>{<b>expanded</b>|<b>plain</b>|<b>raw</b>}]]</p>
<p style="margin-left:17%;">Convert CT private area to
reside on a ploop device (available since in kernel version042stab052.6kernel8 and greater). Conversion should be performed when a container isstopped, plus disk space quota should be set.</p>
<p style="margin-left:11%;"><b>quotaon</b> <i>ctidCTID</i></p>
<p style="margin-left:17%;">Turn disk quota on. Not that
<b>mount</b> and <b>start</b> does that automatically.</p>
<p style="margin-left:11%;"><b>quotaoff</b> <i>ctidCTID</i></p>
<p style="margin-left:17%;">Turn disk quota off. Not that
<p style="margin-left:11%;"><b>quotainit</b>
<i>ctidCTID</i></p>
<p style="margin-left:17%;">Initialize disk quota (i.e. run
operations.</p>
<p style="margin-left:11%;"><b>enter</b> <i>CTID</i>[<b>--exec</b><i>command</i> [<i>arg</i> ...]]</p>
<p style="margin-left:17%;">Enters into a container (giving
specified <b>--exec</b>).</p>
<p style="margin-left:11%;"><b>console</b> <i>CTID</i></p>
<p style="margin-left:17%;">Attach to the container&rsquo;s
<p style="margin-left:17%; margin-top: 1em">Type <b>Esc</b>
then <b>.</b> to detach from the console. Type <b>Esc</b>then <b>,</b> to detach without killing anything. Note that thissequence is these sequences are only recognized after <b>Enter</b>.</p>
=== Other options ===
<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><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 setError setting second-level (ugid) quota</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
2,253
edits

Navigation menu