Bug 1021101 - [virt] some CD-ROMs are hidden if the drives are attached to separate controllers
[virt] some CD-ROMs are hidden if the drives are attached to separate control...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-19 08:03 EDT by Sibiao Luo
Modified: 2014-11-10 07:40 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-11 06:41:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
harald: needinfo-


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-10-19 08:03:49 EDT
Description of problem:
boot guest with attaching multi CD-ROMs to guest with IDE or SCSI-CD interface, the seabios can list the multi cdroms in device list correctly, but only one cdrom can be detected in guest. BTW, both the PC and Q35 machine type can hit this issue.

Version-Release number of selected component (if applicable):
host info:
3.10.0-34.el7.x86_64
qemu-kvm-1.5.3-9.el7.x86_64
seabios-bin-1.7.2.2-2.el7.noarch
guest info:
3.10.0-34.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with attaching multi CD-ROMs to guest with SCSI-CD interface.
e.g1:...-drive file=/home/cdrom1.iso,if=none,id=cd-rom1,media=cdrom,format=raw,readonly=on -device virtio-scsi-pci,id=sluo1 -device scsi-cd,drive=cd-rom1,id=cd1,bus=sluo1.0 -drive file=/home/cdrom2.iso,if=none,id=cd-rom2,media=cdrom,format=raw,readonly=on -device virtio-scsi-pci,id=sluo2 -device scsi-cd,bus=sluo2.0,drive=cd-rom2,id=cd2
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL-Server-7.0-64.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
cd-rom1: removable=1 locked=1 tray-open=0 io-status=ok file=/home/cdrom1.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
cd-rom2: removable=1 locked=1 tray-open=0 io-status=ok file=/home/cdrom2.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
2.check the cdroms in guest.
# ls -lh /dev/cdrom*
3.boot guest with attaching multi CD-ROMs to guest with IDE interface.
e.g2:...-drive file=/home/cdrom1.iso,if=none,id=cd-rom1,media=cdrom,format=raw,readonly=on -device ide-drive,bus=ide.0,unit=0,drive=cd-rom1,id=cd1 -drive file=/home/cdrom2.iso,if=none,id=cd-rom2,media=cdrom,format=raw,readonly=on -device ide-drive,bus=ide.0,unit=1,drive=cd-rom2,id=cd2
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL-Server-7.0-64.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
cd-rom1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/cdrom1.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
cd-rom2: removable=1 locked=0 tray-open=0 io-status=ok file=/home/cdrom2.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
4.check the cdroms in guest.
# ls -lh /dev/cdrom*

Actual results:
after step 2, only one cdrom can be detected in guest, like:
# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 Oct 19 14:16 /dev/cdrom -> sr0
after step 4, only one cdrom can be detected in guest, like:
# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 Oct 20 3:54 /dev/cdrom -> sr0

Expected results:
after step 2, if use the scsi-cd interface, the muti-cdroms should be detected in guest correctly. About the default IDE cdrom device  disappear when attach a emulated SCSI cdrom(scsi-cd), please refer to bug 974910.
# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 Oct 20 03:17 /dev/cdrom -> sr0  <--------bug 974910 
lrwxrwxrwx. 1 root root 3 Oct 20 03:17 /dev/cdrom1 -> sr2
lrwxrwxrwx. 1 root root 3 Oct 20 03:17 /dev/cdrom2 -> sr1

after step 4, if use the ide interface, it should be like:
# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 Oct 20 02:09 /dev/cdrom1 -> sr0
lrwxrwxrwx. 1 root root 3 Oct 20 02:09 /dev/cdrom2 -> sr1

Additional info:
Comment 1 Paolo Bonzini 2013-10-24 18:58:57 EDT
Please try again with a RHEL6 guest.  I cannot reproduce it with

kernel-2.6.32-258.el6.x86_64
udev-147-2.35.el6.x86-64

If it works, please reassign to systemd.  Also please test with a single virtio-scsi-pci controller and both disks attached to that controller.
Comment 2 Sibiao Luo 2013-10-24 22:20:42 EDT
(In reply to Paolo Bonzini from comment #1)
> Please try again with a RHEL6 guest.  I cannot reproduce it with
> 
> kernel-2.6.32-258.el6.x86_64
> udev-147-2.35.el6.x86-64
Yes, if use rhel6.5 guest that did not hit it.
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-424.el6.x86_64
qemu-kvm-0.12.1.2-2.414.el6.x86_64
guest info:
kernel-2.6.32-424.el6.x86_64
udev-147-2.50.el6.x86-64
e.g:...-drive file=/home/cdrom1.iso,if=none,id=cd-rom1,media=cdrom,format=raw,readonly=on -device virtio-scsi-pci,id=sluo1 -device scsi-cd,drive=cd-rom1,id=cd1,bus=sluo1.0 -drive file=/home/cdrom2.iso,if=none,id=cd-rom2,media=cdrom,format=raw,readonly=on -device virtio-scsi-pci,id=sluo2 -device scsi-cd,bus=sluo2.0,drive=cd-rom2,id=cd2
# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 Oct 24 22:09 /dev/cdrom1 -> sr0
lrwxrwxrwx. 1 root root 3 Oct 24 22:09 /dev/cdrom2 -> sr1
e.2:...-drive file=/home/cdrom1.iso,if=none,id=cd-rom1,media=cdrom,format=raw,readonly=on -device ide-drive,bus=ide.0,unit=0,drive=cd-rom1,id=cd1 -drive file=/home/cdrom2.iso,if=none,id=cd-rom2,media=cdrom,format=raw,readonly=on -device ide-drive,bus=ide.0,unit=1,drive=cd-rom2,id=cd2
# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 Oct 24 22:15 /dev/cdrom5 -> sr0
lrwxrwxrwx. 1 root root 3 Oct 24 22:15 /dev/cdrom6 -> sr1
> If it works, please reassign to systemd.  Also please test with a single
> virtio-scsi-pci controller and both disks attached to that controller.
If use single virtio-scsi-pci controller attached two cd-rom via scsi-cd wiht rhel6.5 guest that also did not meet such issue.

Best Regards,
sluo
Comment 3 Harald Hoyer 2013-11-11 06:41:09 EST
Current udev does not provide cdrom[0-9] symbolic links anymore.
Comment 4 Paolo Bonzini 2013-11-11 08:23:18 EST
Harald, please make sure that there is documentation about this (Release Notes?).

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