1 QEMU Monitor Protocol Events
2 ============================
7 Emitted when the guest changes the actual BALLOON level. This
8 value is equivalent to the 'actual' field return by the
9 'query-balloon' command
13 - "actual": actual level of the guest memory balloon in bytes (json-number)
17 { "event": "BALLOON_CHANGE",
18 "data": { "actual": 944766976 },
19 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
24 Emitted when a disk I/O error occurs.
28 - "device": device name (json-string)
29 - "operation": I/O operation (json-string, "read" or "write")
30 - "action": action that has been taken, it's one of the following (json-string):
31 "ignore": error has been ignored
32 "report": error has been reported to the device
33 "stop": error caused VM to be stopped
37 { "event": "BLOCK_IO_ERROR",
38 "data": { "device": "ide0-hd1",
41 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
43 Note: If action is "stop", a STOP event will eventually follow the
49 Emitted when a block job has been cancelled.
53 - "type": Job type (json-string; "stream" for image streaming
54 "commit" for block commit)
55 - "device": Device name (json-string)
56 - "len": Maximum progress value (json-int)
57 - "offset": Current progress value (json-int)
58 On success this is equal to len.
59 On failure this is less than len.
60 - "speed": Rate limit, bytes per second (json-int)
64 { "event": "BLOCK_JOB_CANCELLED",
65 "data": { "type": "stream", "device": "virtio-disk0",
66 "len": 10737418240, "offset": 134217728,
68 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
73 Emitted when a block job has completed.
77 - "type": Job type (json-string; "stream" for image streaming
78 "commit" for block commit)
79 - "device": Device name (json-string)
80 - "len": Maximum progress value (json-int)
81 - "offset": Current progress value (json-int)
82 On success this is equal to len.
83 On failure this is less than len.
84 - "speed": Rate limit, bytes per second (json-int)
85 - "error": Error message (json-string, optional)
86 Only present on failure. This field contains a human-readable
87 error message. There are no semantics other than that streaming
88 has failed and clients should not try to interpret the error
93 { "event": "BLOCK_JOB_COMPLETED",
94 "data": { "type": "stream", "device": "virtio-disk0",
95 "len": 10737418240, "offset": 10737418240,
97 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
102 It's emitted whenever the tray of a removable device is moved by the guest
103 or by HMP/QMP commands.
107 - "device": device name (json-string)
108 - "tray-open": true if the tray has been opened or false if it has been closed
111 { "event": "DEVICE_TRAY_MOVED",
112 "data": { "device": "ide1-cd0",
115 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
120 Emitted when the Virtual Machine is reseted.
127 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
132 Emitted when the Virtual Machine resumes execution.
139 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
144 Emitted when the guest changes the RTC time.
148 - "offset": delta against the host UTC in seconds (json-number)
152 { "event": "RTC_CHANGE",
153 "data": { "offset": 78 },
154 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
159 Emitted when the Virtual Machine is powered down.
165 { "event": "SHUTDOWN",
166 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
168 Note: If the command-line option "-no-shutdown" has been specified, a STOP
169 event will eventually follow the SHUTDOWN event.
171 SPICE_CONNECTED, SPICE_DISCONNECTED
172 -----------------------------------
174 Emitted when a SPICE client connects or disconnects.
178 - "server": Server information (json-object)
179 - "host": IP address (json-string)
180 - "port": port number (json-string)
181 - "family": address family (json-string, "ipv4" or "ipv6")
182 - "client": Client information (json-object)
183 - "host": IP address (json-string)
184 - "port": port number (json-string)
185 - "family": address family (json-string, "ipv4" or "ipv6")
189 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
190 "event": "SPICE_CONNECTED",
192 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
193 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
199 Emitted after initial handshake and authentication takes place (if any)
200 and the SPICE channel is up'n'running
204 - "server": Server information (json-object)
205 - "host": IP address (json-string)
206 - "port": port number (json-string)
207 - "family": address family (json-string, "ipv4" or "ipv6")
208 - "auth": authentication method (json-string, optional)
209 - "client": Client information (json-object)
210 - "host": IP address (json-string)
211 - "port": port number (json-string)
212 - "family": address family (json-string, "ipv4" or "ipv6")
213 - "connection-id": spice connection id. All channels with the same id
214 belong to the same spice session (json-int)
215 - "channel-type": channel type. "1" is the main control channel, filter for
216 this one if you want track spice sessions only (json-int)
217 - "channel-id": channel id. Usually "0", might be different needed when
218 multiple channels of the same type exist, such as multiple
219 display channels in a multihead setup (json-int)
220 - "tls": whevener the channel is encrypted (json-bool)
224 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
225 "event": "SPICE_INITIALIZED",
226 "data": {"server": {"auth": "spice", "port": "5921",
227 "family": "ipv4", "host": "127.0.0.1"},
228 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
229 "connection-id": 1804289383, "host": "127.0.0.1",
230 "channel-id": 0, "tls": true}
236 Emitted when the Virtual Machine is stopped.
243 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
248 Emitted when guest enters S3 state.
254 { "event": "SUSPEND",
255 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
260 Emitted when the guest makes a request to enter S4 state.
266 { "event": "SUSPEND_DISK",
267 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
269 Note: QEMU shuts down when entering S4 state.
274 Emitted when a VNC client establishes a connection.
278 - "server": Server information (json-object)
279 - "host": IP address (json-string)
280 - "service": port number (json-string)
281 - "family": address family (json-string, "ipv4" or "ipv6")
282 - "auth": authentication method (json-string, optional)
283 - "client": Client information (json-object)
284 - "host": IP address (json-string)
285 - "service": port number (json-string)
286 - "family": address family (json-string, "ipv4" or "ipv6")
290 { "event": "VNC_CONNECTED",
292 "server": { "auth": "sasl", "family": "ipv4",
293 "service": "5901", "host": "0.0.0.0" },
294 "client": { "family": "ipv4", "service": "58425",
295 "host": "127.0.0.1" } },
296 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
299 Note: This event is emitted before any authentication takes place, thus
300 the authentication ID is not provided.
305 Emitted when the connection is closed.
309 - "server": Server information (json-object)
310 - "host": IP address (json-string)
311 - "service": port number (json-string)
312 - "family": address family (json-string, "ipv4" or "ipv6")
313 - "auth": authentication method (json-string, optional)
314 - "client": Client information (json-object)
315 - "host": IP address (json-string)
316 - "service": port number (json-string)
317 - "family": address family (json-string, "ipv4" or "ipv6")
318 - "x509_dname": TLS dname (json-string, optional)
319 - "sasl_username": SASL username (json-string, optional)
323 { "event": "VNC_DISCONNECTED",
325 "server": { "auth": "sasl", "family": "ipv4",
326 "service": "5901", "host": "0.0.0.0" },
327 "client": { "family": "ipv4", "service": "58425",
328 "host": "127.0.0.1", "sasl_username": "luiz" } },
329 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
334 Emitted after authentication takes place (if any) and the VNC session is
339 - "server": Server information (json-object)
340 - "host": IP address (json-string)
341 - "service": port number (json-string)
342 - "family": address family (json-string, "ipv4" or "ipv6")
343 - "auth": authentication method (json-string, optional)
344 - "client": Client information (json-object)
345 - "host": IP address (json-string)
346 - "service": port number (json-string)
347 - "family": address family (json-string, "ipv4" or "ipv6")
348 - "x509_dname": TLS dname (json-string, optional)
349 - "sasl_username": SASL username (json-string, optional)
353 { "event": "VNC_INITIALIZED",
355 "server": { "auth": "sasl", "family": "ipv4",
356 "service": "5901", "host": "0.0.0.0"},
357 "client": { "family": "ipv4", "service": "46089",
358 "host": "127.0.0.1", "sasl_username": "luiz" } },
359 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
364 Emitted when the guest has woken up from S3 and is running.
370 { "event": "WATCHDOG",
371 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
376 Emitted when the watchdog device's timer is expired.
380 - "action": Action that has been taken, it's one of the following (json-string):
381 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
385 { "event": "WATCHDOG",
386 "data": { "action": "reset" },
387 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
389 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
390 followed respectively by the RESET, SHUTDOWN, or STOP events.