This command tells QEMU to start listening for an incoming post-copy
recovery connection. Just like migrate-incoming is used for starting
fresh migration on the destination host.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_monitor.c | 12 ++++++++++++
src/qemu/qemu_monitor.h | 4 ++++
src/qemu/qemu_monitor_json.c | 19 +++++++++++++++++++
src/qemu/qemu_monitor_json.h | 4 ++++
4 files changed, 39 insertions(+)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 589fef4385..5424fdc4fd 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -4568,3 +4568,15 @@ qemuMonitorChangeMemoryRequestedSize(qemuMonitor *mon,
return qemuMonitorJSONChangeMemoryRequestedSize(mon, alias, requestedsize);
}
+
+
+int
+qemuMonitorMigrateRecover(qemuMonitor *mon,
+ const char *uri)
+{
+ VIR_DEBUG("uri=%s", uri);
+
+ QEMU_CHECK_MONITOR(mon);
+
+ return qemuMonitorJSONMigrateRecover(mon, uri);
+}
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 38b65eb950..812f8f4dc2 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -1592,3 +1592,7 @@ int
qemuMonitorChangeMemoryRequestedSize(qemuMonitor *mon,
const char *alias,
unsigned long long requestedsize);
+
+int
+qemuMonitorMigrateRecover(qemuMonitor *mon,
+ const char *uri);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index ea2e001483..44361ae003 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -8988,3 +8988,22 @@ qemuMonitorJSONChangeMemoryRequestedSize(qemuMonitor *mon,
return qemuMonitorJSONSetObjectProperty(mon, path, "requested-size",
&prop);
}
+
+
+int
+qemuMonitorJSONMigrateRecover(qemuMonitor *mon,
+ const char *uri)
+{
+ g_autoptr(virJSONValue) cmd = NULL;
+ g_autoptr(virJSONValue) reply = NULL;
+
+ if (!(cmd = qemuMonitorJSONMakeCommand("migrate-recover",
+ "s:uri", uri,
+ NULL)))
+ return -1;
+
+ if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
+ return -1;
+
+ return qemuMonitorJSONCheckError(cmd, reply);
+}
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index afd100f653..a60c0bfac4 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -874,3 +874,7 @@ int
qemuMonitorJSONChangeMemoryRequestedSize(qemuMonitor *mon,
const char *alias,
unsigned long long requestedsize);
+
+int
+qemuMonitorJSONMigrateRecover(qemuMonitor *mon,
+ const char *uri);
--
2.35.1