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 886878 - atapi: tray statuses (locked and open) are not reset on boot/reboot of guest
Summary: atapi: tray statuses (locked and open) are not reset on boot/reboot of guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-13 13:12 UTC by Pavel Hrdina
Modified: 2013-11-21 05:59 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.373.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 05:59:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 21:40:29 UTC

Description Pavel Hrdina 2012-12-13 13:12:20 UTC
Description of problem:

If you reboot a guest which locks the tray of optical drive the optical drive stay locked.

How reproducible: 100%


Steps to Reproduce:
1. Boot a guest with media inserted in optical drive (for example fedora 17)
2. The media is auto-mounted and the optical drive is locked
3. Reboot the guest.
4. Before kernel is loaded (in GRUB time) the optical drive is locked
  
Actual results:
Before kernel is loaded the optical drive is locked.


Expected results:
Optical drive should not be locked.

Comment 8 langfang 2013-06-26 06:59:26 UTC
Reproduce this bug as follow version:
Host:
# uname -r
2.6.32-392.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.356.el6.x86_64

Guest:
2.6.32-358.el6.x86_64

Steps:
1.Boot guest with
...
-drive file=/home/RHEL6.4-20130123.0-Server-x86_64-DVD1.iso,if=none,media=cdrom,id=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=cdrom,id=cdrom,id=cdrom...

2.After guest boot up,check the cdrom have mounted /dev/sr0. 
(qemu) info block
drive-virtio-disk1: removable=0 io-status=ok file=/home/RHEL-Server-6.4-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0
cdrom: removable=1 locked=1 tray-open=0 io-status=ok file=/home/RHEL6.4-20130123.0-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]

3.Reboot guest 
(qemu)system_reset
4.Check the locked value of cdrom
(qemu)info block
drive-virtio-disk1: removable=0 io-status=ok file=/home/RHEL-Server-6.4-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0
cdrom: removable=1 locked=1 tray-open=0 io-status=ok file=/home/RHEL6.4-20130123.0-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]

Results:
After step 4,before guest kernel is loaded the optical drive is locked.

Verify this bug as follow version:
HOst:
# uname -r
2.6.32-392.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.376.el6.x86_64

Guest:
2.6.32-358.el6.x86_64

The steps as same as reproduce

Results:
While guest begin reboot, the locked value of cdrom changed to 0

cdrom: removable=1 locked=0 tray-open=0 io-status=ok file=/home/RHEL6.4-20130123.0-Server-x86_64-DVD1.iso ro=1 drv=raw encrypted=0

Addtional info:
1)If only boot guest ,the "locked value" is 0.
2)I aslo tried passthrough a cdrom wich ide-drive, the steps as same as reproduce, after reboot guest,the value changed to 0
...-drive file=/dev/sr0,if=none,media=cdrom,id=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=cdrom,id=cdrom,id=cdrom,
3)Also tried use local cdrom with scsi-cd,work well

My CLI: /usr/libexec/qemu-kvm -monitor stdio  -chardev socket,id=serial_id_20120515-041452-KkUY,path=/tmp/serial-20120515-041452-KkUY,server,nowait -device isa-serial,chardev=serial_id_20120515-041452-KkUY -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 -drive file=/home/RHEL-Server-6.4-64-virtio.qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,boot=on,snapshot=off,readonly=off,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idLYjg29,mac=9a:6e:47:a6:d8:f9,id=ndev00idLYjg29,bus=pci.0,addr=0x3 -netdev tap,id=idLYjg29,vhost=on -m 2048 -smp 4,cores=2,threads=1,sockets=2 -cpu Penryn  -device usb-tablet,id=usb-tablet1,bus=usb1.0 -spice port=8000,disable-ticketing -vga qxl -rtc base=utc,clock=host,driftfix=slew -M rhel6.4.0 -boot order=cdn,once=c,menu=off    -no-kvm-pit-reinjection -enable-kvm -monitor unix:/tmp/monitor-unix,nowait,server -serial unix:/tmp/tty0,server,nowait -drive file=/home/RHEL6.4-20130123.0-Server-x86_64-DVD1.iso,if=none,id=drive-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi1,addr=0x8,bus=pci.0 -device scsi-cd,bus=scsi1.0,drive=drive-disk,id=cd-disk


According to above test ,this bug fixed.

Comment 11 langfang 2013-06-28 03:08:44 UTC
Addtional info for comment8.

On the verify version.
HOst:
# uname -r
2.6.32-392.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.376.el6.x86_64

Guest:
2.6.32-358.el6.x86_64

Results:

 While guest begin reboot, the locked value of cdrom changed to 0--->after guest boot up , the value automatically changed to 1 .

Comment 12 Qunfang Zhang 2013-06-28 03:34:05 UTC
(In reply to langfang from comment #11)
> Addtional info for comment8.
> 
> On the verify version.
> HOst:
> # uname -r
> 2.6.32-392.el6.x86_64
> # rpm -q qemu-kvm
> qemu-kvm-0.12.1.2-2.376.el6.x86_64
> 
> Guest:
> 2.6.32-358.el6.x86_64
> 
> Results:
> 
>  While guest begin reboot, the locked value of cdrom changed to 0--->after
> guest boot up , the value automatically changed to 1 .

I think flang means when the cdrom is mounted automatically by the guest os, the "lock" flag changes to 1. Right?

Comment 13 langfang 2013-06-28 03:47:12 UTC
(In reply to Qunfang Zhang from comment #12)
> (In reply to langfang from comment #11)
> > Addtional info for comment8.
> > 
> > On the verify version.
> > HOst:
> > # uname -r
> > 2.6.32-392.el6.x86_64
> > # rpm -q qemu-kvm
> > qemu-kvm-0.12.1.2-2.376.el6.x86_64
> > 
> > Guest:
> > 2.6.32-358.el6.x86_64
> > 
> > Results:
> > 
> >  While guest begin reboot, the locked value of cdrom changed to 0--->after
> > guest boot up , the value automatically changed to 1 .
> 
> I think flang means when the cdrom is mounted automatically by the guest os,
> the "lock" flag changes to 1. Right?

 qzhang, yes .

Comment 15 errata-xmlrpc 2013-11-21 05:59:08 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/RHSA-2013-1553.html


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