[PATCH v2 00/15] qemu: migrate block bitmaps when migrating storage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When we are copying storage we should also preserve the block dirty
bitmaps. This series implements their migration.

For standard migration with shared storage we let qemu flush the bitmaps
to disk and reload them on destination. There is possibility to migrate
them using the migration stream too but it's not implemented in this
series.

v2:
 Patches from v1:
   - patches 4-7 from v1 were pushed already
   - patch 8 from v1 was dropped

 This version:
   - patch 1 was updated to capture the latest capabilities
   - patch 4 is new, replaces patch 8 from v1
   - all other patches apply review feedback from Jirka
   - patch 14 has one additional change (thus I didn't carry Jirka's R-b):
       The migration of bitmaps is enabled based on
       QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING instead of
       QEMU_CAPS_INCREMENTAL_BACKUP.

Peter Krempa (15):
  qemucapabilitiesdata: Update test data for qemu-6.0 on x86_64
  qemu: capabilities: Introduce
    QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
  qemu: Probe whether an image is 'qcow2 v2' from
    query-named-block-nodes
  qemu: migration: Create qcow2 v3 images for
    VIR_MIGRATE_NON_SHARED_DISK
  qemu: monitor: Introduce qemuMonitorBitmapRemove
  qemu: blockjob: Use qemuMonitorBitmapRemove for single bitmap removal
  qemu: migration_params: Add infrastructure for 'dirty-bitmaps'
    migration feature
  qemu: migration_cookie: Add XML handling for setting up bitmap
    migration
  qemu: migration_cookie: Add helpers for transforming the cookie into
    migration params
  qemu: domain: Store list of temporary bitmaps for migration in status
    XML
  tests: qemustatusxml2xml: Add status XML from migration with bitmaps
  tests: qemumigrationcookie: Add testing for block dirty bitmap
    migration
  qemu: migration: Clean up temporary bitmaps when cancelling a
    migration
  qemu: migration: Migrate block dirty bitmaps corresponding to
    checkpoints
  qemu: capabilities: Enable QEMU_CAPS_INCREMENTAL_BACKUP

 src/qemu/qemu_blockjob.c                      |  24 +-
 src/qemu/qemu_capabilities.c                  |   9 +-
 src/qemu/qemu_capabilities.h                  |   1 +
 src/qemu/qemu_domain.c                        |  87 +-
 src/qemu/qemu_domain.h                        |  15 +
 src/qemu/qemu_migration.c                     | 369 ++++++++-
 src/qemu/qemu_migration_cookie.c              | 261 ++++++
 src/qemu/qemu_migration_cookie.h              |  42 +
 src/qemu/qemu_migration_params.c              |  29 +
 src/qemu/qemu_migration_params.h              |   5 +
 src/qemu/qemu_monitor.c                       |  13 +
 src/qemu/qemu_monitor.h                       |   8 +
 src/qemu/qemu_monitor_json.c                  |  35 +
 src/qemu/qemu_monitor_json.h                  |   6 +
 tests/meson.build                             |   2 +-
 tests/qemublocktest.c                         |   2 +
 tests/qemublocktestdata/bitmap/synthetic.json |   2 +-
 tests/qemublocktestdata/bitmap/synthetic.out  |   1 +
 .../caps_6.0.0.x86_64.replies                 | 741 ++++++++++--------
 .../caps_6.0.0.x86_64.xml                     |  23 +-
 .../nbd-bitmaps-xml2xml-in.xml                |  52 ++
 .../nbd-bitmaps-xml2xml-migparams.json        |  25 +
 .../nbd-bitmaps-xml2xml-out.xml               |  51 ++
 tests/qemumigrationcookiexmltest.c            | 166 +++-
 tests/qemumonitorjsontest.c                   |   2 +
 .../migration-out-nbd-bitmaps-in.xml          | 574 ++++++++++++++
 .../migration-out-nbd-bitmaps-out.xml         |   1 +
 tests/qemustatusxml2xmltest.c                 |   1 +
 28 files changed, 2172 insertions(+), 375 deletions(-)
 create mode 100644 tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-in.xml
 create mode 100644 tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-migparams.json
 create mode 100644 tests/qemumigrationcookiexmldata/nbd-bitmaps-xml2xml-out.xml
 create mode 100644 tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml
 create mode 120000 tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-out.xml

-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux