From 1dcb1dc0f99ac573ec593cd0ac631705df78ed34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Fri, 27 May 2016 13:33:04 +0200 Subject: [PATCH] Check if the domain is active in virDomainObjGetPersistentDef Calling virDomainObjSetDefTransient with live=false is a no-op on an inactive domain. Only call it on an active domain, since this is the only place using the live bool. --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9f9fdf2419..ee25e01f9e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2936,7 +2936,8 @@ virDomainObjGetPersistentDef(virCapsPtr caps, virDomainXMLOptionPtr xmlopt, virDomainObjPtr domain) { - if (virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0) + if (virDomainObjIsActive(domain) && + virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0) return NULL; if (domain->newDef) -- 2.39.5