Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Getting started with OpenVZ live CD

14 bytes removed, 07:12, 6 July 2007
moved information about shmpages to appropriate place
VEID NPROC STATUS IP_ADDR HOSTNAME
101 5 running -
</pre>
 
o Note: In the LiveCD environment, you may have to increase SHMPAGES for the VE or you will run out of "disk space" when trying to install software. You can do this "on the fly" by issuing:
 
<pre>
' vzctl set 101 --shmpages $((8192*8)):$((8192*8)) --save '
</pre>
 
o This will give VE 101 64MB of shmpages; you may wish to give it more if you're planning on doing more than just basic openvz testing.
 
o You can verify the change from the host by issuing:
 
<pre>
' vzctl exec 101 cat /proc/user_beancounters '
</pre>
</pre>
However, it is not possible to ping other computers in the network: for it we need totot
set up NAT (Network Address Translation) and set the nameserver.
#
</pre>
 
{{ Note|In the LiveCD environment, you may have to increase '''shmpages''' resource limit/barrier for the VE (read the next section) or you will run out of "disk space" when trying to install software }}
== Resource limiting ==
The very important feature of VE is that you can limit it by resources: CPU, memory, disk space.
It is also performed via vzctl. For example to set '''shmpages''' (shared memory pages) barrier:limit youshould give this command:<pre>vzctl set 101 --shmpages 16384:16384 --save</pre>This will give VE 101 64MB of '''shmpages''' (one page equals 4Kb on i386: 4Kb * 16384 = 64Mb) Current usage values and limits of memory-related resources can be viewed through
<code>/proc/bc/VEID/resources</code> file:
<pre>
# cat /proc/bc/101/resources# or /proc/user_beancounters on 2.6.9 kernels
kmemsize 628209 976969 2752512 2936012 0
lockedpages 0 0 32 32 0
172
edits