Bug 2128504

Summary: The ability to save KVM snapshots does not work if KVM is configured with UEFI.
Product: Red Hat Enterprise Linux 8 Reporter: Robert McSwain <rmcswain>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: coli, jsuchane, virt-maint, xuwei
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 08:38:30 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:

Description Robert McSwain 2022-09-20 19:17:31 UTC
Release: RHEL 8, all

Upstream Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1881850

Description of problem: Error message when invoking the creation of a snapshot while secure loader with UEFI is enabled.

How reproducible:

Those combinations are allowed in an XML file while the host is an EFI systen, at the state of creation of a VM in virt-manager:

option 1:
<os>
  <type arch="x86_64" machine="q35">hvm</type>
  <boot dev="hd"/>
  <loader secure="yes"/>
</os>

option 2:
<os>
  <type arch="x86_64" machine="q35">hvm</type>
  <loader readonly="yes" type="pflash" secure="yes">/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
  <boot dev="hd"/>
</os>

option 3:
<os>
  <type arch="x86_64" machine="q35">hvm</type>
  <loader readonly="yes" type="pflash" secure="yes">/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
  <boot dev="hd"/>
</os>

Option 1 is allowed.

Steps to Reproduce:
1. Set either option 2 or 3;
2. Attempt a creation a snapshot.

Actual results:

<os>
  <type arch="x86_64" machine="pc-q35-4.2">hvm</type>
  <loader readonly="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
  <nvram>/var/lib/libvirt/qemu/nvram/fedora32_VARS.fd</nvram>
  <boot dev="hd"/>
</os>

Message error through virt-manager:

"Error creating snapshot: Operation not supported: internal snapshots of a VM with pflash based firmware are not supported

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/details/snapshots.py", line 239, in _do_create_snapshot
    self.vm.create_snapshot(xml)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1057, in create_snapshot
    self._backend.snapshotCreateXML(xml, flags)
  File "/usr/lib64/python3.8/site-packages/libvirt.py", line 2801, in snapshotCreateXML
    if ret is None:raise libvirtError('virDomainSnapshotCreateXML() failed', dom=self)
libvirt.libvirtError: Operation not supported: internal snapshots of a VM with pflash based firmware are not supported"

Expected results: options matching UEFI systems, 2 and 3, to be allowed.


What is the business impact? 
Reduced functionality for users moving to Windows 11 KVM using UEFI.

Comment 2 Jaroslav Suchanek 2022-09-21 08:38:30 UTC

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