]> git.proxmox.com Git - mirror_qemu.git/blob - docs/qmp/qmp-events.txt
Merge remote-tracking branch 'sstabellini/xen-170114' into staging
[mirror_qemu.git] / docs / qmp / qmp-events.txt
1 QEMU Machine Protocol Events
2 ============================
3
4 BALLOON_CHANGE
5 --------------
6
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
10
11 Data:
12
13 - "actual": actual level of the guest memory balloon in bytes (json-number)
14
15 Example:
16
17 { "event": "BALLOON_CHANGE",
18 "data": { "actual": 944766976 },
19 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
20
21 BLOCK_IMAGE_CORRUPTED
22 ---------------------
23
24 Emitted when a disk image is being marked corrupt.
25
26 Data:
27
28 - "device": Device name (json-string)
29 - "msg": Informative message (e.g., reason for the corruption) (json-string)
30 - "offset": If the corruption resulted from an image access, this is the access
31 offset into the image (json-int)
32 - "size": If the corruption resulted from an image access, this is the access
33 size (json-int)
34
35 Example:
36
37 { "event": "BLOCK_IMAGE_CORRUPTED",
38 "data": { "device": "ide0-hd0",
39 "msg": "Prevented active L1 table overwrite", "offset": 196608,
40 "size": 65536 },
41 "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
42
43 BLOCK_IO_ERROR
44 --------------
45
46 Emitted when a disk I/O error occurs.
47
48 Data:
49
50 - "device": device name (json-string)
51 - "operation": I/O operation (json-string, "read" or "write")
52 - "action": action that has been taken, it's one of the following (json-string):
53 "ignore": error has been ignored
54 "report": error has been reported to the device
55 "stop": error caused VM to be stopped
56
57 Example:
58
59 { "event": "BLOCK_IO_ERROR",
60 "data": { "device": "ide0-hd1",
61 "operation": "write",
62 "action": "stop" },
63 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
64
65 Note: If action is "stop", a STOP event will eventually follow the
66 BLOCK_IO_ERROR event.
67
68 BLOCK_JOB_CANCELLED
69 -------------------
70
71 Emitted when a block job has been cancelled.
72
73 Data:
74
75 - "type": Job type (json-string; "stream" for image streaming
76 "commit" for block commit)
77 - "device": Device name (json-string)
78 - "len": Maximum progress value (json-int)
79 - "offset": Current progress value (json-int)
80 On success this is equal to len.
81 On failure this is less than len.
82 - "speed": Rate limit, bytes per second (json-int)
83
84 Example:
85
86 { "event": "BLOCK_JOB_CANCELLED",
87 "data": { "type": "stream", "device": "virtio-disk0",
88 "len": 10737418240, "offset": 134217728,
89 "speed": 0 },
90 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
91
92 BLOCK_JOB_COMPLETED
93 -------------------
94
95 Emitted when a block job has completed.
96
97 Data:
98
99 - "type": Job type (json-string; "stream" for image streaming
100 "commit" for block commit)
101 - "device": Device name (json-string)
102 - "len": Maximum progress value (json-int)
103 - "offset": Current progress value (json-int)
104 On success this is equal to len.
105 On failure this is less than len.
106 - "speed": Rate limit, bytes per second (json-int)
107 - "error": Error message (json-string, optional)
108 Only present on failure. This field contains a human-readable
109 error message. There are no semantics other than that streaming
110 has failed and clients should not try to interpret the error
111 string.
112
113 Example:
114
115 { "event": "BLOCK_JOB_COMPLETED",
116 "data": { "type": "stream", "device": "virtio-disk0",
117 "len": 10737418240, "offset": 10737418240,
118 "speed": 0 },
119 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
120
121 BLOCK_JOB_ERROR
122 ---------------
123
124 Emitted when a block job encounters an error.
125
126 Data:
127
128 - "device": device name (json-string)
129 - "operation": I/O operation (json-string, "read" or "write")
130 - "action": action that has been taken, it's one of the following (json-string):
131 "ignore": error has been ignored, the job may fail later
132 "report": error will be reported and the job canceled
133 "stop": error caused job to be paused
134
135 Example:
136
137 { "event": "BLOCK_JOB_ERROR",
138 "data": { "device": "ide0-hd1",
139 "operation": "write",
140 "action": "stop" },
141 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
142
143 BLOCK_JOB_READY
144 ---------------
145
146 Emitted when a block job is ready to complete.
147
148 Data:
149
150 - "device": device name (json-string)
151
152 Example:
153
154 { "event": "BLOCK_JOB_READY",
155 "data": { "device": "ide0-hd1" },
156 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
157
158 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
159 event.
160
161 DEVICE_DELETED
162 --------------
163
164 Emitted whenever the device removal completion is acknowledged
165 by the guest.
166 At this point, it's safe to reuse the specified device ID.
167 Device removal can be initiated by the guest or by HMP/QMP commands.
168
169 Data:
170
171 - "device": device name (json-string, optional)
172 - "path": device path (json-string)
173
174 { "event": "DEVICE_DELETED",
175 "data": { "device": "virtio-net-pci-0",
176 "path": "/machine/peripheral/virtio-net-pci-0" },
177 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
178
179 DEVICE_TRAY_MOVED
180 -----------------
181
182 It's emitted whenever the tray of a removable device is moved by the guest
183 or by HMP/QMP commands.
184
185 Data:
186
187 - "device": device name (json-string)
188 - "tray-open": true if the tray has been opened or false if it has been closed
189 (json-bool)
190
191 { "event": "DEVICE_TRAY_MOVED",
192 "data": { "device": "ide1-cd0",
193 "tray-open": true
194 },
195 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
196
197 GUEST_PANICKED
198 --------------
199
200 Emitted when guest OS panic is detected.
201
202 Data:
203
204 - "action": Action that has been taken (json-string, currently always "pause").
205
206 Example:
207
208 { "event": "GUEST_PANICKED",
209 "data": { "action": "pause" } }
210
211 NIC_RX_FILTER_CHANGED
212 ---------------------
213
214 The event is emitted once until the query command is executed,
215 the first event will always be emitted.
216
217 Data:
218
219 - "name": net client name (json-string)
220 - "path": device path (json-string)
221
222 { "event": "NIC_RX_FILTER_CHANGED",
223 "data": { "name": "vnet0",
224 "path": "/machine/peripheral/vnet0/virtio-backend" },
225 "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
226 }
227
228 RESET
229 -----
230
231 Emitted when the Virtual Machine is reseted.
232
233 Data: None.
234
235 Example:
236
237 { "event": "RESET",
238 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
239
240 RESUME
241 ------
242
243 Emitted when the Virtual Machine resumes execution.
244
245 Data: None.
246
247 Example:
248
249 { "event": "RESUME",
250 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
251
252 RTC_CHANGE
253 ----------
254
255 Emitted when the guest changes the RTC time.
256
257 Data:
258
259 - "offset": Offset between base RTC clock (as specified by -rtc base), and
260 new RTC clock value (json-number)
261
262 Example:
263
264 { "event": "RTC_CHANGE",
265 "data": { "offset": 78 },
266 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
267
268 SHUTDOWN
269 --------
270
271 Emitted when the Virtual Machine is powered down.
272
273 Data: None.
274
275 Example:
276
277 { "event": "SHUTDOWN",
278 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
279
280 Note: If the command-line option "-no-shutdown" has been specified, a STOP
281 event will eventually follow the SHUTDOWN event.
282
283 SPICE_CONNECTED, SPICE_DISCONNECTED
284 -----------------------------------
285
286 Emitted when a SPICE client connects or disconnects.
287
288 Data:
289
290 - "server": Server information (json-object)
291 - "host": IP address (json-string)
292 - "port": port number (json-string)
293 - "family": address family (json-string, "ipv4" or "ipv6")
294 - "client": Client information (json-object)
295 - "host": IP address (json-string)
296 - "port": port number (json-string)
297 - "family": address family (json-string, "ipv4" or "ipv6")
298
299 Example:
300
301 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
302 "event": "SPICE_CONNECTED",
303 "data": {
304 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
305 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
306 }}
307
308 SPICE_INITIALIZED
309 -----------------
310
311 Emitted after initial handshake and authentication takes place (if any)
312 and the SPICE channel is up'n'running
313
314 Data:
315
316 - "server": Server information (json-object)
317 - "host": IP address (json-string)
318 - "port": port number (json-string)
319 - "family": address family (json-string, "ipv4" or "ipv6")
320 - "auth": authentication method (json-string, optional)
321 - "client": Client information (json-object)
322 - "host": IP address (json-string)
323 - "port": port number (json-string)
324 - "family": address family (json-string, "ipv4" or "ipv6")
325 - "connection-id": spice connection id. All channels with the same id
326 belong to the same spice session (json-int)
327 - "channel-type": channel type. "1" is the main control channel, filter for
328 this one if you want track spice sessions only (json-int)
329 - "channel-id": channel id. Usually "0", might be different needed when
330 multiple channels of the same type exist, such as multiple
331 display channels in a multihead setup (json-int)
332 - "tls": whevener the channel is encrypted (json-bool)
333
334 Example:
335
336 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
337 "event": "SPICE_INITIALIZED",
338 "data": {"server": {"auth": "spice", "port": "5921",
339 "family": "ipv4", "host": "127.0.0.1"},
340 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
341 "connection-id": 1804289383, "host": "127.0.0.1",
342 "channel-id": 0, "tls": true}
343 }}
344
345 STOP
346 ----
347
348 Emitted when the Virtual Machine is stopped.
349
350 Data: None.
351
352 Example:
353
354 { "event": "STOP",
355 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
356
357 SUSPEND
358 -------
359
360 Emitted when guest enters S3 state.
361
362 Data: None.
363
364 Example:
365
366 { "event": "SUSPEND",
367 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
368
369 SUSPEND_DISK
370 ------------
371
372 Emitted when the guest makes a request to enter S4 state.
373
374 Data: None.
375
376 Example:
377
378 { "event": "SUSPEND_DISK",
379 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
380
381 Note: QEMU shuts down when entering S4 state.
382
383 VNC_CONNECTED
384 -------------
385
386 Emitted when a VNC client establishes a connection.
387
388 Data:
389
390 - "server": Server information (json-object)
391 - "host": IP address (json-string)
392 - "service": port number (json-string)
393 - "family": address family (json-string, "ipv4" or "ipv6")
394 - "auth": authentication method (json-string, optional)
395 - "client": Client information (json-object)
396 - "host": IP address (json-string)
397 - "service": port number (json-string)
398 - "family": address family (json-string, "ipv4" or "ipv6")
399
400 Example:
401
402 { "event": "VNC_CONNECTED",
403 "data": {
404 "server": { "auth": "sasl", "family": "ipv4",
405 "service": "5901", "host": "0.0.0.0" },
406 "client": { "family": "ipv4", "service": "58425",
407 "host": "127.0.0.1" } },
408 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
409
410
411 Note: This event is emitted before any authentication takes place, thus
412 the authentication ID is not provided.
413
414 VNC_DISCONNECTED
415 ----------------
416
417 Emitted when the connection is closed.
418
419 Data:
420
421 - "server": Server information (json-object)
422 - "host": IP address (json-string)
423 - "service": port number (json-string)
424 - "family": address family (json-string, "ipv4" or "ipv6")
425 - "auth": authentication method (json-string, optional)
426 - "client": Client information (json-object)
427 - "host": IP address (json-string)
428 - "service": port number (json-string)
429 - "family": address family (json-string, "ipv4" or "ipv6")
430 - "x509_dname": TLS dname (json-string, optional)
431 - "sasl_username": SASL username (json-string, optional)
432
433 Example:
434
435 { "event": "VNC_DISCONNECTED",
436 "data": {
437 "server": { "auth": "sasl", "family": "ipv4",
438 "service": "5901", "host": "0.0.0.0" },
439 "client": { "family": "ipv4", "service": "58425",
440 "host": "127.0.0.1", "sasl_username": "luiz" } },
441 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
442
443 VNC_INITIALIZED
444 ---------------
445
446 Emitted after authentication takes place (if any) and the VNC session is
447 made active.
448
449 Data:
450
451 - "server": Server information (json-object)
452 - "host": IP address (json-string)
453 - "service": port number (json-string)
454 - "family": address family (json-string, "ipv4" or "ipv6")
455 - "auth": authentication method (json-string, optional)
456 - "client": Client information (json-object)
457 - "host": IP address (json-string)
458 - "service": port number (json-string)
459 - "family": address family (json-string, "ipv4" or "ipv6")
460 - "x509_dname": TLS dname (json-string, optional)
461 - "sasl_username": SASL username (json-string, optional)
462
463 Example:
464
465 { "event": "VNC_INITIALIZED",
466 "data": {
467 "server": { "auth": "sasl", "family": "ipv4",
468 "service": "5901", "host": "0.0.0.0"},
469 "client": { "family": "ipv4", "service": "46089",
470 "host": "127.0.0.1", "sasl_username": "luiz" } },
471 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
472
473 WAKEUP
474 ------
475
476 Emitted when the guest has woken up from S3 and is running.
477
478 Data: None.
479
480 Example:
481
482 { "event": "WAKEUP",
483 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
484
485 WATCHDOG
486 --------
487
488 Emitted when the watchdog device's timer is expired.
489
490 Data:
491
492 - "action": Action that has been taken, it's one of the following (json-string):
493 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
494
495 Example:
496
497 { "event": "WATCHDOG",
498 "data": { "action": "reset" },
499 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
500
501 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
502 followed respectively by the RESET, SHUTDOWN, or STOP events.