Bug 735993

Summary: configuring a SCSI cd-rom in an HVM domain messes up IDE drives
Product: Red Hat Enterprise Linux 5 Reporter: Paolo Bonzini <pbonzini>
Component: xenAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: leiwang, mrezanin, qguan, qwan, xen-maint, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xen-3.0.3-134.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 05:55:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 699616    

Description Paolo Bonzini 2011-09-06 11:37:02 UTC
When adding a disk with sda:cdrom to an HVM domain, the media type is set on the wrong disk: sda-sdd set the media type on hda-hdd, while from sde on the actual disk is off by 4 (i.e. sde sets it on sda and so on).

This is bad because adding a SCSI cd-rom can make the whole domain unbootable or crash qemu-dm.

* configuration for unbootable domain:

disk = ["file:/var/lib/xen/hvm.img,hda,w", "file:/var/lib/xen/cd.iso,sda:cdrom,r"]
boot = "c"

(hda becomes a CD-ROM and it is excluded from the boot sequence)

* configuration for qemu-dm crash:

disk = ["file:/var/lib/xen/hvm.img,hda,w", "file:/var/lib/xen/cd.iso,sdb:cdrom,r"]

(the hint is set on sdb and this causes a NULL-pointer dereference).

The bug is present since "always".

Comment 2 Miroslav Rezanina 2011-09-07 11:45:36 UTC
Fix built into xen-3.0.3-134.el5

Comment 5 Yuyu Zhou 2011-12-01 03:28:28 UTC
reproduce the bug on xen-3.0.3-132.el5 and verify the bug on xen-3.0.3-135.el5.

on xen-3.0.3-132.el5, 

boot the HVM guest with configure:

disk = ["file:/var/lib/xen/hvm.img,hda,w",
"file:/var/lib/xen/cd.iso,sda:cdrom,r"]
boot = "c"

In fact, no guest is created.

boot the HVM guest with configure:

disk = ["file:/var/lib/xen/hvm.img,hda,w",
"file:/var/lib/xen/cd.iso,sdb:cdrom,r"]

the guest fail to boot.

on xen-3.0.3-135.el5:
boot the guest with both configure will succeed, and the content of iso can be seen in the guest.

So change the bug to VERIFIED.

Comment 6 errata-xmlrpc 2012-02-21 05:55:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0160.html