[libvirt] [PATCH 0/4] Preparation for external live snapshot

Eric Blake eblake at redhat.com
Sat Aug 18 02:08:42 UTC 2012


I've determined that it is possible to mix migration to file
with disk snapshots on existing qemu 1.1 in such a way to
take a live system checkpoint snapshot of a system without
the downtime of either 'virsh snapshot-create' or 'virsh save';
without the loss in disk state of 'virsh save'; and without
the fsck penalties of 'virsh snapshot-create --disk-only';
basically by combining the best of those three approaches.

I'm also quite tired of 'virsh snapshot-create --disk-only'
failing for an offline domain, and have upcoming patches to
drive qemu-img to do that for an offline image.

Unfortunately, qemu 1.2 missed out on adding the 'drive-mirror'
or 'block-commit' commands, so I still can't do quite everything
I want with snapshots (in particular, I can't preserve the
original filename; although you can do a snapshot/blockpull/snapshot
to get back to the original filename with twice the work).  But
I think this series still leaves room for future enhancements
as future qemu provides the means.

Although I'm still in the middle of polishing the src/qemu patches,
I'd at least like to post this series of prep-work to document
how I plan to expose it all, and to make sure my design
decisions are on track.  The first three can be applied now,
the fourth should probably not be applied until I actually have
later patches using the new XML, hopefully still in time for 0.10.0.

Eric Blake (4):
  snapshot: make virDomainSnapshotObjList opaque
  snapshot: split snapshot conf code into own file
  snapshot: rename an enum
  snapshot: new XML for external system checkpoint

 docs/formatsnapshot.html.in                        |   11 +
 docs/schemas/domainsnapshot.rng                    |   23 +
 po/POTFILES.in                                     |    1 +
 src/Makefile.am                                    |    3 +-
 src/conf/domain_conf.c                             |  933 +-----------------
 src/conf/domain_conf.h                             |  143 +--
 src/conf/snapshot_conf.c                           | 1021 ++++++++++++++++++++
 src/conf/snapshot_conf.h                           |  160 +++
 src/esx/esx_driver.c                               |    1 +
 src/libvirt_private.syms                           |    5 +-
 src/qemu/qemu_command.c                            |    1 +
 src/qemu/qemu_domain.c                             |    7 +-
 src/qemu/qemu_domain.h                             |    3 +-
 src/qemu/qemu_driver.c                             |   69 +-
 src/qemu/qemu_migration.c                          |    2 +-
 src/vbox/vbox_tmpl.c                               |    1 +
 tests/domainsnapshotxml2xmlin/external_vm.xml      |   10 +
 tests/domainsnapshotxml2xmlin/noparent.xml         |    9 +
 tests/domainsnapshotxml2xmlout/all_parameters.xml  |    1 +
 tests/domainsnapshotxml2xmlout/disk_snapshot.xml   |    1 +
 tests/domainsnapshotxml2xmlout/external_vm.xml     |   43 +
 tests/domainsnapshotxml2xmlout/full_domain.xml     |    1 +
 tests/domainsnapshotxml2xmlout/metadata.xml        |    1 +
 tests/domainsnapshotxml2xmlout/noparent.xml        |    1 +
 .../noparent_nodescription.xml                     |    1 +
 .../noparent_nodescription_noactive.xml            |    1 +
 tests/domainsnapshotxml2xmltest.c                  |    1 +
 27 files changed, 1365 insertions(+), 1089 deletions(-)
 create mode 100644 src/conf/snapshot_conf.c
 create mode 100644 src/conf/snapshot_conf.h
 create mode 100644 tests/domainsnapshotxml2xmlin/external_vm.xml
 create mode 100644 tests/domainsnapshotxml2xmlin/noparent.xml
 create mode 100644 tests/domainsnapshotxml2xmlout/external_vm.xml

-- 
1.7.11.2




More information about the libvir-list mailing list