archives

Want to support HowtoForge? Become a subscriber!

The Perfect Xen 3.1.0 Setup For Debian Etch (i386)

The Perfect Xen 3.1.0 Setup For Debian Etch (i386)

This tutorial provides step-by-step instructions on how to install Xen (version 3.1.0) on a Debian Etch (4.0) system (i386). 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.

The Perfect Xen 3.1.0 Setup For Debian Etch (i386) - Page 2

4 Installing The Binary Package

Run the following commands:

apt-get remove exim4 exim4-base lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig

apt-get install screen ssh debootstrap python python-twisted iproute bridge-utils libcurl3-dev libssl0.9.7

 

4.1 Install Xen

Then download xen-3.1.0-install-x86_32.tgz from http://www.xensource.com/download/dl_31tarballs.html, unpack it, and run the install script:

The Perfect Xen 3.1.0 Setup For Debian Etch (i386) - Page 3

4.2 Creating Virtual Machines (domU)

We 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. xen-tools are available as a Debian Etch package, so we install that one right now:

apt-get install xen-tools

Next we edit /etc/xen-tools/xen-tools.conf. This file contains the default values that are used by the xen-create-image script unless you specify other values on the command line. I changed the following values and left the rest untouched:

The Perfect Xen 3.1.0 Setup For Debian Etch (i386) - Page 4

4.3 Create A Virtual Local Network From The Virtual Machines (Optional)

(This chapter is optional.)

In this chapter I want to create a virtual network with my virtual machines, i.e. a network that is different from the network of dom0.

You can find a drawing of what I want to do here: http://wiki.xensource.com/xenwiki/XenNetworkingUsecase#head-7f23d0f2248cb0c70458f9339b4405e2b1bfc271

The Perfect Xen 3.1.0 Setup For Debian Etch (i386) - Page 5

5 Installing From The Sources

Run the following commands:

apt-get remove exim4 exim4-base lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig

apt-get install iproute bridge-utils python-twisted binutils zlib1g-dev python-dev transfig bzip2 screen ssh debootstrap libcurl3-dev libncurses5-dev x-dev build-essential gettext

 

5.1 Install Xen

Now we download xen-3.1.0-src.tgz from http://www.xensource.com/download/dl_31tarballs.html and unpack it:

The Perfect Xen 3.1.0 Setup For Debian Etch (i386) - Page 6

5.4 Creating Virtual Machines (domU)

(In this chapter I'm assuming that you've compiled a domU kernel to use with the virtual machines (/boot/vmlinuz-2.6.18-xenU). If you haven't, please replace all references to /boot/vmlinuz-2.6.18-xenU with /boot/vmlinuz-2.6.18-xen!)

We 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. xen-tools are available as a Debian Etch package, so we install that one right now:

The Perfect Xen 3.1.0 Setup For Debian Etch (i386) - Page 7

5.5 Create A Virtual Local Network From The Virtual Machines (Optional)

(This chapter is optional.)

In this chapter I want to create a virtual network with my virtual machines, i.e. a network that is different from the network of dom0.

You can find a drawing of what I want to do here: http://wiki.xensource.com/xenwiki/XenNetworkingUsecase#head-7f23d0f2248cb0c70458f9339b4405e2b1bfc271