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: Paulo Ricardo Paz Vital
Subject: Re: [Qemu-devel] Getting VM state from outside QEMU?
Date: Tue, 07 Apr 2015 15:42:19 +0200

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" } }


> Thanks.
> 
> Best regards,
> 
> Erik
> 

-- 
Paulo Ricardo Paz Vital <address@hidden>
ProfitBricks GmbH




reply via email to

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