RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2186383 - Failed to migrate uefi vm with firmware XML config [rhel-9.2.0.z]
Summary: Failed to migrate uefi vm with firmware XML config [rhel-9.2.0.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Andrea Bolognani
QA Contact: Meina Li
URL:
Whiteboard:
Depends On: 2184966
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-13 06:07 UTC by RHEL Program Management Team
Modified: 2023-05-09 11:10 UTC (History)
17 users (show)

Fixed In Version: libvirt-9.0.0-10.1.el9_2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2184966
Environment:
Last Closed: 2023-05-09 11:04:43 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-154596 0 None None None 2023-04-13 16:19:22 UTC
Red Hat Product Errata RHBA-2023:2632 0 None None None 2023-05-09 11:04:48 UTC

Comment 2 Meina Li 2023-04-17 05:42:27 UTC
Test Version:
libvirt-9.0.0-10.1.el9_2.x86_64
qemu-kvm-7.2.0-14.el9_2.x86_64

Test Steps:
S1: Migration guest with secure boot enabled.
1. Prepare a guest with the following os xml.
<os firmware="efi">
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <firmware>
    <feature enabled="yes" name="enrolled-keys"/>
    <feature enabled="yes" name="secure-boot"/>
  </firmware>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
2. Start the guest.
# virsh start rhel
Domain 'rhel' started
# virsh dumpxml rhel --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <firmware>
    <feature enabled="yes" name="enrolled-keys"/>
    <feature enabled="yes" name="secure-boot"/>
  </firmware>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
  <nvram template="/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd">/var/lib/libvirt/qemu/nvram/rhel_VARS.fd</nvram>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
3. Migrate to the target host.
# virsh migrate rhel qemu+ssh://[target_host]/system --live --verbose --p2p
Migration: [100 %]
# virsh dumpxml rhel --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
  <nvram template="/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd">/var/lib/libvirt/qemu/nvram/rhel_VARS.fd</nvram>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
4. Migrate backe to the source host.
# virsh migrate rhel qemu+ssh://[source_host]/system --live --verbose --p2p
Migration: [100 %]
# virsh dumpxml rhel --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
  <nvram template="/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd">/var/lib/libvirt/qemu/nvram/rhel_VARS.fd</nvram>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
5. Destroy the guest and check.
# virsh destroy rhel
Domain 'rhel' destroyed
# virsh dumpxml rhel --xpath //os
<os firmware="efi">
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <firmware>
    <feature enabled="yes" name="enrolled-keys"/>
    <feature enabled="yes" name="secure-boot"/>
  </firmware>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>

S2: Migration guest with secure boot disabled.
Repeat the S1 steps but with the following os xml:
<os firmware="efi">
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <firmware>
    <feature enabled="no" name="enrolled-keys"/>
    <feature enabled="yes" name="secure-boot"/>
  </firmware>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>

S3: Cross migration
Source:
libvirt-9.0.0-10.1.el9_2.x86_64
qemu-kvm-7.2.0-14.el9_2.x86_64

Target:
libvirt-8.0.0-5.6.module+el8.6.0+17751+d6559882.x86_64
qemu-kvm-6.2.0-11.module+el8.6.0+17576+33ee06a8.7.x86_64

1. Prepare a running guest with the following os xml:
# virsh dumpxml rhel --inactive --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel8.6.0">hvm</type>
  <firmware>
    <feature enabled="yes" name="enrolled-keys"/>
    <feature enabled="yes" name="secure-boot"/>
  </firmware>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
2. Migrate to the target host.
# virsh migrate rhel qemu+ssh://[target_host]/system --live --verbose --p2p
Migration: [100 %]
# virsh dumpxml rhel | grep /os -B7
  <os>
    <type arch='x86_64' machine='pc-q35-rhel8.6.0'>hvm</type>
    <loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
    <nvram template='/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd'>/var/lib/libvirt/qemu/nvram/rhel_VARS.fd</nvram>
    <boot dev='hd'/>
    <bootmenu enable='yes' timeout='6000'/>
    <bios useserial='yes' rebootTimeout='3000'/>
  </os>
3. Migrate back to the source host.
# virsh migrate rhel qemu+ssh://[source_host]/system --live --verbose --p2p
Migration: [100 %]
# virsh dumpxml rhel --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel8.6.0">hvm</type>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
  <nvram template="/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd">/var/lib/libvirt/qemu/nvram/rhel_VARS.fd</nvram>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>

S4: Save/managedsave the guest with firmware features.
1. Prepare a running guest with the following os xml:
# virsh dumpxml rhel --inactive --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <firmware>
    <feature enabled="yes" name="enrolled-keys"/>
    <feature enabled="yes" name="secure-boot"/>
  </firmware>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
2. Save the guest and then restore.
# virsh save rhel rhel.save
Domain 'rhel' saved to rhel.save
# virsh list --all
 Id   Name             State
---------------------------------
 -    rhel             shut off
# virsh restore rhel.save 
Domain restored from rhel.save
# virsh dumpxml rhel --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
  <nvram template="/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd">/var/lib/libvirt/qemu/nvram/rhel_VARS.fd</nvram>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
3. Managedsave the guest.
# virsh managedsave rhel
Domain 'rhel' state saved by libvirt
# virsh start rhel
Domain 'rhel' started
# virsh dumpxml rhel --xpath //os
<os>
  <type arch="x86_64" machine="pc-q35-rhel9.2.0">hvm</type>
  <loader readonly="yes" secure="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
  <nvram template="/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd">/var/lib/libvirt/qemu/nvram/rhel_VARS.fd</nvram>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>
# virsh dumpxml rhel --inactive --xpath //os
<os firmware="efi">
  <type arch="x86_64" machine="pc-q35-rhel8.6.0">hvm</type>
  <firmware>
    <feature enabled="yes" name="enrolled-keys"/>
    <feature enabled="yes" name="secure-boot"/>
  </firmware>
  <boot dev="hd"/>
  <bootmenu enable="yes" timeout="6000"/>
  <bios useserial="yes" rebootTimeout="3000"/>
</os>

All the test scenarios are expected.

Comment 6 Meina Li 2023-04-18 10:02:27 UTC
Test with all the scenarios in comment 2, the result are expected.

Comment 10 errata-xmlrpc 2023-05-09 11:04:43 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 (libvirt bug fix 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/RHBA-2023:2632


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