пт, 12 нояб. 2021 г. в 10:39, Peter Krempa <pkrempa@xxxxxxxxxx>:
On Thu, Nov 11, 2021 at 11:55:45 +0300, Nikolay Shirokovskiy wrote:
> Hi, everyone.
>
> The details for instant snapshot are given in main patch "qemu: support
> instant snapshots". Here I only want to mention two moments.
>
> First as instant snapshot API is synchronous we need to add an event
> that snapshot moment in time is passed so that client is free to make
> changes to guest. This way client can make use of instant snapshot while
> memory is still being written to disk.
This is a nice replacement for --live. I had a dummy implementation for
this but I put it aside for the following reasons.
1) It doesn't work with all VM configs.
My original approach wanted to use it as a full replacement for the
snapshot code. That wouldn't work.
Yours uses a new flag which is okay as it sidesteps the issue. (One
detail, docs don't mention the caveat, more on that inline).
2) The format change for instant load
Below you mention that you want to change the image format for instant
load. Introducing the feature now, without the image format change means
that there will be a need for yet another flag switching to the new
format.
I'd strongly suggest you reconsider whether to push this now or just
simply go with the full new format once it's ready in qemu.
Hi, Peter.
Thank you for your review. Ok, let's wait for new format in qemu.
Nikolay
> Second there is work in progress on adding asynchronous revert to
> snapshot [1]. The idea is to write memory during snapshot in such a way
> that it is possible to do a revert to snapshot in background. Namely
> start guest on revert with only minimal amount of memory restored from
> disk and then restore memory in background in postcopy migration
> fashion. In order to make it possible snapshot memory should be written to
> disk not just as plain migration stream. Thus the [1] patch adds
> a special tool to write the migration stream during snapshot.
>
> So if/when patch [1] will be merged I plan to add 'instant revert' mode
> to snapshot too.
>
> [1] [RFC PATCH v2 0/7] migration/snapshot: External snapshot utility
> https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg03619.html
I'll add few review points inline.
Also note that Pavel Hrdina might want to comment too as he is currently
making good progress on making reversion of external snapshots work.