4 * Copyright IBM, Corp. 2008
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #include "qemu-common.h"
15 #include "migration.h"
18 /* Migration speed throttling */
19 static uint32_t max_throttle = (32 << 20);
21 static MigrationState *current_migration;
23 void qemu_start_incoming_migration(const char *uri)
25 fprintf(stderr, "unknown migration protocol: %s\n", uri);
28 void do_migrate(int detach, const char *uri)
30 term_printf("unknown migration protocol: %s\n", uri);
33 void do_migrate_cancel(void)
35 MigrationState *s = current_migration;
41 void do_migrate_set_speed(const char *value)
46 d = strtod(value, &ptr);
58 max_throttle = (uint32_t)d;
61 void do_info_migrate(void)
63 MigrationState *s = current_migration;
66 term_printf("Migration status: ");
67 switch (s->get_status(s)) {
68 case MIG_STATE_ACTIVE:
69 term_printf("active\n");
71 case MIG_STATE_COMPLETED:
72 term_printf("completed\n");
75 term_printf("failed\n");
77 case MIG_STATE_CANCELLED:
78 term_printf("cancelled\n");