On Mon, Mar 13, 2023 at 16:42:08 +0100, Pavel Hrdina wrote: > Extract creation of qcow2 files for external snapshots to separate > function as we will need it for external snapshot revert code. Hmm, I don't think I like where this is going. I presume you want to use this code to create the new overlay images. If you want to use this also in cases where the VM was live you might run into scenarios where the qemu-img code will not be able to handle the overlay creation, specifically on networked storage. I think we'll need to create the overlay images as part of the startup of the reverted VM via QMP exactly as we are creating overlays currently for snapshots. Even when today's API will not allow reversion of non-local snapshots (I didn't check further in this series yet) I don't think we should go the way of using qemu-img at all.