aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--migration/migration.c11
-rw-r--r--qapi/migration.json17
2 files changed, 28 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index ef84d2c1fb..90bfdc3a7c 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1374,6 +1374,17 @@ void qmp_migrate_cancel(Error **errp)
migrate_fd_cancel(migrate_get_current());
}
+void qmp_migrate_continue(MigrationStatus state, Error **errp)
+{
+ MigrationState *s = migrate_get_current();
+ if (s->state != state) {
+ error_setg(errp, "Migration not in expected state: %s",
+ MigrationStatus_str(s->state));
+ return;
+ }
+ qemu_sem_post(&s->pause_sem);
+}
+
void qmp_migrate_set_cache_size(int64_t value, Error **errp)
{
MigrationState *s = migrate_get_current();
diff --git a/qapi/migration.json b/qapi/migration.json
index b56f95db64..272f191551 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -877,6 +877,23 @@
{ 'command': 'migrate_cancel' }
##
+# @migrate-continue:
+#
+# Continue migration when it's in a paused state.
+#
+# @state: The state the migration is currently expected to be in
+#
+# Returns: nothing on success
+# Since: 2.11
+# Example:
+#
+# -> { "execute": "migrate-continue" , "arguments":
+# { "state": "pre-switchover" } }
+# <- { "return": {} }
+##
+{ 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
+
+##
# @migrate_set_downtime:
#
# Set maximum tolerated downtime for migration.