From: Ján Tomko Date: Fri, 27 May 2016 11:33:04 +0000 (+0200) Subject: Check if the domain is active in virDomainObjGetPersistentDef X-Git-Tag: v2.0.0-rc1~479 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dcb1dc0f99ac573ec593cd0ac631705df78ed34;p=thirdparty%2Flibvirt.git 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. --- 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)