Bug 2057769

Summary: missing 'nvram-template' when start ovmf guest
Product: Red Hat Enterprise Linux 9 Reporter: Meina Li <meili>
Component: libvirtAssignee: Daniel Berrangé <berrange>
libvirt sub component: General QA Contact: Meina Li <meili>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: amurdaca, berrange, coli, hongzliu, jdenemar, jieli, jiji, jsuchane, juzhou, kraxel, lcheng, ldoktor, lmiccini, lpivarc, mhou, mpitt, obudai, pbonzini, perobins, pkrempa, pvlasin, rjones, rpittau, virt-maint, xiaofwan, xiawu, xuwei, xuzhang, xzhou, yfu, yicui, yoguo, zixchen
Version: 9.0Keywords: Automation, Regression, TestBlocker, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-8.0.0-6.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2060776 (view as bug list) Environment:
Last Closed: 2022-05-17 12:46:34 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: 910269, 1943296, 1922007, 2060776    

Description Meina Li 2022-02-24 03:57:52 UTC
Description of problem:
missing 'nvram-template' when start ovmf guest

Version-Release number of selected component (if applicable):
libvirt-8.0.0-4.el9.x86_64
qemu-kvm-6.2.0-9.el9.x86_64
edk2-ovmf-20220126gitbb1bba3d77-3.el9.noarch

How reproducible:
100%

Steps to Reproduce:
1. Prepare a ovmf guest.
# virsh edit ovmf
...
  <os firmware='efi'>
    <type arch='x86_64' machine='pc-q35-rhel9.0.0'>hvm</type>
    <boot dev='hd'/>
  </os>
...
2. Start the ovmf guest.
# virsh start lmn
setlocale: No such file or directory
error: Failed to start domain 'lmn'
error: internal error: missing 'nvram-template' in '/usr/share/qemu/firmware/50-edk2-ovmf-amdsev.json'

Actual results:
As step 2.

Expected results:
Can start successfully.


Additional info:
Before we have /usr/share/qemu/firmware/50-edk2-ovmf-cc.json for sev feature. Why we had another 50-edk2-ovmf-amdsev.json?

Comment 2 Daniel Berrangé 2022-02-24 13:12:09 UTC
The following patch (which is merged upstream) will avoid the immediate error https://listman.redhat.com/archives/libvir-list/2022-February/msg00670.html


Actual support for SEV measurement,w hich will use the new EDK firmware build, is tracked in bug 2058004

Comment 5 Xuesong Zhang 2022-02-25 05:30:51 UTC
Hi, Jarda,

From QE's POV, we suggest to fix this regression and testblocker in 9.0.0, please have a look and set the ITR, thanks.

Comment 6 Meina Li 2022-02-25 07:13:31 UTC
Can start the ovmf guest successfully in libvirt-8.1.0-1.fc35.x86_64 with the fixed patch in comment 2.

Comment 7 Jaroslav Suchanek 2022-02-25 12:18:27 UTC
(In reply to Xuesong Zhang from comment #5)
> Hi, Jarda,
> 
> From QE's POV, we suggest to fix this regression and testblocker in 9.0.0,
> please have a look and set the ITR, thanks.

ITR set.

Comment 10 Jaroslav Suchanek 2022-02-25 15:19:13 UTC
*** Bug 2058618 has been marked as a duplicate of this bug. ***

Comment 11 Lukáš Doktor 2022-02-26 11:17:13 UTC
Hello guys, probably obvious note but this also affects "virt-resize" and similar commands, therefore until this is resolved the nightly perf-ci is blocked by this.

Comment 12 CongLi 2022-02-28 08:07:24 UTC
*** Bug 2059043 has been marked as a duplicate of this bug. ***

Comment 14 Daniel Berrangé 2022-02-28 11:02:02 UTC
RHEL-9.0.0  fix at https://gitlab.com/redhat/rhel/src/libvirt/-/merge_requests/15

Comment 15 Daniel Berrangé 2022-02-28 11:53:24 UTC
(In reply to Lukáš Doktor from comment #11)
> Hello guys, probably obvious note but this also affects "virt-resize" and
> similar commands, therefore until this is resolved the nightly perf-ci is
> blocked by this.

The impact is on any app that attempts to use guests that are configured with UEFI firmware, so pretty much any & all virt apps.

Comment 16 Peter Krempa 2022-02-28 12:15:17 UTC
*** Bug 2059173 has been marked as a duplicate of this bug. ***

Comment 18 Meina Li 2022-03-01 10:05:16 UTC
Pre-verified with scrach build libvirt-8.0.0-6.el9_rc.1813faedff.x86_64: PASS

Comment 19 Richard W.M. Jones 2022-03-01 12:18:33 UTC
*** Bug 2059495 has been marked as a duplicate of this bug. ***

Comment 20 Martin Pitt 2022-03-02 09:09:49 UTC
This also broke cockpit-machines, most tests now fail on CentOS 9 stream and RHEL 9: https://artifacts.dev.testing-farm.io/a880a31c-cf3b-40b3-b97c-460972cf6178/

Is there any known workaround?

Comment 21 Martin Pitt 2022-03-02 09:15:09 UTC
> Is there any known workaround?

It's enough to do: rm /usr/share/qemu/firmware/50-edk2-ovmf-amdsev.json

Comment 22 Daniel Berrangé 2022-03-02 09:23:36 UTC
(In reply to Martin Pitt from comment #21)
> > Is there any known workaround?
> 
> It's enough to do: rm /usr/share/qemu/firmware/50-edk2-ovmf-amdsev.json

If you don't want to touch files owned by RPM an alternative is

  touch /etc/qemu/firmware/50-edk2-ovmf-amdsev.json

which will hide the RPM installed file

Comment 26 Masayoshi Mizuma (Fujitsu) 2022-03-04 14:32:17 UTC
*** Bug 2060500 has been marked as a duplicate of this bug. ***

Comment 27 Richard W.M. Jones 2022-03-04 17:23:03 UTC
*** Bug 2060709 has been marked as a duplicate of this bug. ***

Comment 29 Martin Pitt 2022-03-18 08:42:33 UTC
Any idea why this is still not fixed in CentOS 9 stream? http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/ still has 8.0.0-5. Should't RHEL 9 fixes go via c9s?

Comment 30 Jiri Denemark 2022-03-18 10:16:06 UTC
Because CentOS 9 Stream already tracks RHEL 9.1 rather than RHEL 9.0 and there
was no libvirt-8.0.0-6.el9 build in 9.1. Libvirt was rebased to 8.1.0 there
instead, i.e., 9.1 should include libvirt-8.1.0-1.el9 with the fix included,
but unfortunately the build did not finish gating yet.

Comment 31 Xuesong Zhang 2022-03-21 08:52:03 UTC
(In reply to Jiri Denemark from comment #30)
> Because CentOS 9 Stream already tracks RHEL 9.1 rather than RHEL 9.0 and
> there
> was no libvirt-8.0.0-6.el9 build in 9.1. Libvirt was rebased to 8.1.0 there
> instead, i.e., 9.1 should include libvirt-8.1.0-1.el9 with the fix included,
> but unfortunately the build did not finish gating yet.

The gating of libvirt-8.1 is failed by BZ 2064115. Even you get the libvirt-8.1 build, the issue in this BZ is fixed, but you will met another issue in BZ 2064115.

Comment 34 errata-xmlrpc 2022-05-17 12:46:34 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 (new packages: libvirt), 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://access.redhat.com/errata/RHBA-2022:2390