Server User Manual
Creating a Paravirtualized Guest Manually
Creating a Guest 4-7
4.6 Creating a Paravirtualized Guest Manually
To manually create a paravirtualized guest:
1. Create the root file system
2. Populate the root file system
3. Configure the guest
4.6.1 Creating the Root File System
To create the root file system:
1. Create a root partition for the guest. The root partition may be a:
■ Physical partition
■ Logical Volume Manager-backed Virtual Block Device
■ File-backed Virtual Block Device
Select one of the following options to create the root file system.
a. Using a physical disk partition
Create a disk partition for the guest root.
Make a file system on the partition.
b. Using a Logical Volume Manager-backed Virtual Block Device
A particularly appealing solution is to use a Logical Volume Manager (LVM)
volume as backing for a guest file system, as this allows dynamic growing and
shrinking of volumes, as well as snapshots, and other features.
To initialize a partition to support LVM volumes, enter
# pvcreate /dev/sda10
Create a volume group named vg on the physical partition:
# vgcreate vg /dev/sda10
Create a logical volume of 4 Gigabytes named myvmdisk1:
# lvcreate -L4096M -n myvmdisk1 vg
You now have a /dev/vg/myvmdisk1. Make a file system on the partition:
#mkfs -t ext3 /dev/vg/myvmdisk1
c. Using a file-backed Virtual Block Device
To create a 4 Gigabyte file-backed virtual block device, enter
#dd if=/dev/zero of=vm1disk bs=1k seek=4096k count=1
Make a file system in the disk file:
#mkfs -t ext3 vm1disk
The tool requests that you confirm the creation of the file system. Enter y to
confirm the creation of the file system.