Virtualization With Xen 3.3.1 On Debian Etch
Virtualization With Xen 3.3.1 On Debian EtchVersion 1.0 This tutorial provides step-by-step instructions on how to install Xen on a Debian Etch (4.0) system. Xen lets you create guest operating systems (*nix operating systems like Linux and FreeBSD), so called "virtual machines" or domUs, under a host operating system (dom0). Using Xen you can separate your applications into different virtual machines that are totally independent from each other (e.g. a virtual machine for a mail server, a virtual machine for a high-traffic web site, another virtual machine that serves your customers' web sites, a virtual machine for DNS, etc.), but still use the same hardware. This saves money, and what is even more important, it's more secure. If the virtual machine of your DNS server gets hacked, it has no effect on your other virtual machines. Plus, you can move virtual machines from one Xen server to the next one. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI'm using a Debian Etch system with the hostname server1.example.com and the IP address 192.168.0.100 as the host system (dom0). I will use Debian Etch for the virtual machines (domU) as well. This guide will explain how to set up image-based virtual machines and also LVM-based virtual machines. Please note: Xen 3.3.1 comes with the kernel 2.6.18 which is pretty old. If you are using new hardware, the system might not boot anymore due to missing drivers!
2 Installing XenBefore we install Xen, we must install some prerequisites: apt-get install make gcc libc6-dev zlib1g-dev python python-dev python-twisted bridge-utils iproute libcurl3 libcurl3-dev bzip2 module-init-tools transfig tgif libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev bcc bin86 gawk pciutils-dev mercurial build-essential Next we download Xen 3.3.1... cd /usr/src ... and uncompress it: tar -xvzf xen-3.3.1.tar.gz Now we build it as follows: make world && make dist This can take some time, so please be patient. Afterwards, we install Xen: ./install.sh The output should look as follows: server1:/usr/src/xen-3.3.1# ./install.sh Run mv /lib/tls /lib/tls.disabled ... and create the system startup links for Xen: update-rc.d xend defaults 20 21 Afterwards we open /etc/modules and make sure that we have the line loop max_loop=64 in it (this step is needed only if you want to create image-based virtual machines - you can skip it if you want to create LVM-based virtual machines): vi /etc/modules
Now take a look at the /boot directory: ls -l /boot/ server1:/usr/src/xen-3.3.1# ls -l /boot/ As you see, there's a new kernel, 2.6.18.8-xen, but no ramdisk for it; therefore we build one... depmod 2.6.18.8-xen ... and update our bootloader: update-grub Then reboot the system: reboot Run uname -r and your new Xen kernel should show up: server1:~# uname -r
3 Installing xen-toolsWe will use xen-tools to create virtual machines. xen-tools make it very easy to create virtual machines - please read this tutorial to learn more: http://www.howtoforge.com/xen_tools_xen_shell_argo. We don't install the xen-tools package from the Debian Etch repository (because it is quite old), but directly from the repository of the developer - that way we get the newest version. Open /etc/apt/sources.list... vi /etc/apt/sources.list ... and add the following line:
Then run... wget -q http://apt.steve.org.uk/apt-key.gpg -O- | apt-key add - && apt-get update ... and install xen-tools: apt-get install xen-tools
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com
Red Hat Virtual Experience - a free virtual event. Dec. 9th





print: 
Recent comments
20 hours 57 min ago
1 day 33 min ago
1 day 2 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 15 hours ago
1 day 19 hours ago
2 days 18 min ago