提交 72352232 编写于 作者: J Ján Tomko

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
上级 fbb94044
......@@ -2824,6 +2824,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.
先完成此消息的编辑!
想要评论请 注册