=====Installing Xen on a Debian Wheezy Host=====
All information in the guide was taken from the following link:
[[http://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide|XenProject PV Guest tutorial]]
====Enable Virtualization Support in BIOS====
The virtualization option appears differently in different BIOS builds but generally it is referred to as “Enable Virtualisation Technology” or “Enable Intel VT” for Intel chipsets, however in some cases it can be listed as “Vanderpool Technology”. Oftentimes this option can be found under the “Advanced Chipset Features” menu in the BIOS. Similar also for AMD.
====Install Debian====
Download the netinst image from the following link:
http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
Partition the disk as follows:
sda1 - /boot 250MB
sda2 - / 15GB
sda3 - swap
sda4 - reserved for LVM
Be sure to install sudo, vim, and tcpdump. Add the user to sudo group.
apt-get install sudo, vim, tcpdump
usermod -a -G sudo
====Configure LVM for Guest Storage====
apt-get install lvm2
pvcreate /dev/sda4
vgcreate vg0 /dev/sda4
====Set up Linux bridge for guest networking====
apt-get install bridge-utils
Edit ''/etc/network/interfaces'' to look as follows IOT create a bridge:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0
This is the same as doing:
brctl addbr xenbr0
brctl addif xenbr0 eth0
dhclient xenbr0
====Install the Xen Hypervisor====
Install the hypervisor and xen-tools (xm).\\
Once Complete, configure grub to boot the hypervisor before the debian OS.
apt-get install xen-linux-system xen-tools
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
update-grub
====Create and Manage Guests====
Update the xen config file ''/etc/xen-tools/xen-tools.conf'' prior to creating vm's on the cmd line. Also, be sure to uncomment line 146: ''# (network-script network-bridge)'' of ''/etc/xen/xend-confix.sxp''.
After updating xen-tools.conf with the config posted below, create and connect to a new guest using xen-create-image.
xen-create-image --hostname=tutorial-pv-guest \
--vcpus=2 \
--pygrub
xm create -c /etc/xen/tutorial-pv-guest.cfg
#xm create /etc/xen/tutorial-pv-guest.cfg && xm console tutorial-pv-guest
xm shutdown tutorial-pv-guest
test