Bug 667354

Summary: PV cdrom should be disabled on HVM guests
Product: Red Hat Enterprise Linux 6 Reporter: Paolo Bonzini <pbonzini>
Component: kernelAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: arozansk, drjones, mjenner, xen-maint, yuzhang
Target Milestone: rcKeywords: TestOnly
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-2.6.32-83.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-23 20:32:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 632021    
Bug Blocks:    

Description Paolo Bonzini 2011-01-05 12:20:40 UTC
commit b98a409b80ac510c95b4f1bafdef28edaeabd3e7
Author: Stefano Stabellini <stefano.stabellini.com>
Date:   Thu Jul 29 14:53:16 2010 +0100

    blkfront: do not create a PV cdrom device if xen_hvm_guest
    
    It is not possible to unplug emulated cdrom devices, and PV cdroms don't
    handle media insert, eject and stream, so we are better off disabling PV
    cdroms when running as a Xen HVM guest.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini.com>

Comment 2 Andrew Jones 2011-01-05 12:37:19 UTC
This is a good patch for the reasons stated by Stefano when RHEL6 runs on
non-RHEL hosts or on RHEL hosts pre-5.6. However, with RHEL 5.6 the host no
longer allows PV cdroms for HVM guests either. So as a note to QE, make sure
this patch is tested with a host < 5.6. Actually, since there was a change to
how the PV cdrom was [not] exposed to a guest for 5.5 as well, it would be even
better to test this patch with a host < 5.5.

Comment 3 Paolo Bonzini 2011-01-05 13:14:33 UTC
Actually, it was already added as part of
http://patchwork.usersys.redhat.com/patch/28671/

We should still ensure that 6.1 handles media insert and eject of an HVM cdrom, so marking this as TestOnly and moving to MODIFIED

Comment 5 RHEL Program Management 2011-01-05 13:50:22 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 6 Yufang Zhang 2011-04-08 07:57:07 UTC
(In reply to comment #2)
> This is a good patch for the reasons stated by Stefano when RHEL6 runs on
> non-RHEL hosts or on RHEL hosts pre-5.6. However, with RHEL 5.6 the host no
> longer allows PV cdroms for HVM guests either. So as a note to QE, make sure
> this patch is tested with a host < 5.6. Actually, since there was a change to
> how the PV cdrom was [not] exposed to a guest for 5.5 as well, it would be even
> better to test this patch with a host < 5.5.

Hi Andrew,

Could you please provide some information on how to create pv cdrom for rhel6 HVM guest? I try to do this with the following config option on a RHEL5.6 host:

disk = ['file:/xen-autotest/xen-autotest/client/tests/xen/images/RHEL-Server-6.1-64-hvm.raw,xvda,w', 'tap:aio:/root/boot.iso,xvdc:cdrom,r']

After guest boots, I could only see the emulated cdrom within the guest(seems that it is not unpluged). Could this be seen as a good point that the bug is fixed? Thanks.

Yufang

Comment 7 Andrew Jones 2011-04-08 09:34:36 UTC
I would probably use 'file', instead of 'tap:aio', but it probably doesn't matter. Note, to get any chance of seeing a bug you need a host with a dom0 kernel that is < -176 and a rhel6 guest with a kernel that is < -83. If you can see some bug with that, then bump the rhel6 kernel up to the latest and make sure it goes away. I'm actually not sure you'll see a bug at all though... Actually, if you don't see any problems (only the qemu cdrom pops up) with any sort of cdrom config file/tap, hdc/xvdc, then I would consider this BZ verified.

Comment 8 Yufang Zhang 2011-04-11 02:08:25 UTC
Tested with 2.6.32-128.el6:

I have tried any sort of cdrom config with file/tap, hdc/xvdc, only emulated(qemu) cdrom could be seen within HVM guest. So I would consider this bug as VERIFIED.

Comment 9 errata-xmlrpc 2011-05-23 20:32:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0542.html