12.3.3. Installation and Configuration of Para-virtualized Drivers on Red Hat Enterprise Linux 4
This section contains detailed instructions for the para-virtualized drivers in a Red Hat Enterprise 4 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 4 guest with para-virtualized drivers.
-
Copy the kmod-xenpv
, modules-init-tools
and modversions
RPMs for your hardware architecture and kernel variant to your guest operating system.
-
Use the rpm
utility to install the RPM packages. Make sure you have correctly identified which package you need for your guest operating system variant and architecture. An updated module-init-tools is required for this package, it is available with the Red Hat Enterprise Linux4-6-z kernel and beyond.
[[email protected]]# rpm -ivh modversions
[[email protected]]# rpm -Uvh module-init-tools
[[email protected]]# rpm -ivh kmod-xenpv*
Note
There are different packages for UP, SMP, Hugemem and architectures so make sure you have the right RPMs for your kernel.
-
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/YourGuestsName
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.
On the first reboot of the virtual guest, kudzu
will ask you to "
Keep or Delete the Realtek Network device
" and "
Configure the xen-bridge device
". You should configure the xen-bridge
and delete the Realtek network device.
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.
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
Note
This package is not supported for Red Hat Enterprise Linux 4-GA through Red Hat Enterprise Linux 4 update 2 systems and kernels.
Important note
IA64 binary RPM packages and builds are not presently available.
Automatic module loading
The xen-vbd
driver may not automatically load. Execute the following command on the guest, substituting
%release
with the correct release version for the para-virtualized drivers.
# insmod /lib/modules/'uname -r'/weak-updates/xenpv/%release/xen-vbd.ko