The one and only one enterprise grade virtualization
software available in Open Source is Xen. It's highly secure, reliable and
works with minimum hardware overhead. But with all the positives there is also a
huge drawback-the configuration and installation is a nightmare.
Everything is done through command interfaces and by
modifying text configuration files. So, if you are not a Linux geek then this is
obviously not your cup of tea.
|
But there is something which can help you in deploying
this software in your enterprise. You can even test the performance of the
software and the guest
OSs
running on top of that before
deploying it.
This is done basically with the help of a Live CD which is
a customized Knoppix version with a Xen kernel. So, if you feel like testing Xen,
all you have to do is to boot the machine with the live CD and your Xen machine
will be up and running. This also comes with a pre-created Guest OS which has
the same kernel and file system as the Host OS. So, all you need to do to start
is, to run a simple
command:
$ sudo knoppixU
Running the Knoppix-installer will start a graphical interface like this. Now you can install the live CD on your HDD |
More details on this command are available later in
this
article. Whenever you feel that the application is good for your needs, you can
choose to install the Live CD onto your harddisk and configure more guest
OSs
of your choice. Here, we'll see how to go about it.
Installing Xen-Knoppix on the harddisk
I don't know whether you'll believe or not. The installation of Knoppix
nowadays is more easier than installing a standard Linux distro such as Fedora
or Debian. To do so, all you've got to do is to boot up your machine with the
Xen-Knoppix Live CD. Subsequently, open up the terminal and start the
installation with the following command:
#sudo knoppix-installer
Here, sudo command is used to start the installer with the
root privilege. If you don't use sudo then the application will terminate with
an error saying 'Permission Denied'. Now this command will open up a
graphical wizard. Just continue hitting OK or Next until you see a dialog box
which says 'Knoppix Partition Menu.'
Xen Knoppix has a very easy to use and completely graphical partition manager called qtparted |
Here, select the first option which says 'Partition the
Hard Drive' and select Ok. This will open up a neat tool called parted. This
tool looks pretty similar to the PowerQuest Partition Magic. With the help of
this tool you have to create an ext3 partition and a swap partition. You can
have any specific size for these partitions. Just ensure that if you're
planning to have images of the partitions of the guest
OSs
in the same partition instead of having separate physical partitions, then
you should have a good amount of space in the ext3 partition. Now, create a swap
partition which is double the size of the amount of RAM you have. After you are
done with all of this, click on the floppy icon at the top left corner of the
windows which says 'Commit' to create the partitions.
Now close the application and you will be directed to the
previous wizard. On this window select the first option which says 'Configure
Installation' and hit Enter. After this, it will seek information such as the
'System Type' (here you can go with the default option), partition type
(select razorfs), username, password and the root's password. Fill in all the
fields with appropriate values. It will also ask you where you want to install
the Boot loader (grub in this case). Select MBR if you don't want to do dual
boot (not good or this type of setup). After you're done with all of this, the
'Knoppix Installer' will re-appear. Now select the second option from here
which says 'Start Installation' and within a couple of minutes the Live CD
will get installed on your machine.
Using the Live CD |
Suppose, you don't #sudo knoppixU This is basically a #sudo knoppixU nat NOTE: If you want to Now, when you run this And when you need to |
Installing New Guest
OSs
your machine. To configure Xen, reboot the machine and when the boot options
show up, select 'Xen 2.0' and press Enter. This will boot up PCQLinux using the
Xen kernel — customized for virtual machine operations. Now you should be able
to login as root. Note that password, configuration and all other settings
remain the same as in the host OS. The only change is that we have booted with a
customized Xen kernel. Upon login, create a file named guest in /etc/xen
directory with:
kernel =
"/boot/vmlinuz-2.6.10-xen0"
memory = 128
name = "guestos"
nics = 1
ip = "192.168.1.1"
disk = <'file:/dev/hda6,hda6,w'>
root = "/dev/hda6 rw"
Substitute hda6 with the partition on which you installed
the guest OS.
Launch the guest OS
Open a terminal window in X and issue:
/etc/init.d/xend start
Then issue the following to launch the guest OS:
xm create -c /etc/xen/guest
vm=1
This should start the boot sequence for the guest OS and
let you login to the guest Linux OS. If you issue the ifconfig command on the
host OS, you will be able to see a virtual network interface named xen-br0.
Through this virtual interface the host OS will be able to access the guest OS
and the services running on it.
Anindya Roy