Managing OpenVZ With HyperVM On CentOS 5.2 - Page 3

4 Installing A HyperVM Slave

Now we want to install a HyperVM slave on our and control it from the HyperVM control panel on our master ( This is how we do it:


First we need to disable SELinux. Open /etc/sysconfig/selinux...

vi /etc/sysconfig/selinux

... and set SELINUX to disabled:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.


setenforce 0


Afterwards we install the HyperVM slave as follows:

sh ./ --virtualization-type=openvz

The installation won't take long because no container templates need to be downloaded (the templates are stored on the master). At the end, you should see something like this:

Executing Update Cleanup... Will take a long time to finish....
Congratuations. hyperVM has been installed succesfully on your server as slave
You should open the port 8889 on this server, since this is used for the communication between master and slave
To access this slave, go admin->slaves->add slave, give the ip/machine name of this server. The password is 'admin'. The slave will appear in the list of slaves, and you can access it just like you access localhost

***There is one more step you have to do to make this complete. Open /etc/grub.conf, and change the 'default=1' line to 'default=0', and reboot this machine. You will be rebooted into the openvz kernel and will able to manage vpses from the hyperVM interface
[root@server2 ~]#

Next we open /etc/grub.conf...

vi /etc/grub.conf

... and change default=1 to default=0 so that the OpenVZ kernel is the default kernel:

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
title CentOS (2.6.18-92.1.13.el5.028stab059.6PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-92.1.13.el5.028stab059.6PAE ro root=/dev/VolGroup00/LogVol00
        initrd /initrd-2.6.18-92.1.13.el5.028stab059.6PAE.img
title CentOS (2.6.18-53.1.4.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-53.1.4.el5 ro root=/dev/VolGroup00/LogVol00
        initrd /initrd-2.6.18-53.1.4.el5.img
title CentOS (2.6.18-53.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00
        initrd /initrd-2.6.18-53.el5.img

Then we reboot the system:


That's it for the installation.

Now we can add our new HyperVM slave to the HyperVM control panel. Click on the Servers icon on the HyperVM Home:

Click on the Add Server tab:

Fill in the IP address of the slave ( and its HyperVM password (the default password is admin). Then click on Add:

You should now see the slave on the Servers overview page (in addition to localhost):

Before we can create an OpenVZ container on the slave, we need to define a second IP pool that we can use on the slave:

(We don't have to define another resource plan - we can use the one we've created before.)

Now go to Virtual Machines > Add Openvz to create a new container on the slave. Fill in a name and IP address for the container as well as a hostname, then select the slave in the Server drop-down menu and finally an OS template:

Afterwards, you should find the new container on the Virtual Machines overview page.

You can start/stop it by clicking on the bulb in the S column:


5 Links

Share this page:

10 Comment(s)

Add comment


From: Kamik at: 2009-02-14 16:23:12

So for clarify you are not paying for use of OpenVZ, but you pay here for management system (hyperVM) licences.

From: Kamik at: 2009-02-14 16:30:23

Iam sorry I have pasted wrong URL, licensing informations are here on lxlabs WiKi

From: bilety lotnicze at: 2009-02-04 07:02:06

Very interesting article. Thanks

From: Adam at: 2009-02-05 05:21:51

If you start running 5 vms++ then you will be better of with xen. It is better performance wise in a multiple vm environment, it comes with CentOS and you dont have to pay a dime.


From: Kamik at: 2009-02-04 23:30:25

Licensing information can be found at In short it says that you can use 2 VMs after installation and up to 5 VMs after you register on their system. Up to 9 VMs you are paying only for those that  are over your 5 free VMs. So if you have 7 VMs running it will charge you money for 2 licences. When you register 10 VMs with your license all free licences are GONE and you start paying for all of them.

From: Anonymous at: 2009-05-02 02:53:35


HyperVM and lxadmin Licenses

If we use HyperVM 5 VPS and lxadmin 40 domain for demo or testing purpose its free.

All production HyperVM systems charges 50cents/VPS/month.

if we use Lxadmin with HyperVM it is $3/month for unlimited domains

VPS managed by different virtualization manager is $18/month

From: Rob at: 2009-02-03 19:04:24

The documentation for Hypervm leaves much to be asked.. You have done the community a great service once again.. Thanks

From: eXcalibre at: 2010-08-19 04:02:37

This thread is still very much alive as the exact same process works for future versions of centos too.

It's worth mentioning that there are more templates available to install along with the default centos5 template.

place the downloaded .gz files in the /vm/templates/cache/  folder in order to select them when creating a new Machine/Container.

Great Tut BTW

at the time of writing these are the templates available from the above link



From: Life Tester at: 2009-02-22 21:21:14

but please look into the advanced topics as well: importing/moving VMs, reconnecting servers, selecting another master? :-)

From: Vikas Saini at: 2009-06-23 02:03:27

This article is really awesome ! I followed all instructions on my centos 5.3 dedicated server and everything went fine.........

 Now, I have my own VPS on my own dedicated server... This helps me to reduce cpanel cost from $36 to $14 :) :) ............