[libvirt] [PATCHv5 00/23] live block migration

Eric Blake eblake at redhat.com
Tue Apr 17 05:05:51 UTC 2012


This series shows how to do live block migration using both
streaming mirror (as proposed for upstream qemu 1.1) and
snapshot+mirror (as proposed for RHEL 6.3, although not as
actively tested, since streaming mirror seems so much nicer).

v4 (blockjob): https://www.redhat.com/archives/libvir-list/2012-April/msg00330.html
v1 (snapshot): https://www.redhat.com/archives/libvir-list/2012-March/msg00578.html

I've hopefully resolved the review comments Jiri gave against v4,
and have tested this against Paolo's proposed builds of qemu for
RHEL 6.3.  Patches 1-14 are ready to apply if qemu commits to
the 'drive-mirror' interface for qemu 1.1.  Patches 15-17 need
a bit more thought to decide if we also want to support partial
streaming support (similar to the optional 'base' argument to
'block-stream') in 'drive-mirror' in qemu 1.2; it might be wiser
to defer these until we know for sure what happens with qemu.

Patches 18-23 are only valid for the RHEL 6.3 build, although
patches 19-23 would be useful if qemu 1.2 enhances 'drive-mirror'
to support snapshot+mirror.

I've tried to give more details in the various commits up to 14,
which are the most important to review for purposes of backporting;
other changes in later patches include fixing a use-after-free bug
in the snapshot+mirror code, and altering patch 18 to match the
difference in what RHEL 6.3 will probably be providing.

Available here as well:
git fetch git://repo.or.cz/libvirt/ericb.git snapshot
http://repo.or.cz/w/libvirt/ericb.git/shortlog/refs/heads/snapshot

I think 1-3 can be applied without controversy, 4-7 can be applied
_if_ we think that the libvirt API is reasonable no matter what
qemu throws at us (and I'm pretty positive that it is, as I have
already been through several rounds of design changes on the qemu
side where the libvirt API still held up without problem), and 8
onwards should be delayed until we have a firm commitment on the
actual qemu 1.1 implementation.

Eric Blake (23):
  virsh: minor syntactic cleanups
  qemu: use consistent error when qemu binary is too old
  blockjob: add virsh blockpull --wait
  blockjob: add new API flags
  blockjob: add 'blockcopy' to virsh
  blockjob: enhance xml to track mirrors across libvirtd restart
  blockjob: react to active block copy
  blockjob: add qemu capabilities related to block jobs
  blockjob: return appropriate event and info
  blockjob: support pivot operation on cancel
  blockjob: implement block copy for qemu
  blockjob: relax block job behavior when setting speed up front
  blockjob: allow for existing files
  blockjob: allow mirroring under SELinux
  blockjob: add virDomainBlockCopy
  blockjob: enhance virsh 'blockcopy'
  blockjob: wire up qemu and RPC for block copy
  blockjob: accommodate RHEL backport names
  snapshot: allow for creation of mirrored snapshots
  snapshot: add new snapshot delete flags
  snapshot: make it possible to check for mirrored snapshot
  snapshot: implement new snapshot delete flags in qemu
  snapshot: enable mirrored snapshots on transient vm

 docs/apibuild.py                                   |    1 +
 docs/formatdomain.html.in                          |   13 +
 docs/formatsnapshot.html.in                        |   31 +
 docs/schemas/domaincommon.rng                      |   24 +-
 docs/schemas/domainsnapshot.rng                    |    8 +
 include/libvirt/libvirt.h.in                       |   50 ++-
 include/libvirt/virterror.h                        |    1 +
 src/conf/domain_conf.c                             |  125 ++++-
 src/conf/domain_conf.h                             |    8 +
 src/driver.h                                       |    5 +
 src/libvirt.c                                      |  268 ++++++++-
 src/libvirt_private.syms                           |    2 +
 src/libvirt_public.syms                            |    5 +
 src/qemu/qemu_capabilities.c                       |    2 +
 src/qemu/qemu_capabilities.h                       |    2 +
 src/qemu/qemu_command.c                            |    2 +-
 src/qemu/qemu_driver.c                             |  624 +++++++++++++++++++-
 src/qemu/qemu_hotplug.c                            |    9 +-
 src/qemu/qemu_monitor.c                            |   56 ++-
 src/qemu/qemu_monitor.h                            |   12 +
 src/qemu/qemu_monitor_json.c                       |   94 +++
 src/qemu/qemu_monitor_json.h                       |   19 +-
 src/remote/remote_driver.c                         |    1 +
 src/remote/remote_protocol.x                       |   12 +-
 src/remote_protocol-structs                        |    9 +
 src/rpc/gendispatch.pl                             |    1 +
 src/util/virterror.c                               |    6 +
 .../disk_snapshot_mirror.xml                       |   13 +
 .../disk_snapshot_mirror.xml                       |   49 ++
 tests/domainsnapshotxml2xmltest.c                  |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-disk-mirror.xml  |   42 ++
 .../qemuxml2xmlout-disk-mirror.xml                 |   40 ++
 tests/qemuxml2xmltest.c                            |   42 +-
 tools/virsh.c                                      |  558 ++++++++++++++----
 tools/virsh.pod                                    |   84 +++-
 35 files changed, 2012 insertions(+), 210 deletions(-)
 create mode 100644 tests/domainsnapshotxml2xmlin/disk_snapshot_mirror.xml
 create mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot_mirror.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml

-- 
1.7.7.6




More information about the libvir-list mailing list