Disable creation of VMs with EFI firmware (aka Snapshots > EFI)
Once upon a time we were very excited about introducing EFI support in GNOME Boxes. It seemed like the right thing to do, there was a vocal group of users requesting it. #199 (closed)
Unfortunately, we were not aware at the time of the existing limitations that it would introduce to our user experience. The most critical one is undoubtedly support for snapshots.
Snapshots are one of the top selling features of GNOME Boxes. They allow for reverting a virtual machine guest to a desired state in time, including memory state. This is extremely useful for our users that use VMs for system's development. Oftentimes they will perform tasks which can leave their guests in a broken state, and snapshots are here to save them.
Internal snapshots are really a migration to disk, this means that for EFI you might end up trying to migrate to the backing store of the nvram device. Therefore libvirt will scream: "Operation not supported: internal snapshots of a VM with pflash based firmware are not supported".
External snapshots can handle EFI. Except they don't. :) External snapshots partially work for EFI guests. They can store the EFI state in the memory image but we can't revert the guest to a given snapshot. ¯_(ツ)_/¯
In the words of one of the libvirt developers "there was no time to do it because of seemingly shinier features".
In my personal quest to workaround this issue, I attempted to use internal snapshots storing DISK_ONLY content. No memory. That's already a feature regression for us, but what can we do, right? Everybody seems to want UEFI! It turns out that once you create an internal snapshot with the DISK_ONLY flag, your snapshots become external. So yep, no reverting.
All in all, I don't have a way to end this saga in a high note. We are going to stop creating guests with EFI in the 3.36.x series, and for 3.38 we will only create EFI guests for those operating systems that libosinfo reports to support ONLY EFI. These guests need EFI to boot, so in this case they won't have snapshots. For the great majority of OSes that support BIOS, snapshots will continue to exist and make our lives easier. The end.
Signed-off-by: Felipe Borges firstname.lastname@example.org