mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
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.
This commit is contained in:
parent
9b111048ad
commit
1dcb1dc0f9
@ -2936,7 +2936,8 @@ virDomainObjGetPersistentDef(virCapsPtr caps,
|
|||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
virDomainObjPtr domain)
|
virDomainObjPtr domain)
|
||||||
{
|
{
|
||||||
if (virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0)
|
if (virDomainObjIsActive(domain) &&
|
||||||
|
virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (domain->newDef)
|
if (domain->newDef)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user