Wednesday, February 22, 2012

Debian Etch and Xen

Debian Etch and Xen 3.0.3 on amd64
(based heavily on Debian Sid gets Xen 3.0)
This walk through will get you set up with the tools you need and the hard configuration stuff for getting file-backed virtual xen machines running.  If you want to run partition (disk)-based VMs, I have another page for that but you will still need to get a bunch of the packages listed here as well as setting up the interfaces file.  We will need the following packages:
xen-hypervisor-3.0.3-1-amd64
xen-utils-3.0.3-1
linux-image-2.6.18-3-xen-amd64
bridge-utils
iproute
sysfsutils
xen-tools
So here we go. Start with:
apt-get update
Then install the following (substituting a current kernel and package versions):
root@debian:~# apt-get install xen-hypervisor-3.0.3-1-amd64 xen-utils-3.0.3-1 linux-image-2.6.18-3-xen-amd64
I prefer to run stock kernels, if you want to run a custom kernel you are on your own. Check out the xen-users mailing list archives if you run in to trouble, the topic comes up occasionally. Once apt has done its thing, install the other necessary packages:
root@debian:~# apt-get install bridge-utils iproute sysfsutils xen-tools
The defaults in /etc/xen/xend-config.sxp are fine, we are going to change /etc/network/interfaces to handle networking. Open up your favorite editor and change /etc/network/interfaces, removing the eth0 entry and adding:
auto xenbr0
iface xenbr0 inet static
address 192.168.0.10
netmask 255.255.255.0
network 192.168.0.0
bridge_ports eth0
Reboot the machine and you are ready to use xen-tools. I will refer you to the end of Debian Sid gets Xen 3.0, I would just be copying it here.
The most difficult part in setting this up was the entry in /etc/network/interfaces, as I couldn’t find any documentation on it. I followed at least three separate threads on xen-users related to similar networking issues. A kind soul finally shared the magic and said that the bridge had to be brought up and it would bring up the interfaces attached to it.

Resources
http://www.debian-administration.org/articles/396

No comments:

Post a Comment