Add a migration flag to do not delete qcow2 internal snapshots during live migration with copying non-shared disks
Software environment
- libvirt version: 6.0.0 and above
- Hypervisor and version: QEMU/KVM
Description of problem
Before Libvirt version 6.0.0, when you migrate domain in live mode with copying non-shared disks internal snapshots data was preserved after migration and snapshots can be used. This behavior still working on Libvirt version 5.0.0. Since Libvirt version 6.0.0 (maybe early), internal snapshots data disappeared from disk file and snapshots can't be reverted with the "Failed to load snapshot: Error: Device '' does not have the requested snapshot '700c2978-ddea-484b-9ebe-7bd73d8b6426'" error.
Steps to reproduce
- Create a domain with QCOW2 non-shared disk.
- Create a snapshot.
- Save snapshot XML to file.
- Undefine snapshot.
- Make a live migration with coping disk file.
- Define snapshot from XML from a file.
- Revert snapshot.
Actual result
- on Libvirt version 5.0.0: snapshot successfully reverted.
- on Libvirt version 6.0.0: "Failed to load snapshot: Error: Device '' does not have the requested snapshot '700c2978-ddea-484b-9ebe-7bd73d8b6426'"
Expected result
Option1: Snapshot successfully reverted.
OR
Option2: Add a migration flag to do not delete qcow2 internal snapshots during live migration with copying non-shared disks.
Additional information
When this issue will be resolved it allows to use qcow2 internal snapshots even after live migration as well as for offline migration.