Wednesday, September 14, 2011

Business Plan for Xen Virtualization

A review of the Web Hosting industry shows that Virtualization is the rage these days. The ability to collapse computing resources into abstraction layers enables greater flexibility and storage. This article introduces Xen Virtual Private Server(VPS), advantages, comparison to similar technologies and primarily why we should choose Xen Technology.

1.1 Case Study

When we thought of implementing VPS on our test Workstation, we had the following requirements on mind:-
1. Ease of use ( Remember this is not for a newbie into Hosting).
2. Should be able to employ multiple servers on the same machine.
3. Each server should be of a different type(capable of handling different OS versions).
4. Cost factor.
5. Increased performance and isolation of storage.

1.2 Why not a dedicated server?

How can we make hosting more profitable? Our test workstation had a single server with Intel Pentium Dual Core Processor, with 2GB of Ram , 80 GB Hard Disk. A dedicated server of the same configuration would cost us a minimum of $150 to $170. Understanding the real potential of VPS, we realized that we could implement four VPS nodes on the same server, producing a decent performance, with each node costing a maximum of $15 to $20. We decided to go ahead with Virtualization. What was left was the choice of technology to be used for implementation.

2. Virtual Private Servers

Virtual Private Servers are the most advanced step in server virtualization technology. They are used to partition a single physical server into many isolated virtual private servers. Each virtual private server looks and behaves exactly like a real networked server system, complete with its own set of init scripts, users, processes, file systems, etc.
Advantages of VPS Hosting :-
* High Availability
* Customer Self - Management
* Managed Infrastructure
* Fast Deployment
* Dedicated Resources (CPU, RAM)
* Dedicated Performance
* Fast and Painless Migration from existing hosting environment
* Upgrading Processor Speed, RAM and HDD
The choice of VPS client was something to think about. Our choice was Xen, the reasons for which is discussed briefly on the forth coming pages.

3. Xen

Xen is a high performance and secure open source virtualization framework. Xen implements virtualization by inserting a software layer-hypervisor between the hardware and the Operating system. This in turn enables the server to run multiple virtual servers. The hypervisor acts as an abstraction layer in between the hardware and the Operating system. The main advantage is that Xen can execute multiple virtual machines, each running a different OS ,on a single system with relatively close and reliable performance.
We had to deploy an environment where the Hosting Kernel can run nodes with capability of running different Guest OS (Virtual Machine, VM) on each node as the Customer choice often varies(choice of Operating System). The following characteristics of Xen were really attractive:-
* Each VM has a dedicated share of memory and disk resources.
* Each VM are isolated from each other providing security
* Choice of using any Distro of Linux (Linux, Debian , Redhat, Suse) and other OS like CentOS, Slackware
* Choice of Control Panels (cPanel, Plesk, Webmin etc)
* Guaranteed Uptime
* Dedicated Backup Server

3.1 Xen Features

Following are the most important features of Xen
* Full root access.
* The amount of memory in the VM plan is exclusively assigned to each VM (can be changed)
* Unmanaged VMs, the customer can manage their VM server, including backups, patching,
applications, backups, firewalling and DNS.
* Swap space equal to twice physical memory (preferred)
* Independent console access, including the ability to reboot your VM
* Backup disk space on a separate backup storage server (Customer can manage and monitor the backups)
* Choice of OS Distros
Fedora Core 7
Fedora Core 6
Fedora Core 4
Debian 4
Debian 3.1
CentOS 5.0
CentOS 4.4
Slackware 11
[ Additional Distros can be added as per the requirements. Xen Guest kernels can be found at
* Choice of Web Hosting Control Panels
cPanel, Plesk , Webmin and most other Control Panels can be used with the VMs. cPanel can be installed only for Fedora and CentOS VMs with a minimum RAM of 256MB. Control Panel installation(cPanel) for the VMs can be done only at startup. Hence clients who needs a Control Panel to manage their domains should get it installed when they setup the VMs because Control Panel installation at a later stage can be complex and hence not preferable.

4. Testing

The Workstation was running Fedora Core 6. The kernel preferred to for dom0/domU is a 2.6.* kernel. As Xen packages were not installed by default , we used Yum to grab the Xen Host Kernel. The VM implementation was done using Xen version 3.04. With a recent version of OS and supported libraries, the host kernel installation was a matter of minutes. RPM installation is also handy provided you have the required libraries.
You can find the RPMs at
Recent versions can also be found at
With the Xen Guest kernel (Dom 0 as it is normally called) already installed, the Host kernel needs to be installed now. There are many ways of doing this :-
1. Using the virt-install program (This virtually does everything for you but is not preferred as it is time and resource consuming)
[Refer:- ]
2. The next method is easy and preferable (remember we are not newbies to Linux). All you need is to get a Guest Domain(DomU ) Image, create a configuration file for it and create a new “initrd ” . Now you can create your Guest Domain using the Б─° xm createБ─² command and we can find the Guest OS console to work on.
The above links gives you detailed steps for Guest kernel installation. Four Xen Guest nodes with each having 256 MB of RAM using 4 different OS versions(Fedora 6, CentOS5, Debian 4.1, Slackware11) was installed on the Test Workstation and the performance was remarkable.

4.1 Recommended Hardware Specifications

Server Hardware Specification
CPU: 64-bit x86-based system. Intel VT or AMD-V hardware virtualization assist capability : 1.5 GHz single CPU minimum, 2 GHz or faster dual CPU recommended.
Memory: 1 GB of RAM minimum, 2 GB recommended
Disk: 16 GB of disk space minimum, 60 GB of disk space recommended
Network: 100 Mbit/s or faster network interface card
Client Hardware Specification
Minimum specification
300 MHz (Pentium compatible)
128 RAM
200 MB spare disk space

5. Cost Factor

Setting up virtual nodes using Xen depends on the amount of memory used, disk space available, bandwidth usage etc. The amount of RAM allocated to each VM can be changed at any instance of time which is a big advantage. The number of nodes primarily depends on the RAM used and the processor speed. If we are having a good processor and the required amount of RAM , we can run as many VMs as possible. The Guest kernels can be controlled from the Host kernel console. The following table lists out various possible configuration and the cost (approximate).
Storage Space
Monthly Fee
Note :- The above table is an approximation. The values can change depending on the type of hardware(Processor and RAM) being used for implementation.
Additional charges can be added depending on the number of the IPs needed and bandwidth usage. Xen installation (Dom0 and DomU ) can be done with in a maximum of 3 hours. This entirely depends on the number of nodes and softwares to be added.

6. Conclusion

Xen provides an excellent way of reducing the total cost of ownership and providing more dependable and high-availability applications in Virtualization platform. It can also deploy a wide variety of services, such as virtual reality servers and local mirroring of dynamic web content. Apart from these , turning the setup and configuration of each OS can be done easily using Xen by which smaller-granularity timescales of hosting is facilitated.