Virtualization and cloud are the latest keywords wherever we go in technical world these days. In this chapter we will discuss the following items:
What is virtualization anyway?
Different types of virtualization
History of XenServer
How it works and its benefits
Back in the days when I started my job, I had to do a lot of installations, learn new software, and get familiar with their behavior on different operating systems. I spent most of my time installing a particular operating system on the one and only big server I was allocated for this learning process. I progressed slowly, but then one day I had to ask my senior manager to provide me with at least one more medium-scale server so that I could do some test work simultaneously. Unpredictably and unfortunately, I was granted an old desktop.
I was happy; I did some quick network cabling, adjusted power, installed a fresh new operating system on it, spent more than a couple of hours on it to get updated from the Internet, and by the end of the day I was really happy for what I had done. This continued five to six more times before I got tired of all the hectic exercise just to create a testing development machine.
What did I miss there? I wasted a lot of good time; I wasted time in setting it up; I wasted time in doing the cabling and networking; I wasted time even installing the OS and updating it from the Internet. On top of all that, I wasted both the physical space and the hard disk space. Of course, I wasted the processing power of the server and desktop.
Then I came across the idea of hardware virtualization while browsing through the Internet. And so my journey with virtualization began.
So what exactly is virtualization? In very basic technical language, it means splitting one physical resource into as many logical pieces as possible. One slot of RAM with 8 GB of capacity can be split into smaller pieces of varying sizes. Similarly, the hard disk can be virtually used as multiple hard disks and so it is the case with processors. This can be viewed as hardware partitioning.
Virtualization should not always be thought of as splitting resources down; rather it can be thought of as adding up resources. One simple example is using multiple hard disks in a virtualized server as one big disk split into many others.
This partitioned hardware can then be organized to create virtual machines; a controlling framework is obviously required for this. We are specifically talking about hardware virtualization.
There are three such types of hardware virtualization frameworks: operating-system-level virtualization, paravirtualization, and full virtualization. A main server with such a framework running on its own is known as a host and the virtual machines created on that host are termed as guests.
Full virtualization is a complete simulation of hardware to allow guest operating systems to be used unmodified.
In paravirtualization, the hardware environment is not simulated; however, the guest programs are specifically modified to run in their own isolated domains, as if they are running on a separate system.
In between full virtualization and paravirtualization, there also exists partial virtualization, which is a blend of both full virtualization and paravirtualization. Not all hardware is simulated from the host server and so some programs or a part of the guest operating system needs to be modified to work in this environment.
Operating-system-level virtualization has a base operating system whose kernel is modified to run multiple separate user operating systems. These separate user operating systems are known as containers, and look and feel like a real server. The base operating system is the one responsible for hardware resource management between the guest operating systems.
A Type-1 hypervisor is the only layer between the host machine hardware and the guest operating systems. It is also commonly referred to as a bare-metal hypervisor. Popular software in this category are Microsoft's Hyper-V hypervisor, VMWare's ESX, and Citrix XenServer. These are mostly used in production server virtualization and we will focus on Citrix XenServer.
Type-2 hypervisors are the software that run on an already running base operating system as an application and then let users create smaller virtual machines. These are mostly used in regular desktops for common tasks. I, for example, prefer to use Oracle's VirtualBox and VMware's Workstation. Nowadays, Windows 8 (Professional or Enterprise) offers the Hyper-V hypervisor as part of the operating system.
In the mid 1960s, the IBM Watson Research Center was home to the M44/44X Project, whose goal was to evaluate the then emerging time-sharing system concept. The architecture was based on virtual machines.
IBM had provided an IBM 704 computer, a series of upgrades (such as to the 709, 7090, and 7094) and access to some of its system engineers to MIT in the 1950s. It was on IBM machines that the Compatible Time Sharing System (CTSS) was developed at MIT. The supervisor program of CTSS handled console I/O, scheduling of foreground and background (offline-initiated) jobs, temporary storage and recovery of programs during scheduled swapping, monitoring of disk I/O, and so on. The supervisor had direct control of all trap interrupts.
Our specific requirement is Type-1 bare-metal para-virtualization so that we can have maximum hardware utilization. There are numerous comparisons between the different virtualization technologies available over the Internet. Different hypervisors have been compared and we have decided to use Citrix XenServer 6.
Xen originated as a research project at the University of Cambridge as part of a project called The XenoServer wide-area computing project. The name derives from the Greek word xenos, which means foreign or unknown. In 2003, the first public release of Xen was introduced. Xen is a native or bare-metal hypervisor. It runs in a more privileged CPU state than any other software on the machine.
The Xen hypervisor launches the most privileged domain,
dom0. This is the only virtual machine that by default has direct access to hardware and can manage user domains, such as
domU, which are the unprivileged guest virtual machines. The hypervisor is responsible for the memory management and CPU scheduling of the guest machines.
XenServer is built on an open source Xen hypervisor. It's like an operating system and uses a combination of paravirtualization and hardware-assisted virtualization. XenServer allows its guests' operating systems to know that they are being run on a virtualized environment and hence the guests' operating systems sometimes need to be modified to reduce performance penalties. For any operating system that can't be modified for paravirtualization, for example, Microsoft Windows, hardware-assisted technologies are utilized.
Citrix XenServer is installed directly on bare-metal servers, requiring no dedicated host operating system. This increases server and storage utilization and reduces costs of equipment, power, cooling, and physical space. Since guest machines do not directly communicate with hardware, running virtual machines can be migrated to new servers with no service interruption, allowing essential workloads to get the necessary resources and enable zero-downtime maintenance. More sophisticated features include automatic recovery from hardware failure and failover capabilities in disaster situations.
A complete feature list and comparison of Citrix XenServer editions is available at http://www.citrix.com/products/xenserver/features/editions.html.
A Hardware Compatibility List is available at http://hcl.xensource.com. It is recommended, but not mandatory, to use the hardware from this list.
The following are the minimum XenServer host system requirements:
64-bit x86 server-class system
CPU: 1.5 GHz minimum; 2 GHz or faster and multi-core recommended
2 GB to 1 TB physical memory
Up to 64 logical processors
100 Mb/s or faster NIC
Up to 16 physical NICs
Local, Fiber Channel, or SAN boot disk with 16 GB of minimum space; 60 GB or more recommended
Fiber Channel, iSCSI, or NFS LUN with 356 MB of minimum space for high availability (HA) heartbeat storage repository
XenCenter is the management GUI for XenServers that runs on Windows. This is the front end that lets users configure new virtual machines and enables full virtual machine installation, configuration, administration, and lifecycle management. Using this tool we configure the remote storage and manage networks, including VLANs and internal networks and bonded and dedicated NICs.
XenCenter displays the VMs' performance stats and lets us take snapshots of guest machines and provide access to the virtual machines' consoles. These are just some basic functions of XenCenter.
There are a lot of things we will be doing in the following chapters using this tool.
Microsoft Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, or Windows 7 (any edition or version)
.NET Framework 2.0 SP1 or later
CPU speed: 750 MHz minimum; 1 GHz or faster recommended
Disk space: 100 MB minimum
Network interface card
So, we've learned a lot of basic concepts about virtualization, Xen, and XenServer. As mentioned earlier, our preferred choice was XenServer. Deploying and playing with XenServer will be covered in the following chapters. We will also discuss types of virtualization, types of hypervisor (virtual machine manager), Xen hypervisor domains, and Citrix XenServer components.
In the next chapter we'll go through the steps to install XenServer and connect to it with XenCenter.