[PATCH 00/11] qemu: switch to modern QEMU's snapshot-* API for

Nikolay Shirokovskiy posted 11 patches 2 years ago
Failed in applying to current master (apply log)
src/conf/snapshot_conf.c                      |  13 +
src/conf/snapshot_conf.h                      |   1 +
src/hypervisor/domain_job.c                   |   1 +
src/hypervisor/domain_job.h                   |   1 +
src/qemu/qemu_capabilities.c                  |   2 +
src/qemu/qemu_capabilities.h                  |   1 +
src/qemu/qemu_domain.c                        | 241 +-------
src/qemu/qemu_domain.h                        |  19 -
src/qemu/qemu_domainjob.c                     |   2 +
src/qemu/qemu_driver.c                        |  14 +-
src/qemu/qemu_migration.c                     |   2 +
src/qemu/qemu_monitor.c                       |  56 ++
src/qemu/qemu_monitor.h                       |  26 +
src/qemu/qemu_monitor_json.c                  | 106 ++++
src/qemu/qemu_monitor_json.h                  |  23 +
src/qemu/qemu_process.c                       |  22 +-
src/qemu/qemu_snapshot.c                      | 583 +++++++++++++++++-
src/qemu/qemu_snapshot.h                      |  10 +
.../caps_6.0.0.aarch64.xml                    |   1 +
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml |   1 +
.../caps_6.0.0.x86_64.xml                     |   1 +
.../caps_6.1.0.x86_64.xml                     |   1 +
.../caps_6.2.0.aarch64.xml                    |   1 +
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |   1 +
.../caps_6.2.0.x86_64.xml                     |   1 +
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |   1 +
.../caps_7.0.0.x86_64.xml                     |   1 +
27 files changed, 844 insertions(+), 288 deletions(-)
[PATCH 00/11] qemu: switch to modern QEMU's snapshot-* API for
Posted by Nikolay Shirokovskiy 2 years ago
This series applied on top of [1].

In this series I still use old API to load snapshot if snapshot was done
using old API. The thing is snapshot-load require "vmstate" parameter to
be set. And with old snapshot the disk which holds vmstate is not known
to libvirt. This is unfortunate as we will need to use old API for
a long time even after we drop support for QEMU older then 6.0 (where
snapshot-* API is introduced). I guess the best will be to allow
omiting "vmstate" for snapshot-load and thus falling back to default
disk for vmstate.

The code for recovering on libvirtd crash/restart is missing. I'll work on
it too if the overall approach is accepted.

[PATCH v2 REBASE 0/3] qemu: don't pause VM when creating internal snapshot
https://listman.redhat.com/archives/libvir-list/2022-March/229719.html

Nikolay Shirokovskiy (11):
  qemu: add QEMU_CAPS_SNAPSHOT_SAVE capability
  qemu: add monitor commands to snapshot-{save, load, delete}
  qemu: move snapshot related funcs from domain.c to snapshot.c
  qemu: introduce QEMU_ASYNC_JOB_SNAPSHOT_DELETE
  qemu: snapshot: prepare for async snapshot deletion
  conf: add memory state disk for internal snapshots
  qemu: check internal snaphshot memory disk
  qemu: add snapshot job types to qemuMonitorJobType
  qemu: use snapshot-save for modern qemu to create snapshot
  qemu: use snapshot-load for modern QEMU to revert to snapshot
  qemu: use snapshot-delete for modern QEMU to delete snapshot

 src/conf/snapshot_conf.c                      |  13 +
 src/conf/snapshot_conf.h                      |   1 +
 src/hypervisor/domain_job.c                   |   1 +
 src/hypervisor/domain_job.h                   |   1 +
 src/qemu/qemu_capabilities.c                  |   2 +
 src/qemu/qemu_capabilities.h                  |   1 +
 src/qemu/qemu_domain.c                        | 241 +-------
 src/qemu/qemu_domain.h                        |  19 -
 src/qemu/qemu_domainjob.c                     |   2 +
 src/qemu/qemu_driver.c                        |  14 +-
 src/qemu/qemu_migration.c                     |   2 +
 src/qemu/qemu_monitor.c                       |  56 ++
 src/qemu/qemu_monitor.h                       |  26 +
 src/qemu/qemu_monitor_json.c                  | 106 ++++
 src/qemu/qemu_monitor_json.h                  |  23 +
 src/qemu/qemu_process.c                       |  22 +-
 src/qemu/qemu_snapshot.c                      | 583 +++++++++++++++++-
 src/qemu/qemu_snapshot.h                      |  10 +
 .../caps_6.0.0.aarch64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_6.0.0.s390x.xml |   1 +
 .../caps_6.0.0.x86_64.xml                     |   1 +
 .../caps_6.1.0.x86_64.xml                     |   1 +
 .../caps_6.2.0.aarch64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |   1 +
 .../caps_6.2.0.x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |   1 +
 .../caps_7.0.0.x86_64.xml                     |   1 +
 27 files changed, 844 insertions(+), 288 deletions(-)

-- 
2.35.1