提交 37448a86 编写于 作者: J Ján Tomko 提交者: Cole Robinson

Check if domain is running in qemuDomainAgentIsAvailable

If the domain is not running, the agent will not respond.
Do not even try.

https://bugzilla.redhat.com/show_bug.cgi?id=872424
(cherry picked from commit 72352232)
上级 4f712a2e
......@@ -2819,6 +2819,13 @@ qemuDomainAgentAvailable(virDomainObjPtr vm,
}
return false;
}
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
if (reportError) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain is not running"));
}
return false;
}
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册