On Wed, Jun 10, 2020 at 20:24:31 +0200, Jiri Denemark wrote:
The same functionality can be achieved using migrate-set-parameters
QMP
command with xbzrle-cache-size parameter.
https://bugzilla.redhat.com/show_bug.cgi?id=1845012
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_driver.c | 26 +++++++++++++++++++++-----
src/qemu/qemu_migration_params.c | 3 +--
2 files changed, 22 insertions(+), 7 deletions(-)
[...]
@@ -14053,13 +14055,27 @@
qemuDomainMigrateSetCompressionCache(virDomainPtr dom,
goto endjob;
}
- qemuDomainObjEnterMonitor(driver, vm);
-
VIR_DEBUG("Setting compression cache to %llu B", cacheSize);
- ret = qemuMonitorSetMigrationCacheSize(priv->mon, cacheSize);
+ if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_PARAM_CACHE_SIZE)) {
Since QEMU_CAPS_MIGRATION_PARAM_CACHE_SIZE is relevant to XBZRLE only,
including the fact that the field in the migration parameters is called
'xbzrle-cache-size' the XBZRLE part should be also part of the
capability and it's status XML string.
[...]
+ if (qemuMigrationParamsSetULL(migParams,
+ QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE,
+ cacheSize) < 0)
+ goto endjob;