If we allow launching VM again we will loose track of the first launched
VM.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Amador Pahim <apahim@redhat.com>
---
scripts/qemu.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index df2fca9e71..ab172c3670 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -207,6 +207,9 @@ class QEMUMachine(object):
Launch the VM and make sure we cleanup and expose the
command line/output in case of exception
"""
+ if self.is_running():
+ raise QEMUMachineError('VM already running')
+
self._iolog = None
self._qemu_full_args = None
try:
--
2.13.6