Yesterday I installed and configured xen in my PC. Here is a short description of what you need to do:
1. First intall xen kernel images, modules along with some utilities.
#apt-get update#apt-get install linux-image-2.6.18-4-xen-686 linux-modules-2.6.18-4-xen-686 xen-hypervisor-3.0.3-1-i386 xen-linux-system-2.6.18-4-xen-686 xen-tools xen-utils-3.0.3-1 xen-ioemu-3.0.3-1 bridge-utils debootstrap libc6-xen xen-utils-common rpmstrap iproute sysfsutils[
Note: packages 'linux-image-2.6.18-4-xen-686 linux-modules-2.6.18-4-xen-686 xen-hypervisor-3.0.3-1-i386 xen-linux-system-2.6.18-4-xen-686 xen-tools xen-utils-3.0.3-1 xen-ioemu-3.0.3-1' are version specific and may have other versions depending on your system, so you need to change their version sometimes.]
2. After the packages have been installed properly boot from the new xen kernel.
3. Open
/etc/xen/xend-config.sxp file. Make sure that the following lines are there:
(logfile /var/log/xen/xend.log)
(network-script network-bridge)
(vif-script vif-bridge)
And also make sure that the following line is
NOT there:
(network-script network-dummy)
4. #mkdir /home/xen -p
5. Now we need to edit
/etc/xen-tools/xen-tools.conf file. This is a sample configuration for running Debian sarge on a 4GB HDD with 256 mb of ram
dir = /home/xendebootstrap = 1size = 4Gbmemory = 256Mbswap = 256Mbfs = ext3dist = sargegateway = 192.168.1.1netmask = 255.255.255.0passwd = 1kernel = /boot/vmlinuz-2.6.18-4-xen-686initrd = /boot/initrd.img-2.6.18-4-xen-686mirror = http://ftp.us.debian.org/debian/If you want to set-up an rpm based system like centos then put 'rpmstrap = 1' instread of 'debootstrap = 1' and change 'dist = sarge' to 'dist = centos4'.
6. Now create and image for that configuration:
#xen-create-image --hostname=sarge-xen --ip=192.168.10.2 --boot7. After the installation has finished you have enter your new password and the new system will boot
8. When you need to shutdown your system:
#xm shutdown sarge-xen9. When you need to open that image for work:
#xm create sarge-xen.cfg -cNow my sarge is runnning in console mode. I'll come up with more on this when I have time. Until then ... ...