summaryrefslogtreecommitdiff
path: root/migration
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 /migration
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 'migration')
-rw-r--r--migration/migration.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index f3d49d5e8b..2c805f11f5 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -432,6 +432,25 @@ void migrate_del_blocker(Error *reason)
migration_blockers = g_slist_remove(migration_blockers, reason);
}
+void qmp_migrate_incoming(const char *uri, Error **errp)
+{
+ Error *local_err = NULL;
+
+ if (!deferred_incoming) {
+ error_setg(errp, "'-incoming defer' is required for migrate_incoming");
+ return;
+ }
+
+ qemu_start_incoming_migration(uri, &local_err);
+
+ if (local_err) {
+ error_propagate(errp, local_err);
+ return;
+ }
+
+ deferred_incoming = false;
+}
+
void qmp_migrate(const char *uri, bool has_blk, bool blk,
bool has_inc, bool inc, bool has_detach, bool detach,
Error **errp)