From bb7eda63afea9f15451f4ef529f45467a9edc895 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 17 Mar 2015 11:02:14 +0100 Subject: [PATCH] Support more all QEMU status Fix #98 --- gns3server/modules/qemu/qemu_vm.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/qemu/qemu_vm.py b/gns3server/modules/qemu/qemu_vm.py index e595110f..92616d8d 100644 --- a/gns3server/modules/qemu/qemu_vm.py +++ b/gns3server/modules/qemu/qemu_vm.py @@ -710,10 +710,18 @@ class QemuVM(BaseVM): """ Returns this VM suspend status (running|paused) + Status are extracted from: + https://github.com/qemu/qemu/blob/master/qapi-schema.json#L152 + :returns: status (string) """ - result = yield from self._control_vm("info status", [b"running", b"paused"]) + result = yield from self._control_vm("info status", [ + b"debug", b"inmigrate", b"internal-error", b"io-error", + b"paused", b"postmigrate", b"prelaunch", b"finish-migrate", + b"restore-vm", b"running", b"save-vm", b"shutdown", b"suspended", + b"watchdog", b"guest-panicked" + ]) return result.rsplit(' ', 1)[1] @asyncio.coroutine