[libvirt PATCH v3 00/10] external snapshot revert fixes

Pavel Hrdina posted 10 patches 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1695043512.git.phrdina@redhat.com
NEWS.rst                                      |   8 +
docs/formatcaps.rst                           |   7 +
src/conf/capabilities.c                       |   1 +
src/conf/capabilities.h                       |   1 +
src/conf/schemas/capability.rng               |   5 +
src/qemu/qemu_capabilities.c                  |   1 +
src/qemu/qemu_process.c                       |  95 +++++++++
src/qemu/qemu_process.h                       |  13 ++
src/qemu/qemu_saveimage.c                     | 189 +++++++++++-------
src/qemu/qemu_saveimage.h                     |  15 ++
src/qemu/qemu_snapshot.c                      |  91 ++++++---
.../qemucaps2xmloutdata/caps.aarch64+hvf.xml  |   1 +
tests/qemucaps2xmloutdata/caps.aarch64.xml    |   1 +
tests/qemucaps2xmloutdata/caps.ppc.xml        |   1 +
tests/qemucaps2xmloutdata/caps.ppc64.xml      |   1 +
tests/qemucaps2xmloutdata/caps.riscv64.xml    |   1 +
tests/qemucaps2xmloutdata/caps.s390x.xml      |   1 +
tests/qemucaps2xmloutdata/caps.sparc.xml      |   1 +
tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml |   1 +
tests/qemucaps2xmloutdata/caps.x86_64.xml     |   1 +
20 files changed, 328 insertions(+), 107 deletions(-)
[libvirt PATCH v3 00/10] external snapshot revert fixes
Posted by Pavel Hrdina 5 months, 1 week ago
This fixes reverting external snapshots to not error out in cases where
it should work and makes it correctly load the memory state when
reverting to snapshot of running VM.

This discards v2 completely and makes changes to v1:

    - moves qemuSaveImageStartProcess to qemu_process as
      qemuProcessStartWithMemoryState

    - change it to use cookie from memory state file instead of
      using cookie from snapshot xml

    - comments improvements

    - introduces new helpers to start and stop decompression process

    - reintroduces <externalSnapshot/> capability

Pavel Hrdina (10):
  qemu_saveimage: extract starting process to qemuSaveImageStartProcess
  qemu_saveimage: introduce helpers to decompress memory state file
  qemu_saveimage: move qemuSaveImageStartProcess to qemu_process
  qemuProcessStartWithMemoryState: allow setting reason for audit log
  qemuProcessStartWithMemoryState: add snapshot argument
  qemuProcessStartWithMemoryState: make it possible to use without data
  qemu_snapshot: fix reverting external snapshot when not all disks are
    included
  qemu_snapshot: correctly load the saved memory state file
  capabilities: report full external snapshot support
  NEWS: document support for reverting external snapshots

 NEWS.rst                                      |   8 +
 docs/formatcaps.rst                           |   7 +
 src/conf/capabilities.c                       |   1 +
 src/conf/capabilities.h                       |   1 +
 src/conf/schemas/capability.rng               |   5 +
 src/qemu/qemu_capabilities.c                  |   1 +
 src/qemu/qemu_process.c                       |  95 +++++++++
 src/qemu/qemu_process.h                       |  13 ++
 src/qemu/qemu_saveimage.c                     | 189 +++++++++++-------
 src/qemu/qemu_saveimage.h                     |  15 ++
 src/qemu/qemu_snapshot.c                      |  91 ++++++---
 .../qemucaps2xmloutdata/caps.aarch64+hvf.xml  |   1 +
 tests/qemucaps2xmloutdata/caps.aarch64.xml    |   1 +
 tests/qemucaps2xmloutdata/caps.ppc.xml        |   1 +
 tests/qemucaps2xmloutdata/caps.ppc64.xml      |   1 +
 tests/qemucaps2xmloutdata/caps.riscv64.xml    |   1 +
 tests/qemucaps2xmloutdata/caps.s390x.xml      |   1 +
 tests/qemucaps2xmloutdata/caps.sparc.xml      |   1 +
 tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml |   1 +
 tests/qemucaps2xmloutdata/caps.x86_64.xml     |   1 +
 20 files changed, 328 insertions(+), 107 deletions(-)

-- 
2.41.0
Re: [libvirt PATCH v3 00/10] external snapshot revert fixes
Posted by Peter Krempa 5 months ago
On Mon, Sep 18, 2023 at 15:29:17 +0200, Pavel Hrdina wrote:
> This fixes reverting external snapshots to not error out in cases where
> it should work and makes it correctly load the memory state when
> reverting to snapshot of running VM.
> 
> This discards v2 completely and makes changes to v1:
> 
>     - moves qemuSaveImageStartProcess to qemu_process as
>       qemuProcessStartWithMemoryState
> 
>     - change it to use cookie from memory state file instead of
>       using cookie from snapshot xml
> 
>     - comments improvements
> 
>     - introduces new helpers to start and stop decompression process
> 
>     - reintroduces <externalSnapshot/> capability
> 
> Pavel Hrdina (10):
>   qemu_saveimage: extract starting process to qemuSaveImageStartProcess
>   qemu_saveimage: introduce helpers to decompress memory state file
>   qemu_saveimage: move qemuSaveImageStartProcess to qemu_process
>   qemuProcessStartWithMemoryState: allow setting reason for audit log
>   qemuProcessStartWithMemoryState: add snapshot argument
>   qemuProcessStartWithMemoryState: make it possible to use without data
>   qemu_snapshot: fix reverting external snapshot when not all disks are
>     included
>   qemu_snapshot: correctly load the saved memory state file
>   capabilities: report full external snapshot support
>   NEWS: document support for reverting external snapshots

Reviewed-by: Peter Krempa <pkrempa@redhat.com>