提交 f833c70b 编写于 作者: M Martin Kletzander

qemu: Check for qemu capability when calling virDomainGetBlockIoTune()

When getting block device I/O tuning data there is no check for whether
QEMU supports such options and the call fails on
qemuMonitorGetBlockIoThrottle() when getting the particular throttle
data.  So try reporting a better error when blkdeviotune is not
supported.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1224053Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 50a9d0e6
...@@ -17812,6 +17812,12 @@ qemuDomainGetBlockIoTune(virDomainPtr dom, ...@@ -17812,6 +17812,12 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
* because we need vm->privateData which need * because we need vm->privateData which need
* virDomainLiveConfigHelperMethod to do so. */ * virDomainLiveConfigHelperMethod to do so. */
priv = vm->privateData; priv = vm->privateData;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DRIVE_IOTUNE)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("block I/O throttling not supported with this "
"QEMU binary"));
goto endjob;
}
supportMaxOptions = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DRIVE_IOTUNE_MAX); supportMaxOptions = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DRIVE_IOTUNE_MAX);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册