Skip to content

Install XEN on Debian wheeze

Quick recipe on XEN installation on Debian whizzle (testing) dom0

Host XEN installation

Install the packages with apt:

[shell]
root@xen:~# apt-get install xen-hypervisor-4.1-amd64
root@xen:~# apt-get install xen-utils-4.1
root@xen:~# apt-get install xen-tools
[/shell]

After installing, a reboot is neede to start the new xen-kernel.

Host XEN configuration

Add this line to /etc/modules

[shell]
loop max_loop=64
[/shell]

I will run the VMs in bridge mode,so I need to create a bridge the-debian-way, using /etc/network/interfaces

[shell]
root@xen:~# cat /etc/network/interfaces | grep -v ^# | sed -e /^$/d
auto lo
iface lo inet loopback

auto xenbr0
iface xenbr0 inet static
bridge_ports eth0
address 192.168.1.213
broadcast 192.168.1.255
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1

root@xen:~#
[/shell]

Edit the XEN config /etc/xen/xend-config.sxp

[shell]
root@xen:/etc/xen# cat xend-config.sxp | grep -v ^# | sed -e /^$/d
(logfile /var/log/xen/xend.log)
(loglevel DEBUG)
(network-script ‘network-bridge bridge=xenbr0’)
(vif-script vif-bridge)
(dom0-min-mem 196)
(enable-dom0-ballooning yes)
(total_available_memory 0)
(dom0-cpus 0)
(vncpasswd ”)
(keymap ‘es’)
root@xen:/etc/xen#
[/shell]

Final thoughts

XEN is easy to install, configurable, stable and can be run with only a few commands:

[shell]
xm create -c /etc/xen/machine.cfg
xm shutdown machine
xm destroy machine
xm save machine
xm console machine
[/shell]

Published inlinux