Bug 993777 - Passthrough CDROM(scsi_block) can not be removable
Passthrough CDROM(scsi_block) can not be removable
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-06 08:12 EDT by langfang
Modified: 2013-08-06 23:17 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-06 23:17:27 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 langfang 2013-08-06 08:12:53 EDT
Description of problem:
Passthrough CDROM(scsi_block) can not be removable

Version-Release number of selected component (if applicable):
Host:
# uname -r
2.6.32-405.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.382.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-28.el6.x86_64

Guest:rhel6.5
2.6.32-403.el6.x86_64

How reproducible:

100%

Steps to Reproduce:
1.Boot guest
...-drive file=/dev/cdrom,if=none,id=drive-cd-disk,media=cdrom,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi1 -device scsi-block,drive=drive-cd-disk,bus=scsi1.0,id=scsi_cd...

2.(qemu)info block
(qemu) info block
drive-scsi0-0-0: removable=0 io-status=ok file=/home/RHEL-Server-6.4-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-cd-disk: removable=0 io-status=ok file=/dev/cdrom ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0--->removable=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

3.Tried to change the disk
(qemu)change drive-cd-disk /home//Windows_Server_2008_R2_GA_EN.iso
Device 'drive-cd-disk' is not removable

Actual results:
Can't change the passthrough CDROM

Expected results:
Can change the passthrough CDROM

Additional info:
1)If I boot guest with "scsi-cd",not hit the problem
...-drive file=/dev/cdrom,if=none,id=drive-cd-disk,media=cdrom,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi1 -device scsi-cd,drive=drive-cd-disk,bus=scsi1.0,id=scsi_cd..
(qemu)info block
...
drive-cd-disk: removable=1 io-status=ok file=/dev/cdrom ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0--->removable=1
2)Same problem not found on rhel7 host(rhel6.5 guest)
will see:
drive-cd-disk: removable=1 io-status=ok file=/dev/cdrom ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0--->removable=1

3)eject the CDROM in guest ,can be eject succsessfully--->then (qemu)drive-cd-disk /home//Windows_Server_2008_R2_GA_EN.iso--->hit same problem(can not change)

Choose the CDROM in guest--->choose "eject"

4)MY CLI:/usr/libexec/qemu-kvm -M rhel6.5.0 -m 4G -smp 4 -device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0 -drive file=/home/RHEL-Server-6.4-64-virtio.qcow2,if=none,id=drive-scsi0-0-0,media=disk,cache=none,format=qcow2,werror=stop,rerror=stop,aio=native -device scsi-hd,drive=drive-scsi0-0-0,bus=scsi0.0,scsi-id=0,lun=0,id=flang,bootindex=1 -spice port=5830,disable-ticketing -vga qxl -qmp tcp:0:5555,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/tty1,server,nowait  -boot menu=on -monitor stdio -drive file=/dev/cdrom,if=none,id=drive-cd-disk,media=cdrom,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi1 -device scsi-block,drive=drive-cd-disk,bus=scsi1.0,id=scsi_cd
Comment 1 langfang 2013-08-06 08:20:22 EDT
correct info:

3)eject the CDROM in guest ,can be eject succsessfully--->then (qemu)change drive-cd-disk /home//Windows_Server_2008_R2_GA_EN.iso--->hit same problem(can not change)
Choose the CDROM in guest--->choose "eject"
Comment 3 langfang 2013-08-06 22:34:46 EDT
Test this bug on latest verion on rhel7,hit same problem
# uname -r 
3.10.0-4.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.5.2-2.el7.x86_64

Guest:
2.6.32-397.el6.x86_64

1.Boot guest with
... -drive file=/dev/cdrom,if=none,id=drive-cd-disk,media=cdrom,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi1 -device scsi-block,drive=drive-cd-disk,bus=scsi1.0,id=scsi_cd..

2.(qemu)info block
...
drive-cd-disk: removable=0 io-status=ok file=/dev/cdrom ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0--->removable=0
..
3.
(qemu) change drive-cd-disk /home/Windows_Server_2008_R2_GA_EN.iso 
Device 'drive-cd-disk' is not removable

4.eject in rhel6.5 guest
Choose the CDROM device--->press "eject"-->successfully

5)(qemu)info block
..drive-cd-disk: removable=0 io-status=ok file=/dev/cdrom ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0..

6)(qemu)change drive-cd-disk /home/Windows_Server_2008_R2_GA_EN.iso 
Device 'drive-cd-disk' is not removable


addtional info:
1)If use "scsi-cd" not hit the problem
...
-drive file=/dev/cdrom,if=none,id=drive-cd-disk,media=cdrom,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi1 -device scsi-cd,drive=drive-cd-disk,bus=scsi1.0,id=scsi_cd...

(qemu)info block
..
drive-cd-disk: removable=1 locked=0 tray-open=0 io-status=ok file=/dev/cdrom ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0--->removable=1
..

My idea:
1) Maybe this is the design for scsi-block(passthrough cdrom)

2)I see another bug 

Bug 687900 - qemu host cdrom support not properly updating guests on media changes at physical CD/DVD drives--->won't fix

As Amit comment40 :

"Closing this bug -- please see comment 35, comment 36.  scsi cdrom passthrough can give better results, but cdrom passthrough on RHEL6 hosts isn't currently being worked on."

So maybe this is won't fix problem.

Hi, amit 

    Could you pleases help me see this bug?

thanks
Comment 4 langfang 2013-08-06 23:17:27 EDT
I will close this bug ,because when we want to change the passthrough CDROM,no need to  use qemu commands to change ,eg:(qemu)change drive-cd-disk /home/Windows_Server_2008_R2_GA_EN.iso .We should change the passthrogh CDROM through physical machine CDROM drive. And i also test ,not hit problem.


thanks

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