qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Getting VM state from outside QEMU?


From: Erik Rull
Subject: Re: [Qemu-devel] Getting VM state from outside QEMU?
Date: Wed, 8 Apr 2015 18:10:18 +0200 (CEST)

Hello Paulo,

> On April 7, 2015 at 3:42 PM Paulo Ricardo Paz Vital
> <address@hidden> wrote:
> 
> 
> On Tue, 2015-04-07 at 15:31 +0200, Erik Rull wrote:
> > Hi all,
> > 
> > I need a pretty simple way to get the current state of the VM running in
> > QEMU -
> > I only need the VM state (e.g. running, paused,...). Since my environment
> > does
> > not have any perl, python or other high level scripting capabilities, a
> > simple
> > way e.g. via a shell script would be nice. QEMU is running daemonized, so
> > interacting with the qemu console is not possible.
> > Are there any usable entries in /proc, /dev or /sys that could be used?
> > 
> 
> Hello Erik,
> 
> My suggestion is to create a script that sends the QMP command
> "query-status" an then parse the result. The syntax and output is:
> 
> -> { "execute": "query-status" }
> <- { "return": { "running": true, "singlestep": false, "status":
> "running" } }
> 

Sounds good - I tried that - but all attempts return that the command has not
been found. I added the following command line snippet and the results are:
[...] -qmp tcp:localhost:4444,server,nowait [...]

172.17.48.45 ~ # telnet 127.0.0.1 4444
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 1, "major": 2}, "package":
""}, "capabilities": []}}

{ "execute": "query-status" }
{"error": {"class": "CommandNotFound", "desc": "The command query-status has not
been found"}}
{ "execute": "info status" }
{"error": {"class": "CommandNotFound", "desc": "The command info status has not
been found"}}
{ "execute": "info", "arguments": { "status": "" } }
{"error": {"class": "CommandNotFound", "desc": "The command info has not been
found"}}
{ "execute": "query-kvm" }
{"error": {"class": "CommandNotFound", "desc": "The command query-kvm has not
been found"}}

Any ideas what's wrong here?

Thanks.

Best regards,

Erik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]