Allow external snapshots because internal snapshots of UEFI VMs are not supported
Description Currently opennebula does not allow UEFI VM snapshots. The snapshots being done right now are internal and they are not supported by libvirt.
To Reproduce When a snapshot of a UEFI VM is made, the following error appears
[VMM][I]: error: Operation not supported: internal snapshots of a VM with pflash based firmware are not supported
This should not be happening in datastores with external snapshot logic
Expected behavior
- A snapshot should be created and it should be easy to be reverted
Details
- Affected Component: Snapshots
- Hypervisor: KVM
- Version: 6.8
Additional context
If the VM is UEFI, in src/vmm_mad/remotes/kvm/snapshot_create :
-
dynamic_ownership = 1has to be set in /etc/libvirt/qemu.conf - external snapshots (
snapshot-create-as) should be called with--disk-only
After that, reverting the snapshot is more complicated because the snap has to be deleted and the VM has to go back to the previous image. Using qemu-img directly could be a better approach
Progress Status
- [ ] Code committed
- [ ] Testing - QA
- [ ] Documentation (Release notes - resolved issues, compatibility, known issues)
I am trying to remember where we discussed this, but I believe the UEFI NVRAM (pflash) should be managed and handled by the SYSTEM datastore TM_MAD as volatile storage. Also, IMO, disk-only snapshots should be handled by the SYSTEM TM_MAD, although the responsibility is a bit blurry.
+1. UEFI is de-facto standard and this is essentially making snapshots useless.
Check support for revert added in this libvirt version https://libvirt.org/news.html#v9-9-0-2023-11-01