Using Xen PV Drivers on HVM Guest

From Xen
Jump to: navigation, search


This article describes how to use Xen Project para-virtualized drivers on HVM guest.

  • Host: Oracle VM Server 2.1.2
  • Guest: Oracle Enterprise Linux 5 (kernel 2.6.18)

Virtual Storage Devices

If the Linux guest initialized the qemu-dm emulated IDE/SCSI device, then Xen Project para-virtualized storage driver cannot initialize it. So we should first prevent the guest from initial the emulated devices.

If you are specifying the disk as:

disk = [ 'file:/system.img,hda,w', 'file:/disk1.img,sda,w', 'file:/disk2.img,xvda,w', ]


Then:

  • hda will be emulated as an IDE device, which will be initialized by the ide driver of the Linux guest. The ide driver is often built into the Linux kernel. You can add the following kernel command line to prevent the kernel from initializing the device:
ide0=noprobe
Note
for Linux kernel v2.6.25+, use "ide_core.noprobe=x.y" instead. "hdx=noprobe" and "idex=noprobe" have been removed.
  • sda will be emulated as a SCSI device, which will be initialized by the sym53c8xx driver. The sym53c8xx driver is often build as a kernel module. You can add the following line to /etc/modprobe.conf to prevent the module from auto-loading:
alias sym53c8xx off
Note
if it doesn't work, you can get it by move the module out from /lib/modules/`uname -r`/.
202 block	Xen Virtual Block Device
		  0 = /dev/xvda       First Xen VBD whole disk
		  16 = /dev/xvdb      Second Xen VBD whole disk
		  32 = /dev/xvdc      Third Xen VBD whole disk
		    ...
		  240 = /dev/xvdp     Sixteenth Xen VBD whole disk

                Partitions are handled in the same way as for IDE
                disks (see major number 3) except that the limit on
                partitions is 15.

The Xen Project VBD disk will always be xvdX under Linux.

Reference