mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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=1224053 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
50a9d0e67d
commit
f833c70b85
@ -17812,6 +17812,12 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
||||
* because we need vm->privateData which need
|
||||
* virDomainLiveConfigHelperMethod to do so. */
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user