[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/7] migrate: HMP migate_continue
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH 5/7] migrate: HMP migate_continue |
Date: |
Wed, 11 Oct 2017 20:13:15 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
HMP equivalent to the just added migrate-continue
Unpause a migrate paused at a given state.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
hmp-commands.hx | 12 ++++++++++++
hmp.c | 13 +++++++++++++
hmp.h | 1 +
3 files changed, 26 insertions(+)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 1941e19932..4afd57cf5f 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -959,7 +959,19 @@ STEXI
@item migrate_cancel
@findex migrate_cancel
Cancel the current VM migration.
+ETEXI
+ {
+ .name = "migrate_continue",
+ .args_type = "state:s",
+ .params = "state",
+ .help = "Continue migration from the given paused state",
+ .cmd = hmp_migrate_continue,
+ },
+STEXI
address@hidden migrate_continue @var{state}
address@hidden migrate_continue
+Continue migration from the paused state @var{state}
ETEXI
{
diff --git a/hmp.c b/hmp.c
index 739d330f4e..5fd22a6ea8 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1490,6 +1490,19 @@ void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
qmp_migrate_cancel(NULL);
}
+void hmp_migrate_continue(Monitor *mon, const QDict *qdict)
+{
+ Error *err = NULL;
+ const char *state = qdict_get_str(qdict, "state");
+ int val = qapi_enum_parse(&MigrationStatus_lookup, state, -1, &err);
+
+ if (val >= 0) {
+ qmp_migrate_continue(val, &err);
+ }
+
+ hmp_handle_error(mon, &err);
+}
+
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
diff --git a/hmp.h b/hmp.h
index 3605003e4c..a6f56b1f29 100644
--- a/hmp.h
+++ b/hmp.h
@@ -68,6 +68,7 @@ void hmp_savevm(Monitor *mon, const QDict *qdict);
void hmp_delvm(Monitor *mon, const QDict *qdict);
void hmp_info_snapshots(Monitor *mon, const QDict *qdict);
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
+void hmp_migrate_continue(Monitor *mon, const QDict *qdict);
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
--
2.13.6
- [Qemu-devel] [PATCH 0/7] migration: pause-before-device, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 1/7] migration: Add 'pause-before-device' capability, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 2/7] migration: Add 'pause-before-device' and 'device' statuses, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 3/7] migration: Wait for semaphore before completing migration, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 4/7] migration: migrate-continue, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 5/7] migrate: HMP migate_continue,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH 6/7] migration: allow cancel to unpause, Dr. David Alan Gilbert (git), 2017/10/11
- [Qemu-devel] [PATCH 7/7] migration: pause-before-device for postcopy, Dr. David Alan Gilbert (git), 2017/10/11
- Re: [Qemu-devel] [PATCH 0/7] migration: pause-before-device, no-reply, 2017/10/11
- Re: [Qemu-devel] [PATCH 0/7] migration: pause-before-device, Daniel P. Berrange, 2017/10/12
Re: [Qemu-devel] [PATCH 0/7] migration: pause-before-device, Daniel P. Berrange, 2017/10/12