Bug 1880418

Summary: Regression: migration: unable to find any master var store for loader
Product: Red Hat Enterprise Linux 8 Reporter: Andrea Bolognani <abologna>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Meina Li <meili>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: abologna, chhu, drjones, dyuan, fjin, jdenemar, jsuchane, lcapitulino, lmen, mprivozn, mzhan, virt-bugs, virt-maint, weizhan, xuzhang
Target Milestone: rcKeywords: Regression, Upstream
Target Release: 8.0   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-6.0.0-29.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1852910 Environment:
Last Closed: 2021-05-18 15:21:44 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: 1852910    
Bug Blocks:    

Description Andrea Bolognani 2020-09-18 13:32:04 UTC
+++ This bug was initially created as a clone of Bug #1852910 +++

This bug is quite similar to bug 1776949, but instead of getting the
"unable to find any master var store for loader" message at install
time, we get it at live migration time. The same workaround from bug
1776949 comment 1 works to fix migration, even though it's no longer
necessary to fix install.

--- Additional comment from Michal Privoznik on 2020-09-08 17:28:30 UTC ---

Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2020-September/msg00465.html

--- Additional comment from Michal Privoznik on 2020-09-09 12:49:52 UTC ---

Merged upstream as:

c43622f06e qemuFirmwareFillDomain: Fill NVRAM template on migration too

v6.7.0-112-gc43622f06e

Comment 2 Andrea Bolognani 2020-09-18 13:43:18 UTC
Luiz wondered whether this would affect x86_64 in addition to
aarch64, and as it turns out it does: if your guest definition looks
like

  <domain type='kvm'>
    <os>
      <type arch='x86_64' machine='pc-q35-rhel8.2.0'>hvm</type>
      <loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
      <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
    </os>
    ...

which is what you'd get out of a virt-install call along the lines of

  $ virt-install --os-variant rhel8.0 --boot uefi ...

then you'll experience the same issue on migration:

  $ virsh migrate guest qemu+ssh://dst/system
  error: operation failed: unable to find any master var store for loader: /usr/share/edk2/ovmf/OVMF_CODE.secboot.fd

Comment 9 Meina Li 2020-11-12 03:04:16 UTC
Verified Version:
libvirt-6.0.0-30.module+el8.4.0+8705+34397d87.x86_64
qemu-kvm-4.2.0-35.module+el8.4.0+8705+34397d87.x86_64

S1: Migrate a OVMF domain
1. Prepare the migration environment with two servers(src and dst).
2. Install a ovmf guest by virt-install.
# virt-install --name ovmf --memory 4096 --disk /var/lib/libvirt/images/lmn-ovmf.qcow2,size=20 --boot uefi --os-variant rhel8.0
# virsh dumpxml ovmf | grep /os -B 5
  <os>
    <type arch='x86_64' machine='pc-q35-rhel8.2.0'>hvm</type>
    <loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/ovmf_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
3. Migrate the ovmf domain.
Step: # virsh migrate ovmf qemu+ssh://dst/system --live --verbose
......
Migration: [100 %]
Result:  Migrate successfully and the guest will run in dst host.

Comment 11 errata-xmlrpc 2021-05-18 15:21:44 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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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/RHSA-2021:1762