diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9f9fdf24190ef43772da86f8c04484842d6737da..ee25e01f9ef21bc2e2237a30639de83c0fddd6f6 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)