Bug 893305

Summary: cdrom cannot be recognized with -device ide-drive (q35)
Product: Red Hat Enterprise Linux 7 Reporter: Suqin Huang <shuang>
Component: qemu-kvmAssignee: Hai Huang <hhuang>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: hhuang, juzhang, qzhang, sluo, 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-01-11 12:18:56 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 Suqin Huang 2013-01-09 05:22:56 UTC
Description of problem:
cdrom cannot be recognized

Version-Release number of selected component (if applicable):
qemu-kvm-1.3.0-3.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. cmd
usr/libexec/qemu-kvm -nodefaults \
-device ich9-usb-uhci1,id=usb1,bus=pcie.0,addr=0x4 \
-drive file='/home/autotest-devel/client/tests/kvm/images/RHEL-Server-6.4-64-virtio.qcow2',if=none,id=drive-ide0-0-0,media=disk,cache=none,format=qcow2,aio=native \
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
-device virtio-net-pci,netdev=idUMvixC,mac=9a:87:88:89:8a:8b,bus=pcie.0,addr=0x3,id='idMztaHV' \
-netdev tap,id=idUMvixC,vhost=on,script=/home/autotest-devel/client/virt/scripts/qemu-ifup-switch \
-m 2048 -smp 2,cores=1,threads=1,sockets=2 -cpu 'Opteron_G3' \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
-vnc :0 -vga cirrus -rtc base=utc,clock=host,driftfix=slew  \
-boot order=cdn,once=c,menu=off   -no-kvm-pit-reinjection -enable-kvm -M q35 \
-monitor stdio  -chardev socket,id=serial_id,path=/tmp/serial-shuang,server,nowait \
-device isa-serial,chardev=serial_id \
-drive file='/home/autotest-devel/client/tests/kvm/isos/linux/RHEL6.4-Server-i386.iso',if=none,id=drive-ide0-0-1,media=cdrom,snapshot=off,format=raw -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1
2.
3.
  
Actual results:
cannot find attached cdrom in guest

Expected results:


Additional info:
1. info block
(qemu) info block
drive-ide0-0-0: removable=0 io-status=ok file=/home/autotest-devel/client/tests/kvm/images/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-ide0-0-1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/autotest-devel/client/tests/kvm/isos/linux/RHEL6.4-Server-i386.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

2. in guest (rhel6.4.64)
no /dev/cdrom and /dev/sr0

Comment 2 Suqin Huang 2013-01-09 05:35:28 UTC
> -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
> -device

try with -device ide-cd, it works

Comment 3 Sibiao Luo 2013-01-09 06:38:04 UTC
I also tried this issue:

1.if use '-M pc-1.2', cdrom can be recognized in guest with '-device ide-drive', but fail with '-M q35' and seabios-1.7.2-0.2.gita810e4e7.el7.

2.the seabios also cann't recognize it with '-M q35' and seabios-1.7.2-0.2.gita810e4e7.el7, as there is no boot device for the cdrom in boot menu.

Best Regards.
sluo

Comment 4 Hai Huang 2013-01-10 16:17:45 UTC
Gerd provided the following note in BZ893302:

q35 in qemu 1.3 needs the dsdt passed in to work correctly:
"-acpitable file=/path/to/q35-acpi-dsdt.aml"

Comment 5 Suqin Huang 2013-01-11 05:50:08 UTC
it works when add "-acpitable file=/path/to/q35-acpi-dsdt.aml"

Comment 6 Hai Huang 2013-01-11 12:18:56 UTC
BZ closed as a duplicate as 893302.

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