vmm: Introduce MigrationMode migration option

Introducing a migration mode to both sides of the migration (send and
receive), so that a user can desribe which way the memory should be
migrated between the source and destination VMs.

For now, we only introduce `precopy` and `postcopy` as viable options,
but we can expect other modes (more optimized) to be added in the
future.

Signed-off-by: Sebastien Boeuf <sboeuf@meta.com>
Assisted-by: Claude:claude-opus-4-8
This commit is contained in:
Sebastien Boeuf
2026-06-19 01:40:41 -07:00
parent 3807dc82de
commit 0d82d16432
2 changed files with 121 additions and 4 deletions

View File

@@ -1515,6 +1515,17 @@ components:
Directory containing the TLS server certificate (server-cert.pem), the TLS
server key (server-key.pem), and the client TLS root CA certificate (ca-cert.pem).
TLS is only supported with tcp:<host>:<port> receiver URLs.
memory_mode:
$ref: "#/components/schemas/MigrationMode"
MigrationMode:
type: string
enum: ["Precopy", "Postcopy"]
default: "Precopy"
description: >
Memory transfer mode. Precopy transfers all guest memory before the
destination resumes. Postcopy resumes the destination first and faults
guest pages in on demand.
TimeoutStrategy:
type: string
@@ -1568,6 +1579,8 @@ components:
Directory containing the TLS root CA certificate (ca-cert.pem), the TLS client
certificate (client-cert.pem), and TLS client key (client-key.pem).
TLS is only supported with tcp:<host>:<port> destination URLs.
memory_mode:
$ref: "#/components/schemas/MigrationMode"
VmAddUserDevice:
required: