Using Xen PV Drivers on HVM Guest: Difference between revisions

From Xen
Jump to navigationJump to search
(Migrated)
 
No edit summary
 
(6 intermediate revisions by 5 users not shown)
Line 5: Line 5:
<!-- Original date: Thu Jan 27 07:25:07 2011 (1296113107000000) -->
<!-- Original date: Thu Jan 27 07:25:07 2011 (1296113107000000) -->


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


* Host: Oracle VM Server 2.1.2
* Host: Oracle VM Server 2.1.2
Line 12: Line 12:
= Virtual Storage Devices =
= Virtual Storage Devices =


If the Linux guest initialed the qemu-dm emulated IDE/SCSI device, then Xen para-virtualized storage driver cannot initial it. So we should first prevent the guest from initial the emulated 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:
If you are specifying the disk as:
<pre><nowiki>
<pre>
disk = [ 'file:/system.img,hda,w', 'file:/disk1.img,sda,w', 'file:/disk2.img,xvda,w', ]
disk = [ 'file:/system.img,hda,w', 'file:/disk1.img,sda,w', 'file:/disk2.img,xvda,w', ]
</nowiki></pre>
</pre>




Then:
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:
* 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:
<pre><nowiki>
<pre>
ide0=noprobe
ide0=noprobe
</nowiki></pre>
</pre>
'''Note:''' for Linux kernel v2.6.25+, use "ide_core.noprobe=x.y" instead. "hdx=noprobe" and "idex=noprobe" have been removed.
;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:
* 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:
<pre><nowiki>
<pre>
alias sym53c8xx off
alias sym53c8xx off
</nowiki></pre>
</pre>
'''Note:''' if it doesn't work, you can get it by move the module out from <code><nowiki>/lib/modules/`uname -r`/</nowiki></code>.
;Note: if it doesn't work, you can get it by move the module out from <code>/lib/modules/`uname -r`/</code>.
* xvda will nerver be emulated by qemu-dm. So no extra actions is needed. xvd device is always the best choice to use if you want use a PV driver. '''Note:''' as in http://www.lanana.org/docs/device-list/devices-2.6+.txt:
* xvda will never be emulated by qemu-dm. So no extra actions is needed. xvd device is always the best choice to use if you want use a PV driver. '''Note:''' as in http://www.lanana.org/docs/device-list/devices-2.6+.txt:
<pre><nowiki>
<pre>
202 block Xen Virtual Block Device
202 block Xen Virtual Block Device
0 = /dev/xvda First Xen VBD whole disk
0 = /dev/xvda First Xen VBD whole disk
Line 43: Line 43:
disks (see major number 3) except that the limit on
disks (see major number 3) except that the limit on
partitions is 15.
partitions is 15.
</nowiki></pre>
</pre>
The Xen VBD disk will always be xvdX under Linux.
The Xen Project VBD disk will always be xvdX under Linux.


= Reference =
= Reference =
Line 52: Line 52:
[[Category:Xen]]
[[Category:Xen]]
[[Category:Users]]
[[Category:Users]]
[{Category:Beginners]]
[[Category:Beginners]]
[[Category:HowTo]]
[[Category:HowTo]]
[[Category:Drivers]]

Latest revision as of 13:13, 7 February 2018


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