Exadata Product Development Blog

  • September 4, 2009

Para-virtualizing disk and network drivers for Linux HVM Guests

Rene Kundersma
Software Engineer

Lately one of Oracle's customers decided to run their RedHat Enterprise Linux 3 systems onto Oracle VM. Running hardware virtualized is very straightforward and easy to do. However, you may want to improve performance by using para-virtualized drivers. On the topic on para-virtualized drivers, this entry will describe how do do it, what's possible, what's not and where to pay attention to.

To begin a short description: the picture below shows us Oracle VM can run both hardware and para-virtualized guests. Hardware virtualization uses device emulation. In general people get more performance using para-virtualization, as the quests VMs can use these as native drivers.


First one should verify if Oracle VM supports the platform. So, in this situation the Oracle VM online documentation says RedHat Enterprise Linux 3 is certified for hardware virtualization and can even run with para-virtualized drivers.

In order to use para-virtualized drivers the requirement is that at least RedHat Enterprise Linux 3 update 9 is used.

Having para-virtualized drivers in place makes the fully-virtualized guests VM 'para-virtualization-aware'. The benefit of this is the significant I/O performance improvement say 'speed' of the vm.

Please note that having para-virtualized drivers != running a para-virtualized VM. In this situation the only improvement you will see is on block (disk) and network performance.

In order to start using the paravirtualized drivers, you should download them first from the Oracle Unbreakable Linux Network (ULN). The file you need is kmod-xenpv-*el3.i686.rpm and you can find it in the appropriate channel. The file needs to be installed into each RHEL 3 HVM guest. (rpm -ivh kmod-xenpv-smp-0.1-9.el3.i686.rpm)

After this make sure the modules just installed with rpm are copied to /lib/modules/'uname -r'/extra/xenpv. After this the modules need to be loaded:

[root@gridnode01 /]# insmod xen-platform-pci.o

[root@gridnode01 /]# insmod xen-balloon.o

[root@gridnode01 /]# insmod xen-vbd.o

[root@gridnode01 /]# insmod xen-vnif.o

Also make sure the eth0 alias is setup in /etc/modules.conf

alias eth0 xen-vnif

So, for example, your vm.cfg for the HVM guest may look like this:

acpi = 1

apic = 1

boot = 'c'

bootloader = '/usr/bin/pygrub'

builder = 'hvm'

device_model = '/usr/lib/xen/bin/qemu-dm'

disk = ['file:/OVS/running_pool/112_pdrtest/system.img,hda,w',



disk_other_config = []

kernel = '/usr/lib/xen/boot/hvmloader'

keymap = 'en-us'

maxmem = 1024

memory = 1024

name = '12_pdrtest'

on_crash = 'restart'

on_reboot = 'restart'

pae = 1

serial = 'pty'

uuid = 'f2e29b25-391f-74e8-b0cf-cbc69bb7905'

vcpus = 1

vif = ['type=ioemu, mac=00:16:4E:1C:42:7E, bridge=xenbr1']

vnc = 1

vncconsole = 1

vnclisten = ''

vncpasswd = oracle

vncunused = 1

What now needs to change is the entry "type=ioemu" from the vif configuration line.

The other item to change is for the IO. New physical devices need to be added to the vm.cfg file and one has to make sure they use the xen-vdb disk driver. Please note that once the new disk is created the data needs to be moved to that disk.

Now disk and network drivers are para-virtualized performance will be better.

The ability to keep running older operating systems in a virtualized environment is great.

Oracle Certifies most common operating systems on Oracle VM.

The Oracle software, for instance Real Application Clusters still needs to be certified with Oracle VM and the guest VM OS image. See also this link for best practices and certification.

Rene Kundersma

Oracle Technology Services, The Netherlands

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.