mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
migration: options incompatible with cpr
Fail the migration request if options are set that are incompatible with cpr. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/1708622920-68779-15-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
@@ -1953,6 +1953,23 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (migrate_mode_is_cpr(s)) {
|
||||
const char *conflict = NULL;
|
||||
|
||||
if (migrate_postcopy()) {
|
||||
conflict = "postcopy";
|
||||
} else if (migrate_background_snapshot()) {
|
||||
conflict = "background snapshot";
|
||||
} else if (migrate_colo()) {
|
||||
conflict = "COLO";
|
||||
}
|
||||
|
||||
if (conflict) {
|
||||
error_setg(errp, "Cannot use %s with CPR", conflict);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (blk || blk_inc) {
|
||||
if (migrate_colo()) {
|
||||
error_setg(errp, "No disk migration is required in COLO mode");
|
||||
|
||||
Reference in New Issue
Block a user