Bug 1170122

Summary: dracut's qemu module does not use systemd-detect-virt correctly
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: dracutAssignee: dracut-maint
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: chayang, dracut-maint-list, famz, harald, hhuang, jsnow, juzhang, kwolf, mbanas, michen, mkovarik, pbonzini, qzhang, virt-maint, xfu
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: 2016-11-04 07:56:12 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:
Bug Depends On:    
Bug Blocks: 1227278, 1289485, 1313485    
Attachments:
Description Flags
guest boot kernel log. none

Description Sibiao Luo 2014-12-03 10:36:21 UTC
Description of problem:
Found this bug when replied bug 949900.
According to Bug 1111107 that Q35 is no longer "tech preview" in RHEL7.x and is simply now unsupported (it will only be in qemu-kvm-rhev). And q35 is still in  techpreview.

Version-Release number of selected component (if applicable):
# uname -r && rpm -q qemu-kvm-rhev
3.10.0-211.el7.x86_64
qemu-kvm-rhev-2.1.2-14.el7.x86_64
guest info:
3.10.0-212.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.launch a KVM guest with IDE interface under q35 chipset.
# /usr/libexec/qemu-kvm -S -M q35 -cpu SandyBridge -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -name sluo-test -uuid ed09fa10-6ffe-4811-a42f-0294afcb5a42 -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/rhel7-64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 -device ide-hd,drive=drive-system-disk,bus=ide.0,unit=0,id=system-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=off,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=e1000-net-pci0,mac=08:2e:5f:0a:0d:b1,bus=pcie.0,addr=0x4,bootindex=2 -balloon none -usb -device usb-tablet,id=input0 -serial unix:/tmp/ttyS0,server,nowait -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -spice disable-ticketing,port=5931 -vga qxl -monitor stdio

2.switch to PC chipset with the same command line.

Actual results:
after step 1, it fail to boot up, as the KVM guest fail to find system AHCI disk under Q35 chipset.

after step 2, it can boot up successfully and work well.

Expected results:
it should boot up successfully.

Additional info:
(qemu) info qtree
...
      dev: ich9-ahci, id ""
        addr = 1f.2
        romfile = ""
        rombar = 1 (0x1)
        multifunction = true
        command_serr_enable = true
        class SATA controller, addr 00:1f.2, pci id 8086:2922 (sub 1af4:1100)
        bar 4: i/o at 0xc100 [0xc11f]
        bar 5: mem at 0xfc073000 [0xfc073fff]
        bus: ide.5
          type IDE
        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
          dev: ide-hd, id "system-disk"
            drive = "drive-system-disk"
            logical_block_size = 512 (0x200)
            physical_block_size = 512 (0x200)
            min_io_size = 0 (0x0)
            opt_io_size = 0 (0x0)
            bootindex = 1 (0x1)
            discard_granularity = 512 (0x200)
            ver = "2.1.2"
            wwn = 0 (0x0)
            serial = "QEMU-DISK1"
            model = ""
            cyls = 16383 (0x3fff)
            heads = 16 (0x10)
            secs = 63 (0x3f)
            bios-chs-trans = "lba"
            unit = 0 (0x0)
...

Comment 1 Sibiao Luo 2014-12-03 10:37:18 UTC
Created attachment 964076 [details]
guest boot kernel log.

Comment 4 John Snow 2014-12-09 17:39:05 UTC
The problem is that if you install RHEL7 with the -M pc type using qemu-kvm-rhev, the guest does not include libahci.ko and ahci.ko in its initramfs image.

Workarounds for now:

(1) Rebuild the initramfs to include ahci.ko and libahci.ko, or
(2) Install under the Q35 machine type.

See https://bugzilla.redhat.com/show_bug.cgi?id=949402 for a similar issue.

Comment 13 John Snow 2015-07-31 18:00:37 UTC
Harald Hoyer has prepared a fix upstream:

https://github.com/haraldh/dracut/commit/4135eea634b20c7f7285d134bd6dfe6b799fe226

Comment 14 Mike McCune 2016-03-28 22:31:02 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 18 errata-xmlrpc 2016-11-04 07:56:12 UTC
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/RHBA-2016-2530.html