Bug 946993
Summary: | Q35 does not honor -drive if=ide,... and its sugared forms -cdrom, -hda, ... | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Sibiao Luo <sluo> |
Component: | qemu-kvm-rhev | Assignee: | John Snow <jsnow> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.0 | CC: | armbru, chayang, hhuang, juli, juzhang, knoel, kraxel, kwolf, mazhang, michen, pbonzini, qzhang, rbalakri, virt-maint, xfu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-rhev-2.1.2-5.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 09:42:19 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
Sibiao Luo
2013-04-01 06:48:32 UTC
we can see the cdrom use the IDE interface under Q35 with '-cdrom ...' . (qemu) info block drive-system-disk: removable=0 io-status=ok file=/home/windows_server_2012_x64.raw ro=0 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 file=/usr/share/virtio-win/virtio-win-1.6.3_amd64.vfd ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 ide1-cd0: removable=1 locked=0 tray-open=0 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 sd0: removable=1 locked=0 tray-open=0 [not inserted] The AHCI adapter and the Q35 board lack calls to ide_create_drive and drive_get respectively. Reassigning to Kevin since he worked on other AHCI -drive bugs, and the fix is relatively trivial. discussion happening upstream (IDE vs AHCI for cd-roms in Q35). Leaving it for 7.1.0 as Q35 is tech-preview. Q35 does not honor -drive if=ide (see comment#2). '-cdrom F' is sugar for '-drive if=ide,index=2,file=F,media=cdrom'. -hda & friends is similar sugar, see vl.c for details. You don't need SeaBIOS to observe that, info qtree suffices. Summary updated. -drive creates a backend, visible in "info block". With if=ide, it additionally posts a request to the board code to create the appropriate frontend. It's up to the board to honor it. i440FX does, Q35 doesn't. -device ide-hd,.. works differently: board-independent code creates the IDE device and plugs it into a suitable socket if it finds one. Same for ide-cd. Suitable sockets may be provided by onboard controllers created by board code or additional controllers created with -device. You can constrain the choice by specifying bus, unit with -device. i440FX's onboard controller is PATA. Q35's is SATA. -device doesn't care; both provide the same kind of plug for ide-{hd,cd}. A system may have both PATA and SATA controllers. If you care about the kind of controller, pick one by specifying bus=... with -device. The reason why Q35 doesn't honor if=ide requests is lack of upstream consensus on what the request should mean: always PATA, or leave the choice to the board. I'm in the "leave it to the board" camp. Kevin has arguments for "always PATA". If "always PATA", then we need to implement ICH9 legacy PATA mode for it to work. If "leave it to the board", we need to rethink the mapping between index and (bus,unit), which differs between PATA and SATA. A possible compromise is a machine option controlling ICH9 legacy PATA mode. Q35 would then use PATA for if=ide if and only if the option is enabled. *** Bug 1056900 has been marked as a duplicate of this bug. *** Fix included in qemu-kvm-rhev-2.1.2-5.el7 Reproduce this bug on qemu-kvm-rhev-2.1.2-3.el7.x86_64. Host: qemu-kvm-rhev-2.1.2-3.el7.x86_64 qemu-kvm-tools-rhev-2.1.2-3.el7.x86_64 qemu-kvm-common-rhev-2.1.2-3.el7.x86_64 qemu-kvm-rhev-debuginfo-2.1.2-3.el7.x86_64 qemu-img-rhev-2.1.2-3.el7.x86_64 kernel-3.10.0-191.el7.x86_64 seabios-bin-1.7.5-5.el7.noarch Command line: /usr/libexec/qemu-kvm \ -M q35 \ -cpu SandyBridge \ -m 2G \ -smp 4,maxcpus=160,cores=2,threads=1,sockets=2 \ -enable-kvm \ -name rhel7 \ -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \ -smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \ -k en-us \ -rtc base=localtime,clock=host,driftfix=slew \ -nodefaults \ -monitor stdio \ -qmp tcp:0:5555,server,nowait \ -boot menu=on \ -bios /usr/share/seabios/bios.bin \ -monitor unix:/tmp/monitor2,server,nowait \ -vga qxl \ -spice port=5900,disable-ticketing \ -usb \ -device usb-tablet,id=tablet0 \ -drive file=gluster://10.66.106.25/gv0/rhel7-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \ -device virtio-blk-pci,scsi=off,bus=pcie.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -netdev tap,id=hostnet0,vhost=on \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:01:02:B6:40:21 \ -cdrom /home/boot.iso \ -chardev socket,id=seabios,path=/tmp/seabios,server,nowait \ -device isa-debugcon,chardev=seabios,iobase=0x402 \ Result: Searching bootorder for: /pci@i0cf8/*@3 Searching bootorder for: /rom@genroms/kvmvapic.bin Press F12 for boot menu. Select boot device: 1. Virtio disk PCI:0:2 2. Legacy option rom 3. iPXE (PCI 00:03.0) Verified this bug on qemu-kvm-rhev-2.1.2-5.el7.x86_64. Result: DVD/CD device list in boot menu. Searching bootorder for: /pci@i0cf8/*@3 Searching bootorder for: /rom@genroms/kvmvapic.bin Press F12 for boot menu. Select boot device: 1. Virtio disk PCI:0:2 2. Legacy option rom 3. DVD/CD [AHCI/2: QEMU DVD-ROM ATAPI-4 DVD/CD] 4. iPXE (PCI 00:03.0) This bug has been fixed. Test with -hda also works well. Command line: -cdrom /home/boot.iso \ -chardev socket,id=seabios,path=/tmp/seabios,server,nowait \ -device isa-debugcon,chardev=seabios,iobase=0x402 \ -hda /home/storage0.qcow2 \ Result: Searching bootorder for: /pci@i0cf8/*@2 Searching bootorder for: /rom@genroms/kvmvapic.bin Press F12 for boot menu. Select boot device: 1. AHCI/0: QEMU HARDDISK ATA-7 Hard-Disk (30720 MiBytes) 2. Legacy option rom 3. DVD/CD [AHCI/2: QEMU DVD-ROM ATAPI-4 DVD/CD] 4. iPXE (PCI 00:02.0) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0624.html |