aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorZhang Chen <chen.zhang@intel.com>2021-12-31 13:59:34 +0800
committerJuan Quintela <quintela@redhat.com>2022-01-28 15:38:23 +0100
commiteeeb48ee3389e837428370a8ed2772c2e74cce49 (patch)
tree94974f0e73a8bd98db9c3657781ac0af62c80b9e /migration
parent444252b96a63fef6537af0a43665905b48816927 (diff)
migration/migration.c: Avoid COLO boot in postcopy migration
COLO dose not support postcopy migration and remove the Fixme. Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 2afa77da03..5b2e3c66d1 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3230,7 +3230,11 @@ static void migration_completion(MigrationState *s)
goto fail_invalidate;
}
- if (!migrate_colo_enabled()) {
+ if (migrate_colo_enabled() && s->state == MIGRATION_STATUS_ACTIVE) {
+ /* COLO does not support postcopy */
+ migrate_set_state(&s->state, MIGRATION_STATUS_ACTIVE,
+ MIGRATION_STATUS_COLO);
+ } else {
migrate_set_state(&s->state, current_active_state,
MIGRATION_STATUS_COMPLETED);
}
@@ -3621,10 +3625,6 @@ static void migration_iteration_finish(MigrationState *s)
"COLO enabled", __func__);
}
migrate_start_colo_process(s);
- /*
- * Fixme: we will run VM in COLO no matter its old running state.
- * After exited COLO, we will keep running.
- */
/* Fallthrough */
case MIGRATION_STATUS_ACTIVE:
/*