@@ -2333,9 +2333,10 @@ static void migration_completion(MigrationState *s)
goto fail;
}
- if (migrate_colo() && s->state == MIGRATION_STATUS_ACTIVE) {
+ if (migrate_colo()) {
/* COLO does not support postcopy */
- migrate_set_state(&s->state, MIGRATION_STATUS_ACTIVE,
+ assert(s->state != MIGRATION_STATUS_POSTCOPY_ACTIVE);
+ migrate_set_state(&s->state, current_active_state,
MIGRATION_STATUS_COLO);
} else {
migrate_set_state(&s->state, current_active_state,
@@ -445,8 +445,17 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)
error_append_hint(errp, "Please enable replication before COLO.\n");
return false;
}
+#else
+ if (new_caps[MIGRATION_CAPABILITY_X_COLO]) {
+ if (new_caps[MIGRATION_CAPABILITY_POSTCOPY_RAM]) {
+ error_setg(errp, "COLO is not compatible with postcopy");
+ return false;
+ }
+ }
#endif
+
+
if (new_caps[MIGRATION_CAPABILITY_POSTCOPY_RAM]) {
/* This check is reasonably expensive, so only when it's being
* set the first time, also it's only the destination that needs
Signed-off-by: Lukas Straub <lukasstraub2@web.de> --- migration/migration.c | 5 +++-- migration/options.c | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-)