Saturday, March 20, 2010

How to setup xen virtual machine in rhel5 / centos5


Xen is a virtualization software/ virtaul machine or virtual private server used in linux platform as VMware, Virtuzzo, openVZ, Parallelz etc. It decreases the need of dedicated machines. It is easy to configure. See the steps below!

First we have to check whether the processor support virtual machines or not
#cat /proc/cpuinfo
flags : pae

PAE is Physical Address Extension.

[or Processor with Intel VT technology]

##3Installing xen Virtual private server###
This is using a yum server. If you dont have a yum server configured, install the needed rpms.

yum -y install xen* kernel-xen*

7 packages will be installed


#yum -y install virt-manager /if not installed

###Change in grub.conf###
default=0 /Edited grub.conf n made xen boot 1st.
[otherwise you can select the xen kernel from grub menu while booting]

###Installation of Virtual Machine###
Two installation methods
[just execute the following command in terminal for graphical installation]
[just execute the following command in terminal for text installation]

###In text mode install###

virt-install must be run as root and, once invoked, will ask a number of questions before creating the guest system. The question are as follows:

What is the name of your virtual machine? - The name by which the guest system will be referenced when managing and monitoring the system with other tools.

How much RAM should be allocated (in megabytes)? - The amount of system memory to be made available to the guest operating system.

What would you like to use as the disk (path)? - The path to the file or disk partition to be used to contain the guest operating system.

Would you like to enable graphics support? (yes or no) - Defines whether the graphical installer is used (in a VNC window) or the text based installer in the shell.

What is the install location? - The location of the installation files for the OS. This can be an ftp, nfs, http, ISO image or local CD or DVD device location.

For listing Domain and virtual instances
#xm list

For starting a virtual machine
#xm create vm_name
#xm console vm_name

For shutting a virtual machine
#xm destroy vm_name


  1. Hey buddy i had tried but its not working, the xen package is nt installing properly

  2. What error you are getting? can paste the errors?


Be nice. That's all.