Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 927138

Summary: Guest boot upwith "-M q35", only can recognize one cdrom
Product: Red Hat Enterprise Linux 7 Reporter: Qian Guo <qiguo>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chayang, juzhang, michen, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-25 07:53:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qian Guo 2013-03-25 07:45:31 UTC
Description of problem:
Boot a guest over -M q35 w/ two cdroms(I test w/ iso), only can recognize one cdrom .  Both windows and Linux guest have this issue.

Version-Release number of selected component (if applicable):
# uname -r
3.8.0-0.40.el7.x86_64

# rpm -q qemu-kvm
qemu-kvm-1.4.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot a guest w/ '-M q35' and two ISO file. My cli like this:

# /usr/libexec/qemu-kvm -cpu Penryn -m 4G -smp 2,sockets=1,cores=2,threads=1 -enable-kvm -name win2012 -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/rhel7-32-cp2.qcow2,if=none,format=qcow2,werror=stop,rerror=stop,media=disk,id=drive-scsi0-disk0 -device virtio-scsi-pci,id=scsi0,addr=0x4 -device scsi-hd,scsi-id=0,lun=0,bus=scsi0.0,drive=drive-scsi0-disk0,id=virtio-disk0,bootindex=1 -nodefconfig -monitor stdio -netdev tap,id=tap0,vhost=on,fd=81 -device virtio-net-pci,netdev=tap0,mac=1a:00:65:46:cb:ba -vnc :10 -vga std -boot menu=on -drive file=/home/en_windows_server_2012_x64_dvd_915478.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=/home/8400.0.WINMAIN_WIN8RC.120518-1423_X64FRE_SERVER_EN-US-HRC_SSS_X64FRE_EN-US_DV5.ISO,if=none,media=cdrom,id=drive-ide1-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide1-1-0,id=ide1-1-0 -M q35

2.After boot up, inside guest.
# mount 
...
/dev/sr0 on /run/media/root/UDF Volume type udf (ro,nosuid,nodev,relatime,uid=0,gid=0,umask=77,iocharset=utf8,uhelper=udisks2)
...

3. Test w/ a windows guest, only can see one cdrom inside guest.
  
Actual results:
Guest only can recognize one cdrom.

Expected results:
All attached cdroms could be recognized in guest.

Additional info:
When not use -M q35, can get all cdroms, inside guest:
#mount
....
/dev/sr1 on /run/media/root/UDF Volume type udf (ro,nosuid,nodev,relatime,uid=0,gid=0,umask=77,iocharset=utf8,uhelper=udisks2)
/dev/sr0 on /run/media/root/UDF Volume1 type udf (ro,nosuid,nodev,relatime,uid=0,gid=0,umask=77,iocharset=utf8,uhelper=udisks2)
....

Comment 1 Qian Guo 2013-03-25 07:49:15 UTC
Guest w/ q35

(qemu) info block
drive-scsi0-disk0: removable=0 io-status=ok file=/home/rhel7-32-cp2.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-ide0-1-0: removable=1 locked=0 tray-open=0 io-status=ok file=/home/en_windows_server_2012_x64_dvd_915478.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-ide1-1-0: removable=1 locked=0 tray-open=0 io-status=ok file=/home/8400.0.WINMAIN_WIN8RC.120518-1423_X64FRE_SERVER_EN-US-HRC_SSS_X64FRE_EN-US_DV5.ISO ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

...

(qemu) info qtree

...

dev: ich9-ahci, id ""
        addr = 1f.2
        romfile = <null>
        rombar = 1
        multifunction = on
        command_serr_enable = on
        class SATA controller, addr 00:1f.2, pci id 8086:2922 (sub 1af4:1100)
        bar 4: i/o at 0xc0a0 [0xc0bf]
        bar 5: mem at 0xfebf3000 [0xfebf3fff]
        bus: ide.5
          type IDE
          dev: ide-drive, id "ide1-1-0"
            drive = drive-ide1-1-0
            logical_block_size = 512
            physical_block_size = 512
            min_io_size = 0
            opt_io_size = 0
            bootindex = -1
            discard_granularity = 0
            ver = "1.4.0"
            wwn = 0x0
            serial = "QM00012"
            model = <null>
            unit = 1
          dev: ide-drive, id "ide0-1-0"
            drive = drive-ide0-1-0
            logical_block_size = 512
            physical_block_size = 512
            min_io_size = 0
            opt_io_size = 0
            bootindex = -1
            discard_granularity = 0
            ver = "1.4.0"
            wwn = 0x0
            serial = "QM00011"
            model = <null>
            unit = 0
        bus: ide.4
          type IDE
        bus: ide.3
          type IDE
        bus: ide.2
          type IDE
        bus: ide.1
          type IDE
        bus: ide.0
          type IDE
...

Comment 2 Qian Guo 2013-03-25 07:50:39 UTC
Guest w/ q35

(qemu) info block
drive-scsi0-disk0: removable=0 io-status=ok file=/home/rhel7-32-cp2.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-ide0-1-0: removable=1 locked=0 tray-open=0 io-status=ok file=/home/en_windows_server_2012_x64_dvd_915478.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
drive-ide1-1-0: removable=1 locked=0 tray-open=0 io-status=ok file=/home/8400.0.WINMAIN_WIN8RC.120518-1423_X64FRE_SERVER_EN-US-HRC_SSS_X64FRE_EN-US_DV5.ISO ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

...

(qemu) info qtree

...

dev: ich9-ahci, id ""
        addr = 1f.2
        romfile = <null>
        rombar = 1
        multifunction = on
        command_serr_enable = on
        class SATA controller, addr 00:1f.2, pci id 8086:2922 (sub 1af4:1100)
        bar 4: i/o at 0xc0a0 [0xc0bf]
        bar 5: mem at 0xfebf3000 [0xfebf3fff]
        bus: ide.5
          type IDE
          dev: ide-drive, id "ide1-1-0"
            drive = drive-ide1-1-0
            logical_block_size = 512
            physical_block_size = 512
            min_io_size = 0
            opt_io_size = 0
            bootindex = -1
            discard_granularity = 0
            ver = "1.4.0"
            wwn = 0x0
            serial = "QM00012"
            model = <null>
            unit = 1
          dev: ide-drive, id "ide0-1-0"
            drive = drive-ide0-1-0
            logical_block_size = 512
            physical_block_size = 512
            min_io_size = 0
            opt_io_size = 0
            bootindex = -1
            discard_granularity = 0
            ver = "1.4.0"
            wwn = 0x0
            serial = "QM00011"
            model = <null>
            unit = 0
        bus: ide.4
          type IDE
        bus: ide.3
          type IDE
        bus: ide.2
          type IDE
        bus: ide.1
          type IDE
        bus: ide.0
          type IDE
...

Comment 3 Qian Guo 2013-03-25 07:53:10 UTC

*** This bug has been marked as a duplicate of bug 922670 ***