
#check cpu for VT
egrep '(vmx|svm)' /proc/cpuinfo


-----------
Lots of information taken from 
http://wiki.linuxfellaz.net/doku.php?id=xen_on_etch
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

#AMD64 example
apt-get install xen-tools bridge-utils xen-shell debootstrap xen-hypervisor-3.0.3-1-amd64 linux-image-2.6-xen-amd64 

#got a hardware virtualization enabled cpu ? install:
apt-get install xen-ioemu-3.0.3-1

#i386 
apt-get install linux-image-2.6-xen-vserver-686 xen-hypervisor-3.0.3-1-i386-pae xen-tools xen-linux-system-2.6.18-4-xen-vserver-686 linux-headers-2.6-xen-vserver-686 libc6-xen bridge-utils

#optional: if you want to provide redhat/centos/suse you need to install rinse:
apt-get install rinse

# Get debootstrap from ubuntu and install under debian, eg:

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 * \
    [target_host_with_mounted_filesystem]:/mnt/backup

In /root/rsync_exclude put
-------------
/media/
/proc/
-------------

Virtual manager
http://et.redhat.com/~rjones/debian-libvirt/
