13.3.3. Installation and Configuration of Para-virtualized Drivers on Red Hat Enterprise Linux 4

13.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.

Driver Installation

The list below covers the steps to install a Red Hat Enterprise Linux 4 guest with para-virtualized drivers.

  1. Copy the kmod-xenpv, modules-init-tools and modversions RPMs corresponding to your hardware architecture and kernel variant to your guest operating system.

  2. 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.

    [root@rhel4]# rpm -ivh modversions
    [root@rhel4]# rpm -Uvh module-init-tools
    [root@rhel4]# 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.

  3. 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
    
  4. Shutdown the virtual machine (use “#shutdown -h now” inside the guest).

  5. 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 your para-virtualized driver the entry 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.

  6. Boot the virtual machine using the xm command:

    # xm create 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.

[root@rhel4]# 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.

[root@rhel4]# mkdir /mnt/pvdisk_p1
[root@rhel4]# mkdir /mnt/pvdisk_p2
[root@rhel4]# mount /dev/xvdb1 /mnt/pvdisk_p1
[root@rhel4]# mount /dev/xvdb2 /mnt/pvdisk_p2

[root@rhel4]# 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.

Also note...

IA64 binary RPM packages and builds are not presently available.

A handy tip

If the xen-vbd driver does not automatically load. Issue the following command from the guest's terminal. Substitute %release with the correct release version for the para-virtualized drivers.

[root@rhel4]# insmod /lib/modules/'uname -r'/weak-updates/xenpv/%release/xen-vbd.ko


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.