2,253
edits
Changes
Automated import of articles *** existing text overwritten ***
[<b>--id </b><i>uuid</i>]
[<b>--name </b><i>name</i>]
[<b>--description </b><i>desc</i>][<b>--skip-suspend</b>]</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 restart</b>|<b>ignore</b>]</p> </td></tr>
<tr valign="top" align="left">
<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> |<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>console</b> <i>CTID</i>[<i>ttynum</i>]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
[<b>--cpumask </b><i>cpus</i>|<b>all</b>]
[<b>--meminfo none</b>|<i>mode</i>:<i>value</i>]
[<b>--iptables </b><i>name</i>[<b>,</b>...]]
[<b>--netdev_add </b><i>ifname</i>]
[<b>--netdev_del </b><i>ifname</i>]
[<b>--quotaugidlimit </b><i>num</i>]
[<b>--noatime yes</b>|<b>no</b>]
[<b>--capability </b><i>capname</i>:<b>on</b>|<b>off</b>[<b>,</b>...]]
[<b>--devnodes </b><i>param</i>]
[<b>--devices </b><i>param</i>]
[<b>--pci_add </b><i>dev</i>]
[<b>--pci_del </b><i>dev</i>]
[<b>--features </b><i>paramname</i>:<b>on</b>|<b>off</b>[<b>,</b>...]]
[<b>--applyconfig </b><i>name</i>]
[<b>--applyconfig_map </b><i>group</i>]
[<b>--ioprio </b><i>num</i>] [<b>--save</b>]
[<b>--force</b>] [<b>--reset_ub</b>]
[<b>--setmode restart</b>|<b>ignore</b>]</p> </td></tr>
<tr valign="top" align="left">
<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:1711%; margin-top: 1em">If a<b>--save</b> </p> <p style="margin-left:17%;">If this flag is given, parameters are saved incontainer configuration file [[Man/ctid.conf.5|<b>ctid.conf</b>(5)]]. Use</p> <p style="margin-left:11%;"><b>--force</b> to </p> <p style="margin-left:17%;">If this flag is given togetherwith <b>--save the </b>, parameters are saved even if the current
kernel doesn’t support OpenVZ.</p>
<p style="margin-left:1711%; "><b>--reset_ub</b></p> <p style="margin-topleft: 1em17%;">If thecontainer this flag is currently runninggiven, <b>vzctl</b> applies theseall User Beancounter parameters fromparameters the configuration file to the a running container. This ishelpful in case configuration file is modified manually.Please note this flag is not compatible with <b>--save</b>,and it is usually a bad idea to combine it with any otheroptions.</p>
<p style="margin-left:1711%; 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>--setmoderestart</b> to restart a container in such a case, or|<b>--setmode ignore</b> to suppress the above mentionedwarning.</p>
<p style="margin-left:17%; margin-top: 1em">The followingA few parameters can only be used with applied by restarting the container. By default,<b>vzctl</b> warns if such parameters are present and acontainer is running. Use <b>set--setmode restart</b> torestart a container in such a case, or <b>--setmodeignore</b> commandto suppress the above mentioned warning.</p>
==== Miscellaneous ====
<p style="margin-left:11%;"><b>--iptables</b>
<i>name</i>[<b>,</b>...]</p>
<p style="margin-left:22%;">Allow to use the functionality
of <i>name</i> iptables module inside the container. Tospecify multiple Multiple comma-separated <i>name</i>s, repeat --iptables for each,or use space-separated list as an argument (enclosed insingle or double quotes to protect spaces)can be specified.</p>
<p style="margin-left:22%; margin-top: 1em">The default
list of enabled iptables modules is specified defined by the
<b>IPTABLES</b> variable in [[Man/vz.conf.5|<b>vz.conf</b>(5)]].</p>
<i>num</i></p>
<p style="margin-left:22%;">Enables or disablesin-container per-user and per-group disk quotas. If thevalue is set to <b>0</b> or not set, disk quotas inside thecontainer is disabled and not accounted.</p> <p style="margin-left:22%; margin-top: 1em">For<b>simfs</b> layout containers, non-zero value sets maximum number ofuser/group IDs in a container for which disk quota insideisthe container will be accounted. If this value is set to</p> <p style="margin-left:22%; margin-top: 1em">For<b>0ploop</b>layout containers, user and group quotas any non-zero value enablesdisk quota inside the container will; the number of user/groupIDs used by disk quota is not be accountedlimited by OpenVZ.</p>
<p style="margin-left:22%; margin-top: 1em">Note that ifyou have previously set value of this parameter to enabling or disabling in-container disk quotas requirescontainer restart, so consider using <b>0--setmode</b>,changing it while the container is running will not takeeffectoption.</p>
==== Mount option ====
<p style="margin-left:11%;"><b>--capability</b>
<i>capname</i>:<b>on</b>|<b>off</b>[<b>,</b>...]</p>
<p style="margin-left:22%;">Sets a capability for a
container. Multiple comma-separated capabilities can bespecified.</p> <p style="margin-left:22%; margin-top: 1em">Note that setting a capability when the containeris running does not take immediate effect; restart thecontainer in order for the changes to take effect(consider using <b>--setmode</b>option). Note a</p> <p style="margin-left:22%; margin-top: 1em">A container has the default set of capabilities, thus anyoperation on capabilities is "logical andAND" withthe default capability mask.</p>
<p style="margin-left:22%; margin-top: 1em">You can use the
<p style="margin-left:11%;"><b>--features</b>
<i>name</i>:<b>on</b>|<b>off</b>[<b>,</b>...]</p>
<p style="margin-left:22%;">Enable or disable a specific
container feature. Known features are: <b>sysfs</b>,
<b>nfs</b>, <b>sit</b>, <b>ipip</b>, <b>ppp</b>,
<b>ipgre</b>, <b>bridge</b>, <b>nfsd</b>. A few features canbe specified at once, comma-separated.</p>
==== Apply config ====
working for containers on ploop device.</p>
<p style="margin-left:11%;"><b>snapshot</b> |<i>CTID</i>[<b>snapshot-create-id</b> <i>CTIDuuid</i> ] [<b>--idname</b><i>name</i>][<b>--description</b> <i>uuiddesc</i>] <br>[<b>--skip-suspend</b>]</p>
<p style="margin-left:17%;">Creates a container snapshot.
If <i>uuid</i> is not specified, it is auto-generated. </p> <p style="margin-left:17%; margin-top: 1em">If acontainercontainer is running, it’s and <b>--skip-suspend</b> option is notspecified, a container is checkpointed and thenrestored,restoredand CT memory dump becomes the part of snapshot. If a container is not runningOtherwise, only file systemstate is saved.</p> <p style="margin-left:17%; margin-top: 1em">Options<b>--name</b> and <b>--description</b> can be used tospecify the snapshot name and description, respectively.Name is displayed by <b>snapshot-list</b>.</p>
<p style="margin-left:11%;"><b>snapshot-switch</b>
specified <b>--exec</b>).</p>
<p style="margin-left:11%;"><b>console</b> <i>CTID</i>[<i>ttynum</i>]</p> <p style="margin-left:17%;">Attach to a container console.Optional <i>ttynum</i> argument is tty number (such as<b>4</b> for <b>tty4</b>), default is <b>1</b> which is usedfor container’s <b>/dev/console</b>.</p> <p style="margin-left:17%; margin-top: 1em">Note theconsoles are persistent, meaning that: <br>• it can be attached to even if the container is notrunning; <br>• there is no automatic detachment upon the containerstop; <br>• detaching from the console leaves anything running inthis console as is.</p> <p style="margin-left:17%; margin-top: 1em">The followingescape sequences are recognized by <b>vzctl console</b>.Note that these sequences are only recognized after<b>Enter</b>.</p>
<p style="margin-left:17%;margin-top: 1em">Attach to the container&rsquobull;sconsole<b>Esc</b> then <b>. Note that </b> to detach from the console is persistent, meaning it canbe attached to even if the container is not running, andthere is no automatic detachment when the container isstopped.</p>
<p style="margin-left:17%; margin-top: 1em">Type •<b>Esc</b>then <b>.!</b> to detach from kill anything running on the console(SAK). Type <b>Esc</b>then <b>,</b> to detach without killing anything. Note thatThis is helpful when one expects a loginthese sequences are only recognized after <b>Enter</b>prompt but there isn’t one.</p>
=== Other options ===
<td width="78%">
<p>Error setting secondin-level (ugid) quotacontainer disk quotas</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>