mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
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 723522328f2d92e4c2d5de35b3b3ec0302bb06ac)
This commit is contained in:
parent
4f712a2e95
commit
37448a868e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user