Commit 22491a2f authored by Fam Zheng's avatar Fam Zheng
Browse files

qemu.py: Add "wait()" method

parent b8bd2f59
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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():