mirror of https://gitee.com/openkylin/libvirt.git
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
This commit is contained in:
parent
fbb94044ea
commit
723522328f
|
@ -2824,6 +2824,13 @@ qemuDomainAgentAvailable(virDomainObjPtr vm,
|
||||||
}
|
}
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue