Configuring Xen Tools

Configuring Xen ToolsFirst, modify the file /etc/xen-tools/xen-tools.conf to have the following options (comments from the configuration file removed). Don't just copy/paste this. It is set up for my machine, my network, on a specific install I was doing. Thus, the lvm, network, kernel and initrd are likely to be totally incorrect for your setup.

# comment this line out; it is only for FBD
# dir = /home/xen#
# give the virtual (ie, /etc/virtual name) that all LVM partitions should be created from
 = virtuals
# use debootstrap
debootstrap = 1
# size of root partition on the virtual. 4G is more than enough
size   = 4Gb      # Disk image size.
# amount of memory to allocate for a new virtual (you can change this after the fact)
memory = 128Mb    # Memory size
# size of swap partition to create
swap   = 128Mb    # Swap size
# File system to use for root partition
fs     = ext3     # use the EXT3 filesystem for the disk image.
# distro to use for default
dist   = etch    # Default distribution to install.
# don't use full unless you know what you are doing
image  = sparse   # Specify sparse vs. full disk images.
# set up default networking for new virtuals (you will put the IP on the command line)
gateway   =
netmask   =
# ask for root password when virtual created
passwd = 1
# copy all users from DOM0 for the virtuals
accounts = 1
# this should point to your kernel and initrd. Should be set correctly when xen-tools installed
kernel = /boot/vmlinuz-2.6.18-6-xen-amd6
initrd = /boot/initrd.img-2.6.18-6-xen-amd64
# I use i386 for all virtuals as I believe it allows 64bit processors to allocate things nicely. Also, backwards compatible with older processors
# where to get the install image from
mirror =
# set to 1 if you want the image booted (very, very bad idea)
# boot = 1

Comments were added by me to explain why I'm doing it this way. Commented out configuration lines show lines you should comment out.

Warning: check very carefully the lines for kernel, initrd (version updated 02/02/2009 for 64bit Intel system) and lvm. If you don't get those right, your system will not work. Look in /boot for the name of the correct kernel and initrd (uname -a). Do an vgdisplay to ensure you are using the correct LVM volume group. Do not simply copy what I've put here.

Note if you don't like my defaults, read the configuration file. There are a lot of comments in it. It is basically a manual in and of itself.

How to create a Xen Virtual Debian machine

xen-create-image --ip --passwd --hostname vidserver
# the following fix some errors where, in the past, the Debian bootstrap installer would not put the correct 
# locales into your virtual. This builds all locales, then calls the dpkg configuration tool to allow you to
# select what you want. You do not do this unless you get weird warning messages about "locale not set" when
# you are installing packages. They are generally not a problem, but it is hard to see any real errors when
# you have that warning popping up all the time.
apt-get install locales-all
Last update:
2012-01-30 05:17
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.