qemu_migration: Apply max-postcopy-bandwidth on post-copy resume

When resuming post-copy migration users may want to limit the bandwidth
used by the migration and use a value that is different from the one
specified when the migration was originally started.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/333

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Jiri Denemark
2022-06-30 12:52:38 +02:00
parent 8c335b5530
commit 766abdc291
5 changed files with 42 additions and 22 deletions

View File

@@ -155,7 +155,7 @@ qemuMigParamsTestJSON(const void *opaque)
if (!(migParams = qemuMigrationParamsFromJSON(paramsIn)))
return -1;
if (!(paramsOut = qemuMigrationParamsToJSON(migParams)) ||
if (!(paramsOut = qemuMigrationParamsToJSON(migParams, false)) ||
!(actualJSON = virJSONValueToString(paramsOut, true)))
return -1;