[pve-devel] how to catch qmp events ?

Alexandre DERUMIER aderumier at odiso.com
Tue Mar 19 18:09:45 CET 2013


mmm, doc seem to say that events can be send in the response of any qmp query

something like this:


-> qmp query1
<- reponse query1
-> qmp query2
<- response query2
<- event query1


Maybe can we implement log of theses events somewhere ?(syslog, or somewhere in proxmox gui ?)
I should be easy to add this in qmpclient.pm


----- Mail original ----- 

De: "Alexandre DERUMIER" <aderumier at odiso.com> 
À: "Dietmar Maurer" <dietmar at proxmox.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mardi 19 Mars 2013 18:01:23 
Objet: Re: [pve-devel] how to catch qmp events ? 

documentation 
http://wiki.qemu.org/Features/BlockJob 

said that a "QMP event BLOCK_JOB_ERROR" is send. 

But qmp events are async, so I don't known how/when to get them. 
(It's not a problem for my block-mirror, proxmox task just stop fine, but I don't have the error message) 



the are an exammple here too. 
http://wiki.qemu.org/QMP 

Query VM status 

C: { "execute": "query-status" } 
S: { 
"return": { 
"status": "running", 
"singlestep": false, 
"running": true 
} 
} 

Asynchronous message 

S: { "event": "BLOCK_IO_ERROR", 
"data": { "device": "ide0-hd1", 
"operation": "write", 
"action": "stop" }, 
"timestamp": { "seconds": 1265044230, "microseconds": 450486 } } 


----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com>, pve-devel at pve.proxmox.com 
Envoyé: Mardi 19 Mars 2013 17:28:06 
Objet: RE: [pve-devel] how to catch qmp events ? 

> mirror block-job simply stop itself, but I don't have the error message. 

There was some recent patches on the qemu-devel list to improve logging, but AFAIK 
many error messages are still sent to /dev/null when you run with --damonize. 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list