Bug 477258 - Block attach-detach operations fail for rhel 4.7 and rhel 3.9 HVM guests.
Summary: Block attach-detach operations fail for rhel 4.7 and rhel 3.9 HVM guests.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Xen Maintainance List
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-19 22:27 UTC by Gurhan Ozen
Modified: 2013-11-04 01:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-22 16:45:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gurhan Ozen 2008-12-19 22:27:23 UTC
Description of problem:

  I have failed to successfully attach/detach any types of block devices to rhel 4.7 and 3.9 hvm guests. Typical commands I am using are:


# virsh attach-disk rhel4.7_x86_64_hvm_guest /dev/sda5 /dev/xvdb --driver phy --mode shareable 
# virsh attach-disk rhel4.7_x86_64_hvm_guest /var/lib/xen/images/block1 /dev/xvdd --driver file  --mode shareable 
# virsh attach-disk rhel4.7_x86_64_hvm_guest /var/lib/xen/images/block1 /dev/xvdd --driver tap --subdriver aio  --mode shareable 


I have also tried adding devices to the domain configuration files and rebooting guest but I couldn't get those to work either.

As seen before, attached device doesn't show up inside the guest however virsh dumpxml $guest show it there. When trying to detach it, then xend again goes haywire.

Version-Release number of selected component (if applicable):
xen-3.0.3-80.el5

How reproducible:
Very

Steps to Reproduce:
1. Install rhel5.3 dom0
2. Install 4.7/3.9 hvm guests
3. install block devices to the guests.

Comment 3 Chris Lalancette 2008-12-21 14:30:50 UTC
Well, here's the thing.  In all of the above commands, you are trying to attach a PV-on-HVM disk.  In order for this to work, you have to have installed the PV-on-HVM drivers inside the guest (that's already the default in 4.7, but you need the external kmod-xenpv drivers on 3.9), *and* have done modprobe xen-vbd inside the guest.  If you do that, does the blkattach work?  Also note that blkattach of SCSI or IDE disks emphatically will not work, so it's not even worth testing.
     The detach problem is exactly the same as that other bug you opened, so we don't need to track that separately.

Chris Lalancette

Comment 4 Gurhan Ozen 2008-12-22 06:15:17 UTC
(In reply to comment #3)
> Well, here's the thing.  In all of the above commands, you are trying to attach
> a PV-on-HVM disk.  In order for this to work, you have to have installed the
> PV-on-HVM drivers inside the guest (that's already the default in 4.7, but you
> need the external kmod-xenpv drivers on 3.9), *and* have done modprobe xen-vbd
> inside the guest.  If you do that, does the blkattach work?  Also note that
> blkattach of SCSI or IDE disks emphatically will not work, so it's not even
> worth testing.
>      The detach problem is exactly the same as that other bug you opened, so we
> don't need to track that separately.
> 
> Chris Lalancette

Well, here's the thing... I was thinking that only tap:aio would invoke pv-on-hvm, that file and phy drivers would not be pv-on-hvm. However, from your comments it sounds like anything /dev/xvd?? is pv-on-hvm regardless of what driver is being used. Is this correct?

If that's the case, then does only pv-on-hvm work on hvm guests, since scsi and ide emulation doesn't work on hvm guest, according to #476746, right?

Also, I was told that 4.7 would automatically just work out of box for pv-on-hvm, but according to this comment, i still need to manually insert xen-vbd :( For rhel3.9 guests, i didn't even bother testing this because, as I said earlier, i thought phy and file drivers wouldn't invoke pv-on-hvm . I'll go back and make sure all pv-on-hvm settings are in place and retest.

Sorry about this bug noise , looks like this is all -EUSER error:(

Comment 6 Chris Lalancette 2008-12-23 18:23:20 UTC
(I know this has been closed now, but just in response to Comment #4...)

tap:aio vs phy vs. file has nothing to do with whether it is PV-on-HVM or not.  What you have to realize with virtualization is that there is always a backend driver and a frontend driver.  The backend driver is how the host is accessing the disk file; in the Xen case, the three methods to do that are tap:aio, phy, and file.  The frontend driver is how the host is presenting the device to the guest (and, also, which driver the guest needs).  In Xen, the available methods are either xvd (a PV device), or IDE (for HVM guests only).  An xvd device is *always* a paravirtualized device, which means that the guest has to have PV drivers to access it (this includes both pure paravirtualized domains and HVM domains with PV-on-HVM drivers).  An IDE device can only be presented to an HVM guest, but since there is no generic IDE hotplug facility, you can attach these on the fly.  I hope that clears things up a little bit.

Chris Lalancette


Note You need to log in before you can comment on or make changes to this bug.