Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 723270 - Report cdrom tray status in a monitor command such as info block
Report cdrom tray status in a monitor command such as info block
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Markus Armbruster
Virtualization Bugs
:
Depends On:
Blocks: 725673 742458 748554
  Show dependency treegraph
 
Reported: 2011-07-19 10:46 EDT by Dan Kenigsberg
Modified: 2013-01-09 19:06 EST (History)
10 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.206.el6
Doc Type: Bug Fix
Doc Text:
Cause: management applications want to know whether tray is open or closed Consequence: management applications have difficulties changing media at the right time for the guest Change: extend monitor command "info block" to show tray open/closed status Result: management applications can poll "info block" to see when tray opens and closes. Turns out QE finds this useful, too. Management applications would like to be notified on change so they don't have to poll, but that's bug 575159.
Story Points: ---
Clone Of:
: 723272 (view as bug list)
Environment:
Last Closed: 2011-12-06 10:53:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-05 20:23:30 EST

  None (edit)
Description Dan Kenigsberg 2011-07-19 10:46:43 EDT
Management may want to remove cdrom media and throw it away if the guest OS has ejected it. Please report the tray status of cdrom devices.

This is required to avoid changed behavior (aka regression) due to the resolution of bug 558256.
Comment 1 Dan Kenigsberg 2011-07-19 10:52:16 EDT
It would be nice to be notified immediately (event) when a change occurs.
Comment 2 Luiz Capitulino 2011-07-20 09:00:16 EDT
Just for reference, the bz for the event is bug 575159.
Comment 3 Markus Armbruster 2011-07-20 12:53:56 EDT
Re comment#1: Yes, that would be nice, but it's bug 575159.  This bug is about enabling polling, not events.  Events are preferable, but may not be ready in time.
Comment 4 Markus Armbruster 2011-07-20 12:57:47 EDT
I just posted a patch series upstream that improves info block to show whether the tray is open, like this:

(qemu) info block
disk0: removable=0 file=/home/armbru/work/images/test.qcow2 backing_file=test.img ro=0 drv=qcow2 encrypted=0
cd: removable=1 locked=0 ejected file=x.iso ro=1 drv=raw encrypted=0

http://lists.gnu.org/archive/html/qemu-devel/2011-07/msg01925.html
Comment 5 Markus Armbruster 2011-08-09 09:48:59 EDT
Upstream fix is still under review.  It's part of the same series as the upstream fix for bug 676528.  Match is destined for extra time; requesting exception.
Comment 6 Dor Laor 2011-09-13 07:39:35 EDT
Is there a matching libvirt bugzilla? Otherwise it won't get into end-to-end rhev solution
Comment 7 Luiz Capitulino 2011-09-13 08:33:25 EDT
The libvirt one is bug 725673, which is listed in the "Blocks" field.

However, Daniel has reported on bug 575159 that the fix suggested here is not enough for libvirt. So, maybe this could be closed as invalid.
Comment 13 Markus Armbruster 2011-09-26 11:31:24 EDT
Fixed upstream in commit e4def80b block: Show whether the virtual tray is open in info block.

RFC backport posted:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-September/msg00677.html

Testing in progress.
Comment 15 juzhang 2011-09-30 04:50:40 EDT
According to our test results. 
with comment13 patch,info block includes tray-open option.add this issue into tracker bug(bz742458)
Comment 19 Shaolong Hu 2011-10-18 22:45:24 EDT
Reproduce on qemu-kvm-0.12.1.2-2.196.el6.x86_64:

Steps:
-------
1.boot a guest, in qemu monitor:
(qemu) info block
drive-virtio-disk0: type=hd removable=0 file=RHEL-Server-6.2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]

(qemu) change ide1-cd0 RHEL6.1-20110510.1-Server-x86_64-DVD1.iso

(qemu) info block
drive-virtio-disk0: type=hd removable=0 file=RHEL-Server-6.2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 file=RHEL6.1-20110510.1-Server-x86_64-DVD1.iso ro=1 drv=raw encrypted=0
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]

2.in guest, eject the cdrom, then in qemu monitor:
(qemu) info block
drive-virtio-disk0: type=hd removable=0 file=RHEL-Server-6.2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 file=RHEL6.1-20110510.1-Server-x86_64-DVD1.iso ro=1 drv=raw encrypted=0
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]



Verified on qemu-kvm-0.12.1.2-2.199.el6.x86_64:

1.after step 1:
(qemu) change ide1-cd0 RHEL6.1-20110510.1-Server-x86_64-DVD1.iso
(qemu) info block
drive-virtio-disk0: removable=0 file=RHEL-Server-6.2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 file=RHEL6.1-20110510.1-Server-x86_64-DVD1.iso ro=1 drv=raw encrypted=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

2.after step 2:
(qemu) info block
drive-virtio-disk0: removable=0 file=RHEL-Server-6.2-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=1 file=RHEL6.1-20110510.1-Server-x86_64-DVD1.iso ro=1 drv=raw encrypted=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
Comment 22 Eduardo Habkost 2011-10-28 13:58:30 EDT
Moving to ON_QA because Errata Tool did not do it
Comment 24 Markus Armbruster 2011-11-18 05:38:59 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: management applications want to know whether tray is open or closed
Consequence: management applications have difficulties changing media at the right time for the guest
Change: extend monitor command "info block" to show tray open/closed status
Result: management applications can poll "info block" to see when tray opens and closes.  Turns out QE finds this useful, too.  Management applications would like to be notified on change so they don't have to poll, but that's bug 575159.
Comment 25 errata-xmlrpc 2011-12-06 10:53:57 EST
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/RHSA-2011-1531.html

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