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

[libvirt] [PATCH] Fix QEMU domain status after restore.



When doing a restore, we were forgetting to update the state file
for the VM.  That means that if you do a save/restore, then shut
down libvirtd, then start it back up, you'll see the state of the
guest as "paused", even though it is really running.  We were
just forgetting a "virDomainSaveStatus" call in the restor path.

Signed-off-by: Chris Lalancette <clalance redhat com>
---
 src/qemu_driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 1fb2417..d789c4d 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -4099,6 +4099,7 @@ static int qemudDomainRestore(virConnectPtr conn,
         }
         VIR_FREE(info);
         vm->state = VIR_DOMAIN_RUNNING;
+        virDomainSaveStatus(conn, driver->stateDir, vm);
     }
     ret = 0;
 
-- 
1.6.0.6


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