Virtualization is a technique of dividing a single server into several Virtual Servers, according to hardware and/or software, CPU Time/Process scheduling and memory allocation. Users can install and use their own Operating Systems simultaneously on these virtual servers.
Host OS - The base operating system which controls and co-ordinates the Virtual Servers
Guest OS - The Operating System installed on a Virtual Server
The most commonly using virtualization techniques are;
This is the simple and most popular virtualization technique. In this method, the virtualization is performed based on a single host operating system. Only the same instance of the host Operating System can be used on the virtual Servers as guest Operating Systems. Examples : OpenVZ, Linux-VServer
2. Paravirtualization
This technique is somewhat similar to OS level Virtualization, except it is possible to use different guest Operating Systems like Microsoft XP, RedHat Linux, SUSE…etc on the virtual servers. This requires customized versions of Operating systems as guest operating systems. i.e, we can’t use the currently available XP, FC6…etc on these virtual servers, but the specially designed versions of these operating systems.
hypervisor - The hypervisor is an application (eg. Kernel, Host OS) that runs between the server hardware and the guest operating systems. In the case of XEN, a specially designed Linux kernel is the hypervisor.
This is the ideal virtualization technique in which any Operating system is used as the host OS and guest OSs. i.e, we can use unmodified versions of OSs on the virtual servers.
Full virtualization using XEN
Actually XEN lies between paravirtualization and full virtualization. XEN integrates its hypervisor on a linux kernal, so that we have to compile and run this modified kernel on the server on which we wish to perform the virtualization. XEN also supports virtual servers management though graphical interfaces. Therefore it is better to install a full version of Linux on the server first, then compile xen-linux kernel, reboot the server using the xen-linux kernel to create and manage servers. In this case, we can create and manage virtual servers through console and/or GUI oriented applications.
Implementing Full Virtualization using XEN (Simplified Steps)
- Requirements
- CPU support
- Installing XEN
- Enabling XEN KernelInstalling Windows 2003 on top of a Virtual Machine
- Installing Linux based OSs on top of a Virtual Machine
The requirement of a XEN Fully Vitualized server are as follows;
- A server installed with working Fedora 7 Operating System
- Application builders like gcc v3.2.x binutils, GNU make
- 1 GB Memory (Recommending 256 M for each virtual servers) 40 GB HDD
- A VT enabled Intel system or AMD-V enabled AMD system (For Full Vitualization)
- CDROMs of Guest Operating Systems (Linux OSs or Windows OSs like 2003/XP/Vista)
Make sure that the CPU supports Full virtualization over XEN.
- For INTEL Systems, it should have the ‘vmx’ support. To check, use the following command;# grep vmx /proc/cpuinfo
- For AMD systems, it should have ’svm’ support. To check, use the following command;# grep svm /proc/cpuinfo
If these commands return nothing, then check whether the setting
related to ‘Virtualization’ has enabled on the BIOS (it is turned OFF
by default). If the BIOS is not enabled for virtualization, then it may
be necessary to upgrade the BIOS.
First, check for a XEN enabled kernel on the Host OS. Installation of a XEN kernel on Fedora 7 is quite simple using the ‘yum’ command as follows;
# yum install kernel-xen xen virt-manager
This will install,
- XEN enabled kernel for both Host and Guest OSs
- All required packages and their dependencies
- Hypervisor for controlling Guest OSs
- XEN packages for interacting with the Hypervisor
- Edit the file ‘/boot/grub/grub.conf’ and set the default kernel to ‘kernel-xen’
- Restart the server
- Type the command ‘uname -r’ and make sure that the running kernel is ‘kernel-xen’
Not so long ago, installing any OS (whether it is Linux or Windows) on top of XEN was quite a nightmare for system administrators. Now Fedora 7 provides a way to install Guest OSs in a few mouse clicks.
Here is how to do it.
- Log into Fedora 7 (Host OS) in X session
- Goto Application menu and select ‘Virtual Machine Manager’ from ‘System Tools’
- This will show the wizard to cerate/manage Virtual Machines
- Select the ‘New Machine’ option from the ‘File menu’
- Type a name for the new node, say ‘Windows2003′ (make sure there
are no spaces on the node name), and click on the ‘Forward button’. - On the next window select ‘Full Virtualization’ and click on the ‘Forward button’.
- Now locate the installation media, you can either use a CD-ROM or use an ISO image
- Also select the type of Guest OS as ‘Windows 2003′
- Assign a storage space for the Virtual Machine
- Now select ‘default virtual network’ and click on the ‘Forward button’.
- Now allocate memory and CPU for the new Virtual Machine (A minimum of 250 M of RAM and 1 VCPU)
- Now the installation of Windows 2003 oven XEN will begin
- Once the installation is completed, we can start using the Windows 2003 installed Virtual Machine.
Use the same steps described in the previous section, using proper CD-ROM or ISO image.
If you wish to create Virtual Machines using a bash shell, use the following command.
This method will not allow you to directly install the OS from a CD_ROM or from an ISO image, but it can from NFS, FTP, and HTTP locations. A detailed procedure for doing this can be found at xensource.
References- http://www.xensource.com
- http://librenix.com/?page=Xen
- http://fedoraproject.org
- http://www.cl.cam.ac.uk/research/srg/netos/xen/
About the author:
Sibin C has worked for over a year in Bobcares as a System Administrator. His
interests mainly lie in writing scripts that will ease the work of system administrators, securing and administrating Linux/Windows servers.
No comments:
Post a Comment