one icon indicating copy to clipboard operation
one copied to clipboard

Allow external snapshots because internal snapshots of UEFI VMs are not supported

Open OpenNebulaSupport opened this issue 2 years ago • 4 comments

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 = 1 has 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)

OpenNebulaSupport avatar Nov 23 '23 17:11 OpenNebulaSupport

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.

atodorov-storpool avatar Nov 23 '23 19:11 atodorov-storpool

+1. UEFI is de-facto standard and this is essentially making snapshots useless.

jzvikart avatar Jan 25 '24 16:01 jzvikart

Check support for revert added in this libvirt version https://libvirt.org/news.html#v9-9-0-2023-11-01

rsmontero avatar May 22 '24 10:05 rsmontero