Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1357415 - Guest didn't boot up successfully with ovmf
Summary: Guest didn't boot up successfully with ovmf
Keywords:
Status: CLOSED DUPLICATE of bug 1352386
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Laszlo Ersek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-18 07:33 UTC by jingzhao
Modified: 2016-07-21 09:38 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-21 09:38:17 UTC


Attachments (Terms of Use)
The ovmf log (deleted)
2016-07-18 07:34 UTC, jingzhao
no flags Details

Description jingzhao 2016-07-18 07:33:10 UTC
Description of problem:
Guest didn't boot up successfully with ovmf

Version-Release number of selected component (if applicable):
host kernel:3.10.0-467.el7.x86_64
qemu-kvm-rhev-2.6.0-12.el7.x86_64
OVMF-20160608-2.git988715a.el7.noarch
guest kernel:3.10.0-469.el7.x86_64

How reproducible:
3/3

Steps to Reproduce:
1.Boot guest with following cli:
/usr/libexec/qemu-kvm \
-M q35 \
-cpu Nehalem \
-monitor stdio \
-m 4G \
-vga qxl \
-drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/usr/share/OVMF/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \
-debugcon file:/home/q35.ovmf.log \
-global isa-debugcon.iobase=0x402 \
-spice port=5932,disable-ticketing \
-smp 4,sockets=4,cores=1,threads=1 \
-device ioh3420,bus=pcie.0,id=root1.0,slot=1 \
-device x3130-upstream,bus=root1.0,id=upstream1.1 \
-device xio3130-downstream,bus=upstream1.1,id=downstream1.1,chassis=2 \
-device virtio-net-pci,bus=downstream1.1,netdev=tap10,mac=9a:6a:6b:6c:6d:6e -netdev tap,id=tap10 \
-device ioh3420,bus=pcie.0,id=root1.1,slot=2 \
-device x3130-upstream,bus=root1.1,id=upstream1.2 \
-device xio3130-downstream,bus=upstream1.2,id=downstream1.2,chassis=3 \
-device xio3130-downstream,bus=upstream1.2,id=downstream1.3,chassis=4 \
-drive if=none,id=drive0,file=/home/pxb-ovmf.qcow2 \
-device virtio-blk-pci,drive=drive0,scsi=off,bus=downstream1.2,disable-legacy=on,disable-modern=off  \
-device ioh3420,bus=pcie.0,id=root1.2,slot=3 \

Actual results:
guest didn't boot up 

Expected results:
guest can boot up successfully

Additional info:

Comment 1 jingzhao 2016-07-18 07:34:34 UTC
Created attachment 1180940 [details]
The ovmf log

Comment 3 Laszlo Ersek 2016-07-20 11:53:43 UTC
(1) A general comment: your qemu command line is not right. There are several problems with it:

- You are using the OVMF_VARS.fd file directly from under /usr/share/OVMF.

  I've explained in the test plan and in several BZs independently that, if you
  use OVMF with a direct QEMU command line, you must manually create a copy of
  OVMF_VARS.fd, and pass the *copy* to QEMU.

  The OVMF RPM package is now corrupted on your system. Please reinstall it from
  Brew before you fix the QEMU command line.

- You didn't pass the following QEMU option:

  -global driver=cfi.pflash01,property=secure,value=on

  This is necessary for SMM to actualy improve firmware security.

(2) From looking at the OVMF log -- and I do thank you very much for attaching it immediately -- I see that "shim.efi" is loaded, and it even loads and launches "grubx64.efi".

I also see from comment 0 that the guest kernel version is 469.el7. This makes me think that you are using a nightly RHEL-7 compose for guest, or else had an earlier RHEL-7 guest that you updated to the most recent RHEL-7 development packages.

Can you confirm this please? Ultimately, I suspect a change in grub or shim. I could be wrong, of course, but I'd like to know more about your guest. Thanks!

Comment 4 Laszlo Ersek 2016-07-20 15:05:40 UTC
FWIW, I can install and boot a RHEL-7 guest with the following script:

-----------

#!/bin/bash
set -e -u -C

TMPL=/usr/share/OVMF/OVMF_VARS.fd
VARS=bz1357415_test.vars.fd

# create varstore if it doesn't exist
if ! test -e "$VARS"; then
  cp -- "$TMPL" "$VARS"
fi

if ! test -e bz1357415_test.qcow2; then
  qemu-img create -f qcow2 bz1357415_test.qcow2 10G
fi

/usr/libexec/qemu-kvm \
  -S \
  \
  -machine pc-q35-rhel7.3.0,accel=kvm,smm=on \
  -cpu Nehalem,enforce \
  -m 4G \
  -vga qxl \
  -drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on \
  -drive file=$VARS,if=pflash,format=raw,unit=1 \
  -debugcon file:bz1357415_test.log \
  -global isa-debugcon.iobase=0x402 \
  -smp 4,sockets=4,cores=1,threads=1 \
  \
  -device ioh3420,bus=pcie.0,id=root1.0,slot=1 \
  -device x3130-upstream,bus=root1.0,id=upstream1.1 \
  -device xio3130-downstream,bus=upstream1.1,id=downstream1.1,chassis=2 \
  \
  -netdev bridge,id=net0,br=virbr0,helper=/usr/libexec/qemu-bridge-helper \
  -device virtio-net-pci,bus=downstream1.1,netdev=net0,mac=52:54:00:01:7e:2d \
  \
  -device ioh3420,bus=pcie.0,id=root1.1,slot=2 \
  -device x3130-upstream,bus=root1.1,id=upstream1.2 \
  -device xio3130-downstream,bus=upstream1.2,id=downstream1.2,chassis=3 \
  -device xio3130-downstream,bus=upstream1.2,id=downstream1.3,chassis=4 \
  \
  -drive if=none,id=drive0,file=bz1357415_test.qcow2 \
  -device virtio-blk-pci,drive=drive0,scsi=off,bus=downstream1.2,disable-legacy=on,disable-modern=off,bootindex=1  \
  \
  -drive if=none,media=cdrom,id=cd0,file=RHEL-7.3-20160719.1-Server-x86_64-dvd1.iso,readonly \
  -device virtio-scsi-pci,bus=downstream1.3,disable-legacy=on,disable-modern=off,id=scsi0 \
  -device scsi-cd,bus=scsi0.0,drive=cd0,bootindex=2 \
  \
  -device ioh3420,bus=pcie.0,id=root1.2,slot=3 \
  \
  -chardev stdio,signal=off,mux=on,id=char0 \
  -mon chardev=char0,mode=readline,default \
  -serial chardev:char0 \

-----------

Versions:
- host kernel: 464.el7
- OVMF: brew build for bug 1356913 (see bug 1356913 comment 1 for the link)
- qemu-kvm-rhev: 2.6.0-13.el7
- guest: RHEL-7.3-20160719.1-Server-x86_64-dvd1.iso (latest compose at the moment)

Comment 5 Laszlo Ersek 2016-07-20 15:07:39 UTC
So, my request is:
- please retry with the most recent brew build for OVMF (see above,
  taskid 11364000 for bug 1356913)
- please retry with the latest RHEL-7.3 compose as guest.

Thanks
Laszlo

Comment 6 Laszlo Ersek 2016-07-20 20:26:22 UTC
After downgrading my OVMF package precisely to the one given in comment 0 (that is, OVMF-20160608-2.git988715a.el7.noarch), my guest (see comment 4) still boots just fine.

Comment 7 jingzhao 2016-07-21 02:58:12 UTC
Thanks for your comments, Laszlo

1. First, sorry for the mistake of paste, I just used the correct comdline

-drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/home/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \

2. Added the commandline "-global driver=cfi.pflash01,property=secure,value=on \
" guest also didn't boot up (guest kernel:3.10.0-469.el7.x86_64)

3. Updated the OVMF version with your suggestions, guest also didn't boot up (guest kernel:3.10.0-469.el7.x86_64)

4,Updated the OVMF version(OVMF-20160608-2.git988715a.el7.enroll_missing_init_bz1356913.noarch.rpm), install a new guest(http://download.eng.pek2.redhat.com/pub/rhel/nightly/RHEL-7.3-20160719.n.0/)

guest can boot up successfully with following command line:

host kernel:kernel-3.10.0-472.el7.x86_64
qemu-img-rhev-2.6.0-12.el7.x86_64

/usr/libexec/qemu-kvm \
-M q35 \
-cpu Nehalem \
-monitor stdio \
-m 4G \
-vga qxl \
-drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/home/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \
-global driver=cfi.pflash01,property=secure,value=on \
-debugcon file:/home/q35.ovmf.log \
-global isa-debugcon.iobase=0x402 \
-spice port=5932,disable-ticketing \
-smp 4,sockets=4,cores=1,threads=1 \
-device ioh3420,bus=pcie.0,id=root1.0,slot=1 \
-device x3130-upstream,bus=root1.0,id=upstream1.1 \
-device xio3130-downstream,bus=upstream1.1,id=downstream1.1,chassis=2 \
-device virtio-net-pci,bus=downstream1.1,netdev=tap10,mac=9a:6a:6b:6c:6d:6e -netdev tap,id=tap10 \
-device ioh3420,bus=pcie.0,id=root1.1,slot=2 \
-device x3130-upstream,bus=root1.1,id=upstream1.2 \
-device xio3130-downstream,bus=upstream1.2,id=downstream1.2,chassis=3 \
-device xio3130-downstream,bus=upstream1.2,id=downstream1.3,chassis=4 \
-drive if=none,id=drive0,file=/home/ovmf.qcow2 \
-device virtio-blk-pci,drive=drive0,scsi=off,bus=downstream1.2,disable-legacy=on,disable-modern=off  \
-device ioh3420,bus=pcie.0,id=root1.2,slot=3 \

And I have one question, why the 469 version guest didn't boot up, a kernel issue or other reasons?

Thanks
Jing Zhao

Comment 9 Laszlo Ersek 2016-07-21 09:38:17 UTC

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


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