Signed-off-by: Claudio Fontana <cfontana(a)suse.de>
---
src/qemu/qemu_saveimage.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index 96330430e5..669e6eb97f 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -798,6 +798,23 @@ int qemuSaveImageLoadMultiFd(virConnectPtr conn, virDomainObj *vm,
int oflags,
QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS,
nchannels) < 0)
goto cleanup;
+ if (virQEMUCapsGet(priv->qemuCaps,
QEMU_CAPS_MIGRATION_PARAM_MULTIFD_COMPRESSION)) {
+ const char *pcomp =
qemuSaveMultiFdCompTypeToString(data->header.multifd_comp);
+ if (!pcomp) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+ _("libvirt does not support parallel compression type
%u"),
+ data->header.multifd_comp);
+ goto cleanup;
+ }
+ if (qemuMigrationParamsSetString(migParams,
+ QEMU_MIGRATION_PARAM_MULTIFD_COMPRESSION,
+ pcomp) < 0)
+ goto cleanup;
+ } else if (data->header.multifd_comp != QEMU_SAVE_MULTIFD_COMP_NONE) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("QEMU does not seem to support multifd
compression"));
+ goto cleanup;
+ }
if (qemuMigrationParamsApply(driver, vm, asyncJob, migParams) < 0)
goto cleanup;
--
2.35.3