Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
---
 scripts/qemu.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 4d8ee10943..99963053a5 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -157,6 +157,13 @@ class QEMUMachine(object):
             self._post_shutdown()
             raise
 
+    def wait(self):
+        '''Wait for the VM to power off'''
+        self._popen.wait()
+        self._qmp.close()
+        self._load_io_log()
+        self._post_shutdown()
+
     def shutdown(self):
         '''Terminate the VM and clean up'''
         if self.is_running():
-- 
2.13.5


Reply via email to