Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 8 ++++++--
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 2 ++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index e1c67c51ec..30c8dbd954 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -4433,8 +4433,12 @@ qemuMigrationSrcStart(virQEMUDriver *driver,
}
/* log start of migration */
- if ((timestamp = virTimeStringNow()) != NULL)
- qemuDomainLogAppendMessage(driver, vm, "%s: initiating migration\n",
timestamp);
+ if ((timestamp = virTimeStringNow()) != NULL) {
+ if (migrateFlags & QEMU_MONITOR_MIGRATE_RESUME)
+ qemuDomainLogAppendMessage(driver, vm, "%s: resuming migration\n",
timestamp);
+ else
+ qemuDomainLogAppendMessage(driver, vm, "%s: initiating
migration\n", timestamp);
+ }
switch (spec->destType) {
case MIGRATION_DEST_HOST:
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 5949e21a39..38b65eb950 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -907,6 +907,7 @@ typedef enum {
QEMU_MONITOR_MIGRATE_BACKGROUND = 1 << 0,
QEMU_MONITOR_MIGRATE_NON_SHARED_DISK = 1 << 1, /* migration with non-shared
storage with full disk copy */
QEMU_MONITOR_MIGRATE_NON_SHARED_INC = 1 << 2, /* migration with non-shared
storage with incremental copy */
+ QEMU_MONITOR_MIGRATE_RESUME = 1 << 3, /* resume failed post-copy
migration */
QEMU_MONITOR_MIGRATION_FLAGS_LAST
} QEMU_MONITOR_MIGRATE;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index df3fdfe4fb..ea2e001483 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -3419,10 +3419,12 @@ int qemuMonitorJSONMigrate(qemuMonitor *mon,
bool detach = !!(flags & QEMU_MONITOR_MIGRATE_BACKGROUND);
bool blk = !!(flags & QEMU_MONITOR_MIGRATE_NON_SHARED_DISK);
bool inc = !!(flags & QEMU_MONITOR_MIGRATE_NON_SHARED_INC);
+ bool resume = !!(flags & QEMU_MONITOR_MIGRATE_RESUME);
g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("migrate",
"b:detach",
detach,
"b:blk", blk,
"b:inc", inc,
+ "b:resume",
resume,
"s:uri", uri,
NULL);
g_autoptr(virJSONValue) reply = NULL;
--
2.35.1