Custom Xen DomU

From OptionC

Table of contents

General Directions

We always meant to say something meaningful here, but haven't yet... honestly, this page is only about 1/4 done, at most.

Clone a running system

Copy everything but the following into a mounted LVM partition, a loop-mounted file, or an actual partition.

/proc/*
/var/log/*/*
/var/run/*/*
/var/run/*.pid
/var/tmp/*
/var/lock/*/*
/dev/mapper/*
/tmp/*
/sys/*
/mnt/*/*

Modify /etc/fstab and copy modules to /lib/modules (usually from the dom0)

Build it from scratch

Prebuilt DomU

These are links we have found - we haven't actually tested all of these images, so be warned.

Sort of on topic... here is a post on the lists about a QEMU tool (lomount (http://qemu.dad-answers.com/download/qemu/utilities/QEMU-HD-Mounter/lomount/)) that lets you mount individual partitions from a file-backed VBD/image with multiple partitions.

FAQ

How do I create a domU from an install CD/DVD?

You don't (this answer is accurate as of Xen version 2.0.6), at least, not directly. Usually it's recommended to run the installer and install into another partition (which doesn't work if you can take the system off-line or if you don't have a spare partition). Then either modify that partition to become a domU, or copy all the files and put them elsewhere.

Recommended Reading