Some things of the lesson in English
What is HyperVM :
HyperVM is a multi-platform, multi-tiered, multi-server, multi-virtualization web based application that will allow you to create and manage different Virtual Machines each based on different technologies across machines and platforms.
HyperVM sports advanced features allowing you to manage your entire vps hosting from a single console. HyperVm has been optimized for cross data-center clusters, allowing you to have your servers spread across multiple data centers all over the world. Some key HyperVM features:
* Full Distribution. Manage your entire data center. HyperVM is successfully used by our clients to manage 1000s of vpses on 100s of servers, centrally, with the slaves spread across different DCs.
* Support for Windows Virtualization. HyperVM allows efficient windows virtualization with advanced features like backup/restore built in.
* Support for multiple virtualization technologies.
* Live Migrate
* Integrated, optimized centralized backup. HyperVM centralized backup uses symlinks to provide extreme efficiency in backing up your entire hosting. HyperVM provides advanced browse backup feature where a client can browse his entire backup and automatically restore it himself, without ever needing to contact the support.
Preparation :
Make sure that you open the ports 8888 and 8887 in the firewall. Otherwise you won’t be able to connect to HyperVM.
You have to disable selinux by editing /etc/sysconfig/selinux and changing the line to selinux=disabled and then running :
# setenforce 0
setenforce: SELinux is disabled
HyperVm installation consists of downloading either the hypervm-install-master.sh or hypervm-install-slave.sh from download.lxlabs.com and executing them as root. They will download all the required files and do the complete installation on their own.
# wget http ://download.lxlabs.com/download/hypervm/production/hypervm-install-master.sh
# sh ./hypervm-install-master.sh –virtualization-type=xen/openvz/NONE
You have to explicitly specify which virtualization type you want using the option –virtualization-type as either xen or openvz or NONE. If you want to install hypervm on an existing system, just use virtualization-type=NONE, which will install just hyperVM components, and skip the virtualization componetns entirely. When you run the command, you will presented with a menu from up2date, on which you can press <Enter>
HyperVM will currently install the openVZ/Xen kernel, but will not switch the default kernel to it. You will have to manually edit the /etc/grub.conf, and change the ‘default=1′ to ‘default=0′, and reboot the machine :
# nano /etc/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.22.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-92.1.22.el5
module /vmlinuz-2.6.18-92.1.22.el5xen ro root=/dev/VolGroup00/LogVol00
module /initrd-2.6.18-92.1.22.el5xen.img
title CentOS (2.6.18-92.1.18.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.18.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-92.1.18.el5.img
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-92.el5.img
HyperVM supports the concept of multiple locations, and thus generally the question of harddisk partitioning is irrelevant. It is recommended to have a large / for openvz, since both /home and /vz will have files. You can just add another harddisk, mount it as a particular directory, and then add it to the list of locations. In other words, you can trivially distribute vpses across different harddisks/lvms. Also you can change the location of a vps from one harddisk to other from the CP itself. Go to vps home -> advanced -> change location.
You should never run any other control panel other than hyperVM on the host server. That will unncessarily introduce security risks, and in the case of openvz, since all the vps process are visible and accessible on the host server, starting and stopping of services on the host server will affect all the vpses too. If you need to run anything, create a special vps for it.
Once the machine boots back, just make sure you have the openVZ kernel by doing a ‘uname -a’, and after that you can connect to ‘
http://machine-name:8888′, and you will be presented with a login screen - the password would be ‘admin’. Once you login, HyperVM will explicitly force you to change the password to something other than ‘admin’.
For those installing Xen, please read these extra notes, and make sure that you meet all the requirements.
If you are installing on legacy operating systems (Fedora 2, 3, 4), please read these notes.
If you want to have a cluster, you have to run ‘hypervm-install-slave.sh’ in all the servers that you intend to make as slaves. Once ‘hypervm-install-slave.sh’ is completed, you can add the server from the ‘add server’ page in the master’s server page. You will need to open port 8889 which is what’s used for communication between the master and slave. For file transfer, the slave will need to contact the master’s 8889 port, so you will need 8889 open on both master and the slave. All communication is fully encrypted and secure. From then on, you can manage every aspect of Virtualization through our intuitive graphical interface. We expect you to have a great time managing your serverfarm using hyperVM. IF you run into any problems, please visit our forum at our website ‘
http://lxlabs.com/forum’, and you can ask your query there. Since our forum is integrated with mailing list which in turn has our main developers as members, you can get direct answers from the developers themselves.
Upgrading hyperVM is very straightforward. The ‘update home’ page will show you the latest version of hyperVM available, and you can just update to the latest version by clicking on ‘update now’.
Xen Installation Notes :
* Note: Although the notes below will fall under recommended best practices for installing your server, they are mandatory only if you are installing Xen, and if you are planning on installing openvz, then you can skip them without any issue.
* The boot loader must be grub. Grub is a much more flexible and mature boot loader, and it is actually a good idea to use it rather than lilo.
* There must be a separate /boot partition. You can assign it 200MB.
* You should use LVM.
The recommended disk configuration is:
/boot /dev/hda1 (500MB)
/ /dev/mapper/vol00-root (8GB)
swap /dev/mapper/vol00-swap (1GB)
The above are just minimum configurations, and you can extend them whenever they get full.
HyperVM will automatically detect your xen configuration and will set the driver to xen and also add the existing LVMs in the system to the xen locations. Just make sure that you are running xen and the Volume Groups have been added by going to server home -> location home .
On fedora 6/centos 5, you will need to run the following for xen to work properly. This is because xen on fedora 6/centos 5 is broken and the default initrd will not function.
———
# cd /usr/local/lxlabs/hypervm/httpdocs/
# lphp.exe ../bin/misc/fixfc6xen.php
———-
———
# cd /usr/local/lxlabs/hypervm/httpdocs/
# lphp.exe ../bin/misc/fixcentos5xen.php
———-
If hyperVM didn’t automatically recognize the xen driver, you can run the command below to forcibly set it.
————-
# cd /usr/local/lxlabs/hypervm/httpdocs/
# lphp.exe ../bin/common/setdriver.php –server=localhost –class=vps –driver=xen
————-
If you switch the kernel at any point later, you will have to run the above commands again.
HyperVM will automatically set the driver for the server if you install it as xen. But if by any chance, the driver fails to get set at the install time, you can always set it later by running the command below.
———
# cd /usr/local/lxlabs/hypervm/httpdocs/
# lphp.exe ../bin/common/setdriver.php –server=localhost –class=vps –driver=xen