uml: start using virDomainObjCheckActive

Signed-off-by: Clementine Hayat <clem@lse.epita.fr>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Clementine Hayat 2018-04-17 22:13:33 +00:00 committed by Ján Tomko
parent 7987780779
commit b5997e3707

View File

@ -2584,11 +2584,8 @@ umlDomainOpenConsole(virDomainPtr dom,
if (virDomainOpenConsoleEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("domain is not running"));
if (virDomainObjCheckActive(vm) < 0)
goto cleanup;
}
if (dev_name) {
for (i = 0; i < vm->def->nconsoles; i++) {