
Creating a Paravirtualized Guest Manually
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.1Creating 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
■
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
You now have a /dev/vg/myvmdisk1. Make a file system on the partition:
#mkfs
c.Using a file-backed Virtual Block Device
To create a 4 Gigabyte
#dd if=/dev/zero of=vm1disk bs=1k seek=4096k count=1
Make a file system in the disk file:
#mkfs
The tool requests that you confirm the creation of the file system. Enter y to confirm the creation of the file system.
Creating a Guest