You should install a minimal Fedora 8 on a server that you plan to run Xen on. This includes a minimal logical volume for the host; this way you can add additional logical volumes: one for each Xen guest. Before you can do this you’ll need to understand the Fedora Logical Volume Manager (LVM2).
Let’s start with a bit of introduction. On UNIX a file-system is a structure that is defined on a set of storage devices. A storage device must be partitioned before you can create a file-system or a logical volume. Once a file-system has been created, it can be mounted on a directory.
Linux supports different types of file-systems. For example, local file-systems such as ext2, ext3, ext4, FAT, NTFS, HFS, HFS+, JFS and XFS; or network file-systems such as NFS, OpenAFS and GFS.
For Xen, a file that contains an image of a file-system is easiest for a para-virtualized virtual machine. Files that contain an image of a file-system are accessed via Xen blktap or the loop-back mechanism.
A file that contains an image of a hard disk is the easiest for a hardware virtual machine (e.g., if you plan to run an unmodified guest such as Windows). These files are accessed via hard QEMU disk emulation.
Before you can create a logical volume, you need to partition the physical drive. You do this by using the fdisk command. Next you’ll need to create a physical volume for each partition using the pvcreate command. After you’ve created a physical volume, you’ll need to add the physical volume to a volume group. You create a volume group using the command vgcreate. Next you’ll need to create a logical volume on the volume group. Finally, after you’ve created a logical volume, you are ready to create a file-system in it.
But first, here is the summary of the commands:
fdisk /dev/hda
Use thefdiskcommand to create one or more logical disks called partitions on the first IDE disk (hda).pvcreate /dev/hda1
Creates a physical volume on each partitionpvdisplay
Displays the status and size of the physical volumesvgcreate VM /dev/hda1
Add physical volume to a volume groupvgdisplay VM
Displays the status of a volume grouplvcreate -L10G -n UBUNTU VM
Creates a 10GB logical volume called UBUNTU on volume group VM. This command also creates an entry in/dev/mapperthat maps the logical volume to the physical volume that it was created from. You can access a logical volume from/dev/VM/UBUNTUlvdisplay
Displays the status and size of logical volumes


