RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 803219 - virtio-scsi:after eject virtio-scsi CD-ROM tray-open's value still be 0
Summary: virtio-scsi:after eject virtio-scsi CD-ROM tray-open's value still be 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 769712 857935 889075
TreeView+ depends on / blocked
 
Reported: 2012-03-14 08:57 UTC by daiwei
Modified: 2013-01-10 00:46 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.263.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed
Clone Of:
Environment:
Last Closed: 2012-06-20 11:44:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0746 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2012-06-19 19:31:48 UTC

Description daiwei 2012-03-14 08:57:30 UTC
Description of problem:

Boot guest with a virtio-scsi CD-ROM,then eject CD-ROM in guest system.Check tray status in qemu monitor,tray-open's value still be 0.When tray is open,tray-open's value should be 1.

Version-Release number of selected component (if applicable):
# uname -r;rpm -q qemu-kvm
2.6.32-250.el6.x86_64
qemu-kvm-0.12.1.2-2.241.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with emulated virtio-scsi CD-ROM

/usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -name RHEL-Server-6.3-64 -smp 2 -m 4G -uuid 4bbfae8f-0d08-41ad-926a-c7a7568d50f7 -boot menu=on -drive file=/home/rhel6.3-64.raw,if=none,id=drive-virtio-disk0,format=raw,cache=none,media=disk,werror=stop,rerror=stop -device virtio-scsi-pci,id=virtio-blk-pci0,bus=pci.0,addr=0x5 -device scsi-hd,drive=drive-virtio-disk0,logical_block_size=512,physical_block_size=512,scsi-id=0,lun=0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=44:37:E6:5E:A3:F2,bus=pci.0,addr=0x4,id=net0 -vnc :1 -vga std -balloon none -monitor stdio -usb -usbdevice tablet -drive file=/home/RHEL6.3-20120304.n.0-Server-x86_64-DVD1.iso,if=none,id=cdrom1 -device virtio-scsi-pci,id=cdrom -device scsi-cd,drive=cdrom1,scsi-id=0,lun=0 -nodefconfig -nodefaults

2.Check CD-ROM status in qemu monitor

3.eject CD-ROM in guest system

#eject /dev/sr0

4.Check CD-ROM status in qemu monitor again
  
Actual results:

After step 4, tray-open's value still be 0 

Expected results:

 tray-open's value should change to 1.


Additional info:

Passthrough virtio-scsi CD-ROM also has this issue.

Comment 2 Paolo Bonzini 2012-03-16 12:28:13 UTC
Passthrough virtio-scsi CD-ROM is not able to sense the tray state.  Looking into it for scsi-cd CD-ROM.

Comment 3 Paolo Bonzini 2012-03-16 16:50:40 UTC
This is due to autoclose.  It works if you do "echo 0 > /proc/sys/dev/cdrom/autoclose".  Leaving it open to investigate how it works on real CDs, but since "change" works I'm lowering the priority.

Comment 7 langfang 2012-04-06 06:46:02 UTC
verify this issue with two senario

senaro 1)
version:
# uname -r
2.6.32-257.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.262.el6.x86_64
senario 2)
version:
# uname -r
2.6.32-257.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.265.el6.x86_64
steps:
1.boot a guest
/usr/libexec/qemu-kvm -m 2G -smp 1 -cpu Penryn,+x2apic, -usbdevice tablet -drive file=/mnt/RHEL-Server-6.3-64-virtio.qcow2-newinstall5,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device virtio-blk-pci,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2d:31:21,bus=pci.0,addr=0x4,id=net0 -boot order=cdn,once=n,menu=on -uuid 3290efd3-7c9e-44f9-b5f7-af0f3a1b3066 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -monitor stdio -name rhel6.1 -spice port=1000,disable-ticketing -vga qxl -device virtio-balloon-pci,bus=pci.0,id=balloon0 -device usb-ehci,id=ehci -drive file=/mnt/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso,if=none,id=cdrom1 -device virtio-scsi-pci,id=cdrom -device scsi-cd,drive=cdrom1,scsi-id=0,lun=0 -nodefconfig -nodefaults 

2.Check CD-ROM status in qemu monitor
(qemu) info block
drive-ide0-0-0: removable=0 io-status=ok file=/mnt/RHEL-Server-6.3-64-virtio.qcow2-newinstall5 ro=0 drv=qcow2 encrypted=0
cdrom1: removable=1 locked=0 tray-open=0 io-status=ok file=/mnt/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso ro=0 drv=raw encrypted=0
3.echo 0 >
/proc/sys/dev/cdrom/autoclose  in guest
4.eject CD-ROM in guest system

#eject /dev/sr0

5.Check CD-ROM status in qemu monitor again
(qemu)info block

drive-ide0-0-0: removable=0 io-status=ok file=/mnt/RHEL-Server-6.3-64-virtio.qcow2-newinstall5 ro=0 drv=qcow2 encrypted=0
cdrom1: removable=1 locked=0 tray-open=1 io-status=ok file=/mnt/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso ro=0 drv=raw encrypted=0


so,the stray-open value can be change when eject cdrom.

Comment 10 Michal Novotny 2012-05-04 13:09:20 UTC
    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:
NEEDINFO

Comment 11 Paolo Bonzini 2012-05-04 13:44:36 UTC
New feature in 6.3, no documentation needed.

Comment 12 Paolo Bonzini 2012-05-04 13:44:36 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-NEEDINFO+No documentation needed

Comment 13 errata-xmlrpc 2012-06-20 11:44:49 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-0746.html


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