Installing Xen on Debian Etch 4.0
Updated 15. August 2007
For a long time I have tested many different virtualization techniques; Xen, VMWare, and Microsoft VM. Until now I’m able to conclude that all of them are usable on my desktop machine, but both VMWare and Microsoft’s VM are more sluggish that Xen. This weekend I deployed my first server based on the upcoming Debian Etch and Xen. Everything worked out of the box.
Here is what I did to install Xen on Debian Etch:
sudo apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils
Boot into the newly installed Xen enabled Linux kernel
sudo reboot
Then adjusted the network settings in /etc/xen/xend-config.sxp. Enabling the network bridge:
(network-script network-bridge)
Install xen-tools:
apt-get install xen-tools
Xen tools is a collection package containing different tools related to Xen, a virtual machine creator etc.
Edit adjust the kernel and initrd parameters in /etc/xen-tools/xen-tools.conf to match the ones on your system:
Find out what the kernel image and initrd is named by:
ls /boot/vmlinuz*
/boot/vmlinuz-2.6.18-4-686 /boot/vmlinuz-2.6.18-4-xen-686
and
ls /boot/initrd*
/boot/initrd.img-2.6.18-4-686 /boot/initrd.img-2.6.18-4-686.bak /boot/initrd.img-2.6.18-4-xen-686
Adjust the lines
#
# Default kernel and ramdisk to use for the virtual servers
#
kernel = /boot/vmlinuz-2.6.18-4-xen-686
initrd = /boot/initrd.img-2.6.18-4-xen-686
Further adjust the xen-tools.conf to this settings:
dir = /home/xen
debootstrap = 1
size = 4Gb # Disk image size.
memory = 128Mb # Memory size
swap = 128Mb # Swap size
fs = ext3 # use the EXT3 filesystem for the disk image.
dist = etch # Default distribution to install.
image = sparse # Specify sparse vs. full disk images.
Create a home for all the coming virtual Xen guests:
mkdir /home/xen
mkdir /home/xen/domains
And then ready to create a virtual machine – guest, simply by:
xen-create-image -hostname=mailserver -ip=10.0.0.21 -netmask=255.255.255.0 -gateway=10.0.0.1 -passwd
Afterwards I was able to fire up the newly created virtual machine with:
xm create mailserver.cfg
If an error like this shows up
Error: Device 0 (vif) could not be connected. Backend device not found.
You should check your that you have enabled the network bridge, “(network-script network-bridge)”, in /etc/xen/xend-config.sxp and restarted the xen deamon by /etc/init.d/xend restart
When up and running either “xm list” or “xentop” can be used to get an overview of what instance are currently running
debian5:# sudo xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 874 1 r----- 657.9 mailserver 3 128 1 -b---- 8.0
Based on my experiences so far with virtualization and deploying virtualization in a enterprise setup, I really think that Xen is a very strong asset for Linux and Linux based distributions to show the world what they are up to. Virtualization is really a technique for enterprise server and data center managers to make a more robust and simplified setup, and I think that virtualization could play a significant role within the server market the coming years.
Related posts:
- Ubuntu Howto: Install Xen
- Xen Howto: Install Windows
- Howto Install Windows XP / Vista on Xen
- Seamless Windows Applications on Ubuntu Linux Using VirtualBox
- Importing / Exporting Virtual Disk Images with Virtual Box
- Virtualization Visualization with Visio
- Howto Install Ruby and Ruby on Rails on Debian Etch 4.0
- Howto PHP / Java bridge on Debian
- Update entry on Xen on Debian Etch
- Howto Access via ssh a Virtualbox Guest machine
Popular Related Items »
Incoming search terms
- debian xen
- xen debian
- installing xen on debian
- install xen on debian
- install xen debian
- debian install xen
- debian xen install
- xen install debian
- installing xen debian
- xen debian install
- xen server debian install
- debian squeeze xen
- xen debian etch
- debian xen howto
- xen on debian
- xen debian squeeze
- how to install xen on debian
- install debian on xen
- Debian xen network
- installare xen su debian
- Error: Device 2049 (vbd) could not be connected Backend device not found
- how to install xen debian
- install xen debian 5
- install debian xen
- install xen debian etch
- xen debian lenny
- installing xen on debian etch
- debian etch xen
- install xen debian lenny
- install xen server debian
- instalar xen debian
- xen 4 debian
- debian xen server
- Installing Xen
- install xen on debian etch
- xen etch
- debian xen network bridge
- instalar xen en debian
- instalasi xen di debian
- debian squeeze xen howto
- debian xen bootstrap
- install xen in debian
- squeeze xen
- debian xen installation
- installing xen debian etch

Xen Debian Etch - Fire_ant personal blog said,
November 8, 2006 @ 14:02
[...] Xen on Debian Etch. [...]
Bob Redoch said,
November 23, 2006 @ 9:54
Xen is a very very cool technology
.bootstrap » Update entry on Xen on Debian Etch said,
January 26, 2007 @ 9:54
[...] Installing Xen on Debian Etch 4.0 [...]
Alex Chejlyk said,
July 5, 2007 @ 3:21
Excellent write up, very easy to follow. Xen is a powerful technology, that can save companies thousands, at the same time helping to save the environment (less hardware, less electrical power). Virtualization is the future, and the future is now.
Cheers,
Alex C.
namit said,
July 15, 2007 @ 3:28
Hey whats the story with step.
“Adjust the lines” what lines should we update?
Thanks
Winnie31 said,
July 18, 2007 @ 13:41
Thank you very much, Very good article,
Cheers,
SR
sign said,
August 2, 2007 @ 16:07
Thank you – excellent article.
Note, during installation you need to create
/home/xen
directory.
If not – creation of loop images will fail
and start of virtual machine will fail with message
Error: Device 2049 (vbd) could not be connected. Backend device not found.
Also I have to configure interface eth0 with static address – otherwise network was unreachable.
Bob said,
August 8, 2007 @ 14:11
Hello,
Thank you for a great guide on Debian 4.0 and Xen.
miksuh said,
August 26, 2007 @ 20:20
“This weekend I deployed my first server based on the upcoming Debian Etch and Xen.”
What do you mean by “upcoming”? Debian 4.0 ‘Etch’ was released on the 8th of May 2007. Next upcoming Debian release is called Lenny.
Peter said,
August 31, 2007 @ 9:17
Well written and clear. The more I play with Xen the more I am liking it.
lws said,
September 1, 2007 @ 11:06
Thank you very much by the article!
A very good work!
————————
http://www.luckywebsoft.com
HCVST said,
September 6, 2007 @ 18:28
Thank you. It worked right away.
Note to users:
Consider changing the debootstrap mirror in /etc/xen-tools/xen-tools.conf
to a server close to you. Check /etc/apt/sources.list
Claus said,
September 6, 2007 @ 19:32
Hello HCVST
Yes, Indeed – It is very recommended to use the nearest possible Debian mirror for the Debian bootstrapper.
boink said,
September 7, 2007 @ 8:19
thanks for the page, really well done! hope to see more stuff from you!
lame hacker said,
September 14, 2007 @ 22:32
great step by step — thanks
I made one mistake on the directions — bad networking setup
possibly want to mention that if you get the network error
Error: …. Backend device not found.
in addition to the steps you provided
the user may need to edit /etc/xen/yourservername.cfg to fix networking error
trb said,
October 11, 2007 @ 17:25
… may need to edit /etc/xen/yourservername.cfg to fix networking error
What did you change to fix the “Backend device not found” error?
Installing debian 4.0 on dell Poweredge 6950 « Alpesh Gajbe’s Weblog said,
April 25, 2008 @ 12:51
[...] the login prompt. After this we went about installing the debian 4.0 xen images we followed this tutorial . Installing the xen images using this method was a piece of cake and after one hour we had six [...]
Robert said,
February 11, 2009 @ 0:51
Can anyone show me how to install centos or fedora from debian? preferably using the installation cds. Or how I can take a running centos system and migrate it to a domU on a debian Dom0
jors said,
March 13, 2009 @ 10:21
Please, remove all search engine terms used to reach this page/post. It turns mad people searching things they won’t find on this post (or even this entire site)!
Gricey said,
March 17, 2009 @ 11:37
These search terms have led me here twice from Google for something that isn’t described in your article at all. Way to go. Stop poisoning the internets and remove that crap.