@@ -2584,8 +2584,7 @@ static void do_info_status_print(Monitor *mon, const QObject *data)
static void do_info_status(Monitor *mon, QObject **ret_data)
{
- *ret_data = qobject_from_jsonf("{ 'running': %i, 'singlestep': %i }",
- vm_running, singlestep);
+ *ret_data = qobject_from_jsonf("{ 'running': %i, 'singlestep': %i, 'status': %s }", vm_running, singlestep, vm_status_get_name());
}
static qemu_acl *find_acl(Monitor *mon, const char *name)
@@ -1486,11 +1486,26 @@ Return a json-object with the following information:
- "running": true if the VM is running, or false if it is paused (json-bool)
- "singlestep": true if the VM is in single step mode,
false otherwise (json-bool)
+- "status": one of the following values (json-string)
+ "debug" - QEMU is running on a debugger
+ "inmigrate" - guest is paused waiting for an incoming migration
+ "postmigrate" - guest is paused following a successful 'migrate'
+ "internal-error" - An internal error that prevents further guest
+ execution has occurred
+ "load-state-error" - guest is paused following a failed 'loadvm'
+ "io-error" - the last IOP has failed and the device is configured
+ to pause on I/O errors
+ "watchdog-error" - the watchdog action is configured to pause and
+ "paused" - guest has been paused via the 'stop' command
+ "prelaunch" - QEMU was started with -S and guest has not started
+ "running" - guest is actively running
+ "shutdown" - guest is shut down (and -no-shutdown is in use)
+ has been triggered
Example:
-> { "execute": "query-status" }
-<- { "return": { "running": true, "singlestep": false } }
+<- { "return": { "running": true, "singlestep": false, "status": "running" } }
EQMP
This new key reports the current VM status to clients. Please, check the documentation being added in this commit for more details. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- monitor.c | 3 +-- qmp-commands.hx | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-)