Resources available for OpenVZ containers.

Resources that can be set, include disk space usage, memory usage, CPU usage, and more.

Restricting and setting hard limits of what is permitted in a container ensures that no tasks within the container can get greedy and steal resources from other containers or the host system itself.

First, look at the vzlist tool. This will provide information on any installed containers which makes managing them simpler vzlist tool

This will provide information on any installed containers which makes managing them simpler:

# vzlist -a

How to increase the available disk space from 1GB to something more useful like 10GB.

Check disk space.

# vzctl exec 101 df -hT

The above increases the default 1GB drive space available to a barrier of 10GB and a maximum limit of 11GB.

# vzctl set 101 –diskspace 10G:11G –save
# vzctl exec 101 df -hT

There are two ways to change settings for containers. The first is using vzctl as above (remember to use the -save option to make the changes persistent). The second is to edit the configuration file for the container. For a container with a CTID of 101, the file would be /etc/sysconfig/vz-scripts/101.conf.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.