Xen guest domains can be stored on disk partitions, images, or NFS. There are web sites available that host downloadable domU images that are easily findable with a quick search. Guest domains can also be installed onto a separate partition or hard drive. Use of NFS stored images allow the image to be stored on network attached storage and mounted remotely. This allows for easy migration of guest domains between physical hosts running Xen.
One way to create Xen images is to install the guest OS onto another disk/partition and then using the dd comand to create an image of the guest operating system. The following commands will create you a 1GB image and a 100MB swap file, mount it and copy your guest install to the image. The dd command creates the files that store the image and swap. The mkfs.ext3 and mkswap prepare the files for their respective use. Then mkdir is used to create mount points for the image and the guest domain OS partition which are then mounted (replace /dev/sdb1 with the correct device). An archival copy cp -a is used to copy all the files preserving ownership, permissions, and timestamps to populate the image file.
When launching guest domains Xen uses a configuration file to store the domU information. Example configuration files are installed in /etc/xen. Make a copy of one of the example config files and edit appropriately. Be sure to set the correct kernel, and amount of memory to allocate to the domU. Also be sure to set a unique name for the domain. Use the vif option to setup the virtual network interface. Xen will attempt to use determine the proper network configuration if the vif field is uncommented but empty. The disk option specifies how to present disks to the guest domain, and the root option sets the root device. Finally the extra option sets the default runlevel.
The xm command is used to start and access the domU. Use the xm create command to start the domU
To list running guest domains
Connecting to the guest domain.