Build Xen from source (takes longer!!) #check cpu for VT egrep '(vmx|svm)' /proc/cpuinfo ----------- Lots of information taken from http://www.howtoforge.com/debian_etch_xen_3.1 and steve kemp's websites/blogs Install debian etch as host (dom0) I prefere setup with LVM2 enabled: vhost10:~# pvdisplay --- NEW Physical volume --- PV Name /dev/md1 VG Name PV Size 794.09 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID hOhjA2-ctau-y0yZ-FnTJ-jIzy-aPa5-1hYEK9 vhost10:~# vgcreate XenVG /dev/md1 Volume group "XenVG" successfully created ----------------------------------------- # add steve kemps repository to our local machine echo "deb http://apt.steve.org.uk/etch etch main non-free contrib" >> /etc/apt/sources.list #get key for validating all packages in this repository wget -O - http://apt.steve.org.uk/apt-key.gpg | apt-key add - echo "deb http://www.backports.org/debian etch-backports main contrib non-free" >> /etc/apt/sources.list #get key for validating all packages in this repository wget -O - http://backports.org/debian/archive.key | apt-key add - #now update available packages apt-get update apt-get dist-upgrade apt-get remove exim4 exim4-base lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig apt-get install iproute bridge-utils python-twisted binutils zlib1g-dev python-dev transfig bzip2 screen ssh debootstrap libcurl3-dev libncurses5-dev x-dev build-essential gettext libssl-dev rinse #AMD64 *ONLY* cd /usr/src wget http://bits.xensource.com/oss-xen/release/3.1.0/src.tgz/xen-3.1.0-src.tgz tar -xvzf xen-3.1.0-src.tgz cd xen-3.1.0-src/ #otherwise you get an error chmod 644 /usr/src/xen-3.1.0-src/tools/check/check_x11_devel apt-get install gcc-3.4 export CC=/usr/bin/gcc-3.4 #now start the compilation make world make install #i386 *ONLY* cd /usr/src wget http://bits.xensource.com/oss-xen/release/3.1.0/src.tgz/xen-3.1.0-src.tgz tar -xvzf xen-3.1.0-src.tgz cd xen-3.1.0-src/ make world make install apt-get install libc6-xen yaird mkinitrd.yaird -o /boot/initrd.img-2.6.18-xen 2.6.18-xen #install xen-tools apt-get install xen-tools xen-shell vnstat libc6-xen update-rc.d xend defaults 20 21 update-rc.d xendomains defaults 21 20 # Get debootstrap from ubuntu and install under debian, eg: # This way you can install both ubuntu & debian guests. wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.7_all.deb dpkg -i debootstrap_1.0.7_all.deb rm debootstrap_1.0.7_all.deb #vi /etc/modules and append: # loop max_loop=255 create virtual machines (domu) xen-create-image --hostname=xen1.example.com --size=2Gb --swap=256Mb \ --ip=192.168.0.101 --netmask=255.255.255.0 --gateway=192.168.0.1 --force \ --lvm=XenVG --memory=64Mb --arch=i386 --debootstrap --dist=etch \ --mirror=http://nl.archive.ubuntu.com/ubuntu/ --passwd --------------- migrate Physical > Virtual P2V On the physical server cd /;rsync -av --exclude-from="/root/rsync_exclude" -e ssh [-p #] * [target_host_with_mounted_filesystem]:/mnt/backup In /root/rsync_exclude put ------------- /media/ /proc/ ------------- Virtual manager http://et.redhat.com/~rjones/debian-libvirt/ =============================== Ubuntu 32 bits: apt-get install ubuntu-xen-server ------------------ Ubuntu 64 bits: apt-get install linux-image-xen bridge-utils libxen3.1 python-xen-3.1 xen-docs-3.1 xen-hypervisor-3.1 xen-ioemu-3.1 xen-tools xen-utils-3.1