aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-02-19 11:40:28 +0000
committerJuan Quintela <quintela@redhat.com>2015-03-16 14:31:07 +0100
commitbf1ae1f4dc348650fb7f32a3fcc278f60a7b1bf6 (patch)
tree36fd42db2a0c2599d7cc018e5143e03519c3aee3 /hmp.c
parentadde220a93a0192782243d25580a647004f6dd44 (diff)
Add migrate_incoming
Add migrate_incoming/migrate-incoming to start an incoming migration. Once a qemu has been started with -incoming defer the migration can be started by issuing: migrate_incoming uri Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 71c28bc816..f6cde86b93 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1116,6 +1116,20 @@ void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
qmp_migrate_cancel(NULL);
}
+void hmp_migrate_incoming(Monitor *mon, const QDict *qdict)
+{
+ Error *err = NULL;
+ const char *uri = qdict_get_str(qdict, "uri");
+
+ qmp_migrate_incoming(uri, &err);
+
+ if (err) {
+ monitor_printf(mon, "%s\n", error_get_pretty(err));
+ error_free(err);
+ return;
+ }
+}
+
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict)
{
double value = qdict_get_double(qdict, "value");