qemu: Add support for return-path migration capability

When return-path is enabled, QEMU on the source host won't report
completed migration until the destination QEMU sends a confirmation it
successfully loaded all data. Libvirt would detect such situation in the
Finish phase and report the error read from QEMU's stderr back to the
source, but using return-path could give use a bit better error
reporting with an earlier restart of vCPUs on the source.

The capability is only enabled when the connection between QEMU
processes on the source and destination hosts is bidirectional. In other
words, only when VIR_MIGRATE_TUNNELLED is not set, because our tunnel
only allows one-way communication from the source to the destination.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Jiri Denemark 2021-12-08 16:19:26 +01:00
parent 4f9f3c5d13
commit 877d1c2478
2 changed files with 7 additions and 0 deletions

View File

@ -95,6 +95,7 @@ VIR_ENUM_IMPL(qemuMigrationCapability,
"late-block-activate", "late-block-activate",
"multifd", "multifd",
"dirty-bitmaps", "dirty-bitmaps",
"return-path",
); );
@ -171,6 +172,11 @@ static const qemuMigrationParamsFlagMapItem qemuMigrationParamsFlagMap[] = {
VIR_MIGRATE_PARALLEL, VIR_MIGRATE_PARALLEL,
QEMU_MIGRATION_CAP_MULTIFD, QEMU_MIGRATION_CAP_MULTIFD,
QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION}, QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
{QEMU_MIGRATION_FLAG_FORBIDDEN,
VIR_MIGRATE_TUNNELLED,
QEMU_MIGRATION_CAP_RETURN_PATH,
QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
}; };
/* Translation from VIR_MIGRATE_PARAM_* typed parameters to /* Translation from VIR_MIGRATE_PARAM_* typed parameters to

View File

@ -40,6 +40,7 @@ typedef enum {
QEMU_MIGRATION_CAP_LATE_BLOCK_ACTIVATE, QEMU_MIGRATION_CAP_LATE_BLOCK_ACTIVATE,
QEMU_MIGRATION_CAP_MULTIFD, QEMU_MIGRATION_CAP_MULTIFD,
QEMU_MIGRATION_CAP_BLOCK_DIRTY_BITMAPS, QEMU_MIGRATION_CAP_BLOCK_DIRTY_BITMAPS,
QEMU_MIGRATION_CAP_RETURN_PATH,
QEMU_MIGRATION_CAP_LAST QEMU_MIGRATION_CAP_LAST
} qemuMigrationCapability; } qemuMigrationCapability;