summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2010-06-09 14:10:55 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-22 15:15:51 -0500
commiteea166dd005cc86b46aed81b39ff9ef821c5c78c (patch)
tree4377589c1b26e1c151a0356adaa40f06cb4438b1 /migration.c
parentd1ca85f6b3fda7b66f4104611bad4de4def04c57 (diff)
downloadqemu-eea166dd005cc86b46aed81b39ff9ef821c5c78c.tar.gz
qemu-eea166dd005cc86b46aed81b39ff9ef821c5c78c.tar.bz2
qemu-eea166dd005cc86b46aed81b39ff9ef821c5c78c.zip
Factorize common migration incoming code
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/migration.c b/migration.c
index 85c81e0983..b49964c5e3 100644
--- a/migration.c
+++ b/migration.c
@@ -58,6 +58,19 @@ int qemu_start_incoming_migration(const char *uri)
return ret;
}
+void process_incoming_migration(QEMUFile *f)
+{
+ if (qemu_loadvm_state(f) < 0) {
+ fprintf(stderr, "load of migration failed\n");
+ exit(0);
+ }
+ qemu_announce_self();
+ DPRINTF("successfully loaded vm state\n");
+
+ if (autostart)
+ vm_start();
+}
+
int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
MigrationState *s = NULL;