Bug 1175099

Summary: [migration]migration failed when configure guest with OVMF bios + machine type=rhel6.5.0
Product: Red Hat Enterprise Linux 7 Reporter: vivian zhang <vivianzhang>
Component: qemu-kvm-rhevAssignee: Laszlo Ersek <lersek>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 7.1CC: areis, dyuan, gaspard.dhautefeuille, huding, juzhang, knoel, lersek, lhuang, lmiksik, mzhan, pbonzini, virt-maint, xfu, xwei
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.2.0-8.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1176283 (view as bug list) Environment:
Last Closed: 2015-12-04 16:23:47 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: 1175215    

Description vivian zhang 2014-12-17 07:10:15 UTC
Description:
migration failed with error when configure guest with OVMF bios + machine type=rhel6.5.0
when machine type is set lower than rhel6.5.0, such as rhel6.4.0, migration failed with the same error.

Product version
libvirt-1.2.8-10.el7.x86_64
qemu-kvm-rhev-2.1.2-15.el7.x86_64
OVMF-20140822-7.git9ece15a.el7.x86_64

How producible
100%

Steps:
1. Prepare a migration env with nfs img between source and target host

2. make sure source and target host has been installed OVMF
# rpm -q OVMF
OVMF-20140822-7.git9ece15a.el7.x86_64

3. install a UEFI guest with virt-manger, make sure the guest with below configuration, set machine type='rhel6.5.0', and OVMF bios in guest xml

# virsh dumpxml rhel7new
...
<os>
    <type arch='x86_64' machine='rhel6.5.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/rhel7new_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
...

4. start guest, it works well
# # virsh list --all
 Id    Name                           State
----------------------------------------------------
 27    rhel7new                       running

5. do migration for this guest, met qemu-kvm error
# virsh migrate rhel7new --live qemu+ssh://10.66.6.205/system --verbose
root.6.205's password:
Migration: [100 %]error: internal error: early end of file from monitor: possible problem:
RHEL-6 compat: ich9-usb-uhci1: irq_pin = 3
RHEL-6 compat: ich9-usb-uhci2: irq_pin = 3
RHEL-6 compat: ich9-usb-uhci3: irq_pin = 3
qemu-kvm: /builddir/build/BUILD/qemu-2.1.2/savevm.c:906: shadow_bios: Assertion `bios != ((void *)0)' failed.

6. when modify machine type to pc-i440fx-rhel7.1.0 or pc-i440fx-rhel7.0.0, migration could success

7. when delete OVMF bios configuration <nvram template='/usr/share/OVMF/OVMF_VARS.fd'></nvram>, migration could also success

Actual result:
migration failed with error

Expected result:
migration should success when configure guest with OVMF bios + machine type=rhel6.5.0

Additional info:
similar issue refer bug 1170093, but that patch not fix this bug, so filed a new to track this issue

Comment 2 Laszlo Ersek 2014-12-17 08:31:00 UTC
OVMF is completely unsupported on the rhel6.5.0 machine type.

Comment 11 Miroslav Rezanina 2015-03-19 09:08:22 UTC
Fix included in qemu-kvm-rhev-2.2.0-8.el7

Comment 12 Xiaoqing Wei 2015-03-19 10:11:48 UTC
with qemu-kvm-rhev-2.2.0-8.el7

machine types from 6.0.0 - 6.6.0 all fail to start VM w/ pflash.

pc and pc-i440fx-rhel7.0.0, and pc-i440fx-rhel7.1.0 success

[root@dhcp-11-50 ~]# sh uefi-rhel66.sh 
char device redirected to /dev/pts/1 (label charserial0)
QEMU 2.2.0 monitor - type 'help' for more information
(qemu) 2015-03-19T10:08:54.159087Z qemu-kvm: flash-based firmware is not supported by machine rhel6.1.0
[root@dhcp-11-50 ~]# vim uefi-rhel66.sh 
[root@dhcp-11-50 ~]# sh uefi-rhel66.sh 
char device redirected to /dev/pts/1 (label charserial0)
QEMU 2.2.0 monitor - type 'help' for more information
(qemu) 2015-03-19T10:09:01.570037Z qemu-kvm: flash-based firmware is not supported by machine rhel6.2.0
[root@dhcp-11-50 ~]# vim uefi-rhel66.sh 
[root@dhcp-11-50 ~]# sh uefi-rhel66.sh 
char device redirected to /dev/pts/1 (label charserial0)
QEMU 2.2.0 monitor - type 'help' for more information
(qemu) 2015-03-19T10:09:11.423035Z qemu-kvm: flash-based firmware is not supported by machine rhel6.3.0
[root@dhcp-11-50 ~]# vim uefi-rhel66.sh 
[root@dhcp-11-50 ~]# sh uefi-rhel66.sh 
char device redirected to /dev/pts/1 (label charserial0)
QEMU 2.2.0 monitor - type 'help' for more information
(qemu) 2015-03-19T10:09:20.637068Z qemu-kvm: flash-based firmware is not supported by machine rhel6.4.0
[root@dhcp-11-50 ~]# vim uefi-rhel66.sh 
[root@dhcp-11-50 ~]# sh uefi-rhel66.sh 
char device redirected to /dev/pts/1 (label charserial0)
QEMU 2.2.0 monitor - type 'help' for more information
(qemu) 2015-03-19T10:09:27.803100Z qemu-kvm: flash-based firmware is not supported by machine rhel6.5.0
[root@dhcp-11-50 ~]# vim uefi-rhel66.sh 
[root@dhcp-11-50 ~]# sh uefi-rhel66.sh 
qemu-kvm: -machine rhel6.6.0,accel=kvm,usb=off: Unsupported machine type
Use -machine help to list supported machines!
[root@dhcp-11-50 ~]# vim uefi-rhel66.sh 
[root@dhcp-11-50 ~]# sh uefi-rhel66.sh 
char device redirected to /dev/pts/1 (label charserial0)
QEMU 2.2.0 monitor - type 'help' for more information
(qemu) q


Based on above, move to VERIFIED.

Comment 15 errata-xmlrpc 2015-12-04 16:23:47 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-2015-2546.html