[libvirt] [PATCH 2/2] test: Update inactive guest config on shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This matches the expected behavior of state drivers such as QEMU.

Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
---
 src/test/test_driver.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 35299d5..343834c 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -473,6 +473,12 @@ static void
 testDomainShutdownState(virDomainPtr domain,
                         virDomainObjPtr privdom)
 {
+    if (privdom->newDef) {
+        virDomainDefFree(privdom->def);
+        privdom->def = privdom->newDef;
+        privdom->newDef = NULL;
+    }
+
     privdom->state = VIR_DOMAIN_SHUTOFF;
     privdom->def->id = -1;
     domain->id = -1;
-- 
1.6.5.1

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]