We all know that nowadays Virtualization is a buzzword, every company is now migrating their hardware server environments to Virtualization environment. Virtualization technology helps IT companies to reduce their IT expenses while boosting efficiency and productivity of servers. There are several technologies are now being popular in the market to implement Virtualization in your network.
Here in this tutorial, we‘ll be focusing on a “Free and an Open source Linux Virtualization software” called “OpenVZ” and learn that how to manage it with HyperVM. Before we proceed with its installation, here are some details about the OpenVZ technology and HyperVM.
What is OpenVz
OpenVZ is a Free and Open source Virtualization software for Linux. Its an Operating system-level Virtualization technology. It helps us to implement container-based Virtualization on our Linux servers. It allows us to create multiple secure Linux containers on a single machine. It treats those containers as a stand-alone machine and ensure that applications running in those containers do not conflict is any aspect.
These containers are also known as Virtual Private Server or VPS, Since it treats VPS‘s as a stand-alone server, we can reboot each VPS independently and each vps will be having its own root access, users, IP addresses, memory, processes, system libraries and configuration files and applications.
What is HyperVM
HyperVM is a most complete and Lightweight Virtualization manager product, developed by Lxcenter. It provides a single Graphical console to manage all our VPS containers and server resources with Admin access as well as container owner based access. With this console, we can perform operations like start, stop, restart, reinstall, upgrade/downgrade resources, backup, restore, migrate to each of our containers. Many Web hosting companies are using HyperVM with OpenVZ to provide Linux VPS hosting services.
Benefits of HyperVM
Some other Benefits of HyperVM are listed below.
- It supports OpenVZ and Xen Virtualization technology.
- Provides web based graphical user interface to manage the server.
- Creates virtual machines with Linux OS within minutes with the help of precreated templates.
- Easy to integrate with WHMCS (Billing Software for Web hosts) for Instant setup of VPSs and their management from Billing software end only.
- Intelligent way of managing server resources like IPs, Networks, Memory, CPU and disk space.
Installing HyperVM (Multi-Virtualization) on RHEL/CentOS 5
First, before proceeding further, it is recommended to disable selinux while installation.
[root@tecmint~]# setenforce 0
Change the SELinux status in “/etc/sysconfig/selinux” file.
selinux=disabled
This is the easiest way to install HyperVM on CentOS/RHEL machines. We need to download latest HyperVM installation script “hypervm-install-master.sh” from the below link or use “wget” command to grab the script.
[root@tecmint ~] wget http://download.lxcenter.org/download/hypervm/production/hypervm-install-master.sh
Now, execute the script as root. This script will do all installations with its own, It will download all the required packages for HyperVM installation and their dependencies with Yum.
Since we are installing HyperVm with OpenVZ, we need to specify the Virtualization type while running the script.
[root@tecmint ~]#sh ./hypervm-install-master.sh --virtualization-type=openvz
Sample Output
Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.leapswitch.com * extras: mirror.leapswitch.com * updates: centos.excellmedia.net Setting up Install Process --------------------------------------------- --------- Output Omitted----------- --------- Output Omitted----------- --------------------------------------------- --------------------------------------------- FINISHED --2013-09-26 20:41:41-- Downloaded: 2 files, 2.5K in 0s (30.4 MB/s) Executing Update Cleanup... Will take a long time to finish.... Congratulations. hyperVM has been installed successfully on your server as master You can connect to the server at https://<ip-address>:8887 or http://<ip-address>:8888 Please note that first is secure ssl connection, while the second is normal one. The login and password are 'admin' 'admin'. After Logging in, you will have to change your password to something more secure Thanks for choosing hyperVM to manage your Server, and allowing us to be of service ***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.
Here is a brief explanation of what this script will do.
- It downloads and install all the required package like wget, unzip, PHP, curls, lxlighthttpd, lxzend, lxphp, mysql and mysql-server along with their dependencies with the help of yum.
- Creates User and group for HyperVM
- Install mysql and create a database for HyperVM.
- It also installs required packages for OpenVZ kernel and vzctl.
- It also downloads a precreated template of CentOS which will be used to create virtual machines.
Change the default value “0” to “1” in “/etc/grub.conf” to boot your server in with OpenVZ kernel and Reboot your server.
[root@tecmint ~]#sh reboot
We are done with the installing HyperVM in server, its now time to access its Web based Manager. For that, we need to use following URL.
https://<ip-address>:8887 or http://<ip-address>:8888
If everything goes fine, it will open up Web based HyperVM manager like below picture and asks for Admin login details. Please provide Username “admin” and password “admin” to login into panel for the first time.
Once you Log In, it will ask you to change the Admin password. Please change it and use that changed password from the next time.
Some more Important information about HyperVM as follows:
When we create a Container or VPS in HyperVM, it assigns an unique Container ID (CID) to every container and keeps all data in /vz directory.
- Container’s data : /vz/root and /vz/private
- Os Templates : /vz/template/cache
- Containers configuration file: /etc/sysconfig/vz-scripts/.conf
- HyperVM Services: service hypervm {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}
- OpenVZ services : service openvz {start|stop|restart}
- List all containers: vzlist -a
- Download link for Precreated templates: You can download precreated different OS templates from OpenVz Template.
That’s all with HyperVM installation using OpenVZ, there are so many features in HyperVM which help you to setup virtualization in your server environment. If you face any problem with setting up HyperVM in your Linux server or need any other assistance like backup, restoration, migration etc, you can simply contact us.
Stay connected with Tecmint.com for more exciting and interesting tutorials in future. Do leave your comments and suggestions below in the comment box.
Hi, very nice article, it will possible in any VPS or need a specific configuration. If you specify system config where you shown demo screen short.
I will need to try on a VPS which is already a container
Nice write-up with details.
Thanks for this wonderful articles
Hi Tarunika. Your all post is very helpful…Thanks a lot for sharing with us…:)
when i run this command
sh ./hypervm-install-master.sh –virtualization-type=openvz
This error occurs
Failed loading /usr/local/lxlabs/ext/lib/Zend/lib/ZendExtensionManager.so: /usr/local/lxlabs/ext/lib/Zend/lib/ZendExtensionManager.so: cannot open shared object file: No such file or directory
Really… Great article!!