diff options
author | Fam Zheng <famz@redhat.com> | 2017-09-05 10:11:51 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2017-09-22 10:46:25 +0800 |
commit | 22491a2f2ee75dbd68058abcb1ab9feee140ba50 (patch) | |
tree | 4c50527d649c76a378fb0c6f416f8d46a45bbba8 /scripts | |
parent | b8bd2f598b7d8afa5413c36c77830c465a4c9034 (diff) | |
download | qemu-22491a2f2ee75dbd68058abcb1ab9feee140ba50.zip qemu-22491a2f2ee75dbd68058abcb1ab9feee140ba50.tar.gz qemu-22491a2f2ee75dbd68058abcb1ab9feee140ba50.tar.bz2 |
qemu.py: Add "wait()" method
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/qemu.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/qemu.py b/scripts/qemu.py index 5e02dd8..2b5c2ac 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -215,6 +215,13 @@ class QEMUMachine(object): LOG.debug('Output: %r', self._iolog) 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(): |