Global Navigation

Top Navigation

Left Navigation


Frequently Asked Questions

This page answers to both frequently asked questions and frequently anticipated questions.

1. Software Requirements

The software requirements should be portable across both Debian Stable, and Unstable distributions.

The scripts require:

  • The rpmstrap tool if you wish to install RPM based distributions
  • The debootstrap tool if you wish to install Debian-based distributions
  • Perl.
  • The Text::Template Perl module
  • The Config::IniFiles Perl module.
  • GNU Bash
2. Supported Distributions

The distributions which may currently be created are Debian GNU/Linux Sid, Sarge, Etch, and CentOS4.

Adding new distributions will involve finding a method to install the software image, and writing some scripts to configure the new installation.

3. How are new images installed?

The installation is most typically done using the standard debootstrap tool, however several alternatives are availble for installing non-Debian distributions such as Gentoo GNU/Linux.

The simplest method is to install the desired operating system in a new partition, then use the --copy argument to install a new copy of this distribution by simply recursively copying the installed files from the real image.

Alternatively you could use tar to archive the installation directories of another distribution, and then "install" that distribution with the --tar argument.

4. How are new installations configured?

For each distribution which is supported there is a directory of shell scripts which is responsible for conducting the configuration. These are known as the "hooks".

To add a new distribution create a directory /usr/lib/xen-tools/name.d/. When it comes to configuration time each script in this directory will be executed (in sorted order) with the path to the new installations root directory.

As an example of what you can do please consult the existing hooks - and consider contributing your own scripts to be included in the next release.

5. How do I use more loop devices?

If you're using loopback images to store your Xen guest domains you will almost certainly exhaust the default number of loopback images your distribution has created. (This is typically just eight!)

There are two things you must do to change this. Firstly you must specify the number of devices to use when loading the loop module.

echo 'options loop max_loop=255' > /etc/modprobe.d/loop.local

Now you need to ensure that you have the actual devices in the /dev directory on your host:

for i in $(seq 8 255) ;  do mknod /dev/loop$i b 7 $i ;done
chmod 664 /dev/loop*
chown 0.disk /dev/loop*
6. How can I alter what is written to the Xen configuration file?

When a new image is created a configuration file for Xen will be automatically created in the /etc/xen directory. The new configuration file will be named "hostname.cfg", so far example the host will have a configuration file created called /etc/xen/

If you wish to modify the information which is written here by default you should adjust the template which is used to generate those files. The template file is /etc/xen-tools/xm.tmpl - and this is processed to create the configuration file.

The contents should be fairly obvious, but feel free to ask for help if you need to make changes and cannot do so.