diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7c0999871e..d111ccd3d4 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17377,13 +17377,6 @@ qemuDomainSetTime(virDomainPtr dom, priv = vm->privateData; - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_RTC_RESET_REINJECTION)) { - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("cannot set time: qemu doesn't support " - "rtc-reset-reinjection command")); - goto cleanup; - } - if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) goto cleanup; @@ -17393,6 +17386,13 @@ qemuDomainSetTime(virDomainPtr dom, goto endjob; } + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_RTC_RESET_REINJECTION)) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("cannot set time: qemu doesn't support " + "rtc-reset-reinjection command")); + goto endjob; + } + if (!qemuDomainAgentAvailable(priv, true)) goto endjob;