Adrian's Xen Images


These Xen DomU images are provided purely to make it easier for people to evaluate the FreeBSD/Xen DomU support and provide feedback to the FreeBSD developers.

Please email with feedback about these images; do not contact Adrian or other developers directly.

More information about the workings of all of this can be found at ../XenHackery.

What are these images?

These images are the result from a make buildworld/buildkernel/installworld/installkernel/distribution. There is a little bit of customisation to make them work as a FreeBSD Xen DomU.

The image contains a complete base system (with all tardists installed; but no source, no ports, no X11 and no packages.) The images default to booting to single user mode unless otherwise indicated.

They are intended to be self-contained and boot vi "pygrub".

How did you build them?

Then! I run "makefs" (from NetBSD, and sysutils/makefs) which creates a basic FFS image from a directory tree. For example,

# makefs -M 512m root.img /path/to/destdir
# gzip -9 root.img

The build/install script can be found here: .

Note that I am currently manually building the disk images.

How does it boot?

These images use "pygrub", the python GRUB bootloader provided with Xen. This reads the filesystem image enough to extract the kernel, ramdisk (remember this is all primarily designed for Linux!) and the config file. It then copies these to the Xen management code so it can assemble the virtual domain and start it.

Pygrub will read /boot/grub/menu.lst from the first filesystem listed in the xen configuration file.

The shipped images contain two boot options, both booting /boot/kernel with the root device on "/dev/xbd0". One is a multi-user boot, one is a single-user boot. The choice is selected by "default=" in the menu.lst file. Note that this starts from 0, so "0" is the first option and "1" is the second option.

The reason they boot to single user mode is so you get the opportunity to enable softupdates, run growfs, etc, before you run the system live.

How is it configured?

The images are configured with two block devices in /etc/fstab - root on /dev/xbd0 and a (disabled) swap device on /dev/xbd1. The grub config tells the kernel to boot from /dev/xbd0. This is a filesystem image and NOT a DOS/GPT disk image.

The xen block device configuration for this requires the use of device numbers. 0xCA00 is xbd0, 0xCA10 is xbd1, 0xCA20 is xbd2, etc.

disk = [

As mentioned before, the basic pygrub required boot config is in /boot/grub/menu.lst .

The xen console (xc0) is added to /etc/ttys and enabled; you can use "xm console" from the Dom0 domain to control the VM.

How do I install and use the images?

It should boot to single user mode (unless the image states otherwise.)

What then?

You can grab the source via Subversion.

You can do this inside the Xen VM and rebuild world/kernel yourself. Just make sure you use the "XEN" kernel configuration (make buildworld KERNCONF=XEN ; make installworld KERNCONF=XEN) or it won't boot.

You can also use growfs, tunefs (to enable softupdates) from inside the VM as long as you've booted into single user mode. Edit /boot/grub/menu.lst and change the default to boot the single user mode entry.

FreeBSD-current images

FreeBSD-6.3-RELEASE images

FreeBSD-RELENG_6 images

I haven't yet built a stable image.

FreeBSD-RELENG_7 images

I haven't yet successfully built an image.

AdrianChadd/XenImages (last edited 2017-09-18T12:53:32+0000 by KubilayKocak)