12.3.4. Installation and Configuration of Para-virtualized Drivers on Red Hat Enterprise Linux 5
This section contains detailed instructions for the para-virtualized drivers in a Red Hat Enterprise 5 guest operating system.
Please note
These packages do not support booting from a para-virtualized disk. Booting the guest operating system kernel still requires the use of the emulated IDE driver, while any other (non-system) user-level application and data disks can use the para-virtualized block device driver.
The list below covers the steps to install a Red Hat Enterprise Linux 5 guest with para-virtualized drivers.
-
Copy the kmod-xenpv
rpm for your hardware architecture and kernel variant to your guest operating system.
-
Use the rpm
utility to install the RPM packages. Make sure you correctly identify which package you need for your guest operating system variant and architecture.
[[email protected]]# rpm -ivh kmod-xenpv*
-
Issue the command below to disable automatic hardware detection inside the guest operating system
[[email protected]]# chkconfig kudzu off
-
Execute cat /etc/modules.conf
to verify you have an alias for eth0
like the one below. If you are planning to configure multiple interfaces add an additional line for each interface. It it does not look like the entry below change it.
alias eth0 xen-vnif
-
Shutdown the virtual machine (use “#shutdown -h now
” inside the guest).
-
Edit the guest configuration file in /etc/xen/<Your GuestsName>
in the following ways:
-
Remove the “type=ioemu
” entry from the “vif=
” entry.
-
Add any additional disk partitions, volumes or LUNs to the guest so that they can be accessed via the para-virtualized (xen-vbd
) disk driver.
-
For each additional physical device, LUN, partition or volume add an entry similar to the one shown below to the “disk=
” section in the guest configuration file. The original “disk=
” entry might also look like the entry below.
disk = [ "file:/var/lib/xen/images/rhel4_64_fv.dsk,hda,w"]
-
Once you have added additional physical devices, LUNs, partitions or volumes; the para-virtualized driver entry in your XML configuration file should resemble the entry shown below.
disk = [ "file:/var/lib/xen/images/rhel3_64_fv.dsk,hda,w",
"tap:aio:/var/lib/xen/images/UserStorage.dsk,xvda,w" ]
Note
Use “tap:aio
” for the para-virtualized device if a file based image is used.
-
Boot the virtual machine using the virsh
command:
# virsh start
YourGuestName
Note
You must use "xm create <virt-machine-name>
” on Red Hat Enterprise Linux 5.1. The para-virtualized network driver(xen-vnif
) will not be connected to eth0
properly if you are using Red Hat Enterprise Linux 5.1 and the virt-manager
or virsh
interfaces. This issue is currently a known bug, BZ 300531.
Red Hat Enterprise Linux 5.2 does not have this bug and the virt-manager
or virsh
interfaces will correctly load the para-virtualized drivers.
To verify the network interface has come up after installing the para-virtualized drivers issue the following command on the guest. It should display the interface information including an assigned IP address
[[email protected]]# ifconfig eth0
Now, verify the partitions which you have created are available.
[[email protected]]# cat /proc/partitions
major minor #blocks name
3 0 10485760 hda
3 1 104391 hda1
3 2 10377990 hda2
202 0 64000 xvdb
202 1 32000 xvdb1
202 2 32000 xvdb2
253 0 8257536 dm-0
253 1 2031616 dm-1
In the above output, you can see the partitioned device “xvdb
” is available to the system.
The commands below mount the new block devices to local mount points and updates the /etc/fstab
inside the guest to mount the devices/partitions during boot.
[[email protected]]# mkdir /mnt/pvdisk_p1
[[email protected]]# mkdir /mnt/pvdisk_p2
[[email protected]]# mount /dev/xvdb1 /mnt/pvdisk_p1
[[email protected]]# mount /dev/xvdb2 /mnt/pvdisk_p2
[[email protected]]# df /mnt/pvdisk_p1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvdb1 32000 15 31985 1% /mnt/pvdisk_p1
Performance tip
Using a Red Hat Enterprise Linux 5.1 host(dom0), the "noapic
" parameter should be added to the kernel boot line in your virtual guest's /boot/grub/grub.conf
entry as seen below. Keep in mind your architecture and kernel version may be different.
kernel /vmlinuz-2.6.9-67.EL ro root=/dev/VolGroup00/rhel4_x86_64 rhgb noapic
A Red Hat Enterprise Linux 5.2 dom0 will not need this kernel parameter for the guest.