Changes

Jump to: navigation, search

Man/vzctl.8

1,757 bytes added, 16:22, 3 June 2011
export newer version (no manual changes ;))
==== Miscellaneous ====
 <p style="margin-left:11%;"><b>--onboot yes</b>|<b>no</b></p>
<p style="margin-left:17%;">Sets whether the container will
be started during system boot. The container will not be
auto-started unless this parameter is set to <ib>yes</ib>.</p>
<p style="margin-left:11%;"><b>--bootorder</b>
container should be created before using this option.</p>
<p style="margin-left:11%;"><b>--disabledyes</b>|<i>yes</i>|<ib>no</ib></p>
<p style="margin-left:17%;">Disable container start. To
==== Networking ====
 
<p style="margin-left:11%;"><b>--ipadd</b> <i>addr</i></p>
<b>all</b>.</p>
==== Veth veth interface configuration ====
<p style="margin-left:11%; margin-top: 1em">The following
interface to a bridge.</p>
<p style="margin-left:11%;"><b>--mac_filteron</b>|<ib>on|off</ib></p>
<p style="margin-left:22%;">Enables/disables MAC address
==== Resource limits ====
<p style="margin-left:2211%; margin-top: 1em">The following
options sets barrier and limit for various user
beancounters. Each option requires one or two arguments. In
special value <b>unlimited</b>.</p>
<p style="margin-left:2211%; margin-top: 1em">Arguments are
in items, pages or bytes. Note that page size is
architecture-specific, it is 4096 bytes on IA32x86 and x86_64platformplatforms.</p>
<p style="margin-left:2211%; margin-top: 1em">You can also
specify different suffixes for <b>set</b> parameters (except
for the parameters which names start with <b>num</b>). For
megabytes and its limit to 6 megabytes.</p>
<p style="margin-left:2211%; margin-top: 1em">Availablesuffixes are: </p> <table width="100%" border="0" rules="none" frame="void" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="11%"></td><td width="6%"> <p><b>T</b>, <b>t</b><br/p></td><td width="5%"></td><td width="44%">g<p>terabytes;</p></td><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"></td><td width="6%"> <p><b>G</b>, <b>Gg</b> -- </p></td><td width="5%"></td><td width="44%"> <p>gigabytes. ;</p></td><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"><b/td><brtd width="6%">m<p><b>M</b>, <b>Mm</b> -- </p></td><td width="5%"></td><td width="44%"> <p>megabytes. ;</p></td><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"><b/td><brtd width="6%">k<p><b>K</b>, <b>Kk</b> -- </p></td><td width="5%"></td><td width="44%"> <p>kilobytes. ;</p></td><td width="34%"></td></tr><tr valign="top" align="left"><td width="11%"><b/td><brtd width="6%"<p><b>P</b>, <b>Pp</b> -- </p></td><td width="5%"></td><td width="44%"> <p>memory pages (page is 4096 bytes on x86architecture, other architectures may differarch-specific).</p></td><td width="34%"></td></tr></table>
<p style="margin-left:2211%; margin-top: 1em">You can also
specify the literal word <b>unlimited</b> in place of a
number. In that case the corresponding value will be set to
<b>LONG_MAX</b>, i. e. the maximum possible value.</p> <p style="margin-left:11%;"b><bbr>--numproc</b><i>items</i>[:<i>items</i>]</p>
<p style="margin-left:22%;">Maximum number of processes and
<i>pages</i>[:<i>pages</i>]</p>
<p style="margin-left:22%;">This On VSwap-enabled kernels, thislimits the amount of physical memory (RAM) available to acontainer. The barrier should be set to <b>0</b>, and thelimit to a total size of RAM that can be used used by acontainer.</p> <p style="margin-left:22%; margin-top: 1em">For olderkernels, this is currently anaccounting-only parameter. It shows , showing the usage of RAM by thiscontainer. Barrier should be set to <b>0</b>, and limit should beset to <b>unlimited</b>.</p>
<p style="margin-left:11%;"><b>--swappages</b>
==== CPU fair scheduler parameters ====
<p style="margin-left:2211%; margin-top: 1em">Theseparameters control CPU usage by container.</p> <p style="margin-left:11%;"b><bbr>--cpuunits</b><i>num</i></p>
<p style="margin-left:22%;">CPU weight for a container.
==== Memory output parameters ====
<p style="margin-left:2211%; margin-top: 1em">This parametercontrol output of /proc/meminfo inside a container.</pb> <p style="margin-left:11%;"><bbr>--meminfo none</b></p>
<p style="margin-left:22%;">No /proc/meminfo virtualization
<p style="margin-left:22%; margin-top: 1em">Default is
<b>privvmpages:1</b>.</p>
 
<p style="margin-left:22%; margin-top: 1em">Note that if
<b>--physpages</b> is set on a VSwap-enabled kernel, it
takes a precedence over <b>--meminfo</b>, i.e. setting
<b>--meminfo</b> does not take any effect.</p>
==== iptables control parameters ====
<p style="margin-left:11%;"><b>--iptables</b> <i>name</i></p>
<p style="margin-left:22%;">Allow to use the functionality
==== Network devices control parameters ====
<p style="margin-left:11%;"><b>--netdev_add</b> <i>name</i></p>
<p style="margin-left:22%;">move network device from the
specified container</p>
==== Disk quota parameters ==== <p style="margin-left:11%;"><b>Disk quota parameters <br>--diskquota yes</b>|<b>no</b></p>
<p style="margin-left:22%;">allows to enable or disable
==== Mount option ====
<p style="margin-left:11%;"><b>--noatime yes</b> | <b>no</b></p>
<p style="margin-left:22%;">Sets noatime flag (do not
==== Capability option ====
<p style="margin-left:11%;"><b>--capability</b> <i>capname</i>:<b>on</b>|<b>off</b></p>
<p style="margin-left:22%;">Sets a capability for a
==== Device access management ====
<p style="margin-left:11%;"><b>--devnodes</b> <i>device</i>:[<b>[r</b>][<b>w</b>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:22%;">Give the container an access
<p style="margin-left:11%;"><b>--devices
b</b>|<b>c</b>:<i>major</i>:<i>minor</i>|<b>all</b>:[<b>[r</b>][<b>w</b>][<b>q</b>]|<b>none</b></p>
<p style="margin-left:22%;">Give the container an access to
==== PCI device management ====
<p style="margin-left:11%;"><b>--pci_add</b> [<i>domain</i><b>:</b>]<i>bus</i><b>:</b><i>slot</i><b>.</b><i>func</i></p>
<p style="margin-left:22%;">Give the container an access to
<p style="margin-left:11%;"><b>--pci_del</b>
[<i>domain</i><b>:</b>]<i>bus</i><b>:</b><i>slot</i><b>.</b><i>func</i></p>
<p style="margin-left:22%;">Delete a PCI device from the
==== Features management ====
<p style="margin-left:11%;"><b>--features</b> <i>name</i>:<b>:on</b>|<b>off</b></p>
<p style="margin-left:22%;">Enable or disable a specific
==== Apply config ====
<p style="margin-left:11%;"><b>--applyconfig</b> <i>name</i></p>
<p style="margin-left:22%;">Read container parameters from
name based on <b>NAME</b> variable in container
configuration file.</p>
 
==== I/O priority management ====
<p style="margin-left:11%;"><b>--ioprio</b> <i>priority</i></p>
<p style="margin-left:22%;">Assigns I/O priority to
<b>/etc/vz/conf/</b><i>CTID</i><b>.mount</b>.</p>
<pre style="margin-left:2211%; margin-top: 1em"> # If one of these files does not exist then something # is really broken [ -f /etc/sysconfig/vz ] || exit 1 [ -f $VE_CONFFILE ] || exit 1 # Source both files. Note the order is important. . /etc/vz/vz.conf . $VE_CONFFILE mount -n --bind /mnt/disk $VE_ROOT/mnt/disk</pre>
== EXIT STATUS ==
<p style="margin-left:11%; margin-top: 1em">To create and
start &quot;basic&quot; container with ID of 1000 using
<ib>fedora-corecentos-5</ib> OS template and IP address of192.168.10.200: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl create 1000 --ostemplate fedora-corecentos-5 --config basic<br> vzctl set 1000 --ipadd 192.168.10.200 --save <br> vzctl start 1000</ppre>
<p style="margin-left:11%; margin-top: 1em">To set number
of processes barrier/limit to 80/100, and PTY barrier/limit
to 16/20 PTYs: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl set 1000 --numproc 80:100 -t 16:20 --save</ppre>
<p style="margin-left:11%; margin-top: 1em">To execute
command <b>ls -la</b> in this container: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl exec 1000 /bin/ls -la</ppre>
<p style="margin-left:11%; margin-top: 1em">To execute
command pipe <b>ls -l / | sort</b> in this container: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl exec 1000 &rsquo;ls -l / | sort&rsquo;</ppre>
<p style="margin-left:11%; margin-top: 1em">To enter this
container and execute command <b>apt-get install vim</b>:</p> <brpre style="margin-left:11%; margin-top: 1em"> vzctl enter 1000 --exec apt-get install vim</ppre>
<p style="margin-left:11%; margin-top: 1em">Note that in
logout after successful installation (or stay inside the
container if installation process failed) use
<b>&amp;&amp;</b>: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl enter 1000 --exec &quot;apt-get install vim &amp;&amp;logout&quot;</ppre>
<p style="margin-left:11%; margin-top: 1em">To enter this
container, execute command <b>apt-get install vim</b> and
logout independently of exit code of installation process
use <b>;</b>: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl enter 1000 --exec &quot;apt-get install vim ;logout&quot;</ppre>
<p style="margin-left:11%; margin-top: 1em">Note that you
<p style="margin-left:11%; margin-top: 1em">To stop this
container: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl stop 1000</ppre>
<p style="margin-left:11%; margin-top: 1em">To permanently
remove this container: <br/p<pre style="margin-left:11%; margin-top: 1em"> vzctl destroy 1000</ppre>
== FILES ==
Anonymous user

Navigation menu