Editing Getting started with OpenVZ live CD

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 46: Line 46:
 
       VEID      NPROC STATUS  IP_ADDR        HOSTNAME
 
       VEID      NPROC STATUS  IP_ADDR        HOSTNAME
 
       101          5 running                -
 
       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>
  
Line 195: Line 209:
 
#
 
#
 
</pre>
 
</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 ==
 
== Resource limiting ==
 
The very important feature of VE is that you can limit it by resources: CPU, memory, disk space.
 
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 you
+
It is also performed via vzctl. Current usage values and limits of memory-related resources can be viewed through
should 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:
 
<code>/proc/bc/VEID/resources</code> file:
 
<pre>
 
<pre>
# cat /proc/bc/101/resources # or /proc/user_beancounters on 2.6.9 kernels
+
# cat /proc/bc/101/resources
 
             kmemsize        628209    976969    2752512    2936012          0
 
             kmemsize        628209    976969    2752512    2936012          0
 
             lockedpages          0          0        32        32          0
 
             lockedpages          0          0        32        32          0

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: