Bug 842946 - popup the CD-ROM SCSI pass-through device via 'eject -r /dev/sr0' always fail
popup the CD-ROM SCSI pass-through device via 'eject -r /dev/sr0' always fail
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.4
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 23:21 EDT by Sibiao Luo
Modified: 2013-01-09 20:04 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-25 07:54:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2012-07-24 23:21:50 EDT
Description of problem:
boot a rhel6.3 guest with host CD-ROM SCSI pass-through and popup it via 'eject -r /dev/sr0' always fail and prompt some Input/output error. 
if i use 'eject -s /dev/sr0' or 'eject /dev/sr0' to test, they all work correctly without any error. 
i also test the three commands on my host with physical CD-ROM, they all work correctly.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-284.el6.x86_64
qemu-kvm-0.12.1.2-2.295.el6.x86_64
guest info:
rhel6.3.5.31.0_x86_64

How reproducible:
always

Steps to Reproduce:
1.boot a guest with a CD-ROM SCSI passthrough.
e.g. # /usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 2048 -smp 2,sockets=1,cores=2,threads=1 -m 2G -usb -device usb-tablet,id=input0 -name sluo-test -drive file=/home/rhel6.3.5.31.0.qcow2,if=none,id=drive-virtio-disk-0,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-disk-0,id=virtio0,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -spice port=5931,disable-ticketing -vga qxl -monitor stdio -boot menu=on -nodefconfig -nodefaults -drive file=/dev/sr0,if=none,media=cdrom,id=drive-scsi-sluo,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi -device scsi-block,drive=drive-scsi-sluo,id=scsi_sluo
2.# ls -l /dev/cdrom1 
  lrwxrwxrwx. 1 root root 3 Jul 23 19:39 /dev/cdrom1 -> sr0
  # ls -l /dev/sr0 
  brw-rw----+ 1 root cdrom 11, 0 Jul 23 19:39 /dev/sr0
3.repeat popup and drop-in the CD-ROM SCSI passthrough device for some times.
# eject -r /dev/sr0 
# eject -t /dev/sr0
  
Actual results:
after the step 3, it always fail to popup and prompt some 'Input/output error'.
# eject -r /dev/sr0 
eject: unable to eject, last error: Input/output error

Expected results:
it should popup the CD-ROM correctly without any error.

Additional info:
Comment 2 Paolo Bonzini 2012-07-25 07:54:37 EDT
"eject -r" can fail if (for example) the CD-ROM is locked.  This can also happen on bare-metal, it depends on your configuration.

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