]> git.proxmox.com Git - mirror_qemu.git/blame - docs/qmp-events.txt
dump-guest-memory: add qmp event DUMP_COMPLETED
[mirror_qemu.git] / docs / qmp-events.txt
CommitLineData
dfab4892
LC
1 QEMU Machine Protocol Events
2 ============================
3
4ACPI_DEVICE_OST
5---------------
6
7Emitted when guest executes ACPI _OST method.
8
9 - data: ACPIOSTInfo type as described in qapi-schema.json
10
11{ "event": "ACPI_DEVICE_OST",
12 "data": { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0 } }
13
14BALLOON_CHANGE
15--------------
16
17Emitted when the guest changes the actual BALLOON level. This
18value is equivalent to the 'actual' field return by the
19'query-balloon' command
20
21Data:
22
23- "actual": actual level of the guest memory balloon in bytes (json-number)
24
25Example:
26
27{ "event": "BALLOON_CHANGE",
28 "data": { "actual": 944766976 },
29 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
30
7f1e7b23
MA
31Note: this event is rate-limited.
32
dfab4892
LC
33BLOCK_IMAGE_CORRUPTED
34---------------------
35
dc881b44
AG
36Emitted when a disk image is being marked corrupt. The image can be
37identified by its device or node name. The 'device' field is always
38present for compatibility reasons, but it can be empty ("") if the
39image does not have a device name associated.
dfab4892
LC
40
41Data:
42
dc881b44
AG
43- "device": Device name (json-string)
44- "node-name": Node name (json-string, optional)
45- "msg": Informative message (e.g., reason for the corruption)
46 (json-string)
47- "offset": If the corruption resulted from an image access, this
0caef8f6
AG
48 is the host's access offset into the image
49 (json-int, optional)
dc881b44 50- "size": If the corruption resulted from an image access, this
0caef8f6 51 is the access size (json-int, optional)
dfab4892
LC
52
53Example:
54
55{ "event": "BLOCK_IMAGE_CORRUPTED",
dc881b44 56 "data": { "device": "ide0-hd0", "node-name": "node0",
dfab4892
LC
57 "msg": "Prevented active L1 table overwrite", "offset": 196608,
58 "size": 65536 },
59 "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
60
61BLOCK_IO_ERROR
62--------------
63
64Emitted when a disk I/O error occurs.
65
66Data:
67
68- "device": device name (json-string)
69- "operation": I/O operation (json-string, "read" or "write")
70- "action": action that has been taken, it's one of the following (json-string):
71 "ignore": error has been ignored
72 "report": error has been reported to the device
73 "stop": the VM is going to stop because of the error
74
75Example:
76
77{ "event": "BLOCK_IO_ERROR",
78 "data": { "device": "ide0-hd1",
79 "operation": "write",
80 "action": "stop" },
81 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
82
83Note: If action is "stop", a STOP event will eventually follow the
84BLOCK_IO_ERROR event.
85
86BLOCK_JOB_CANCELLED
87-------------------
88
89Emitted when a block job has been cancelled.
90
91Data:
92
93- "type": Job type (json-string; "stream" for image streaming
94 "commit" for block commit)
95- "device": Device name (json-string)
96- "len": Maximum progress value (json-int)
97- "offset": Current progress value (json-int)
98 On success this is equal to len.
99 On failure this is less than len.
100- "speed": Rate limit, bytes per second (json-int)
101
102Example:
103
104{ "event": "BLOCK_JOB_CANCELLED",
105 "data": { "type": "stream", "device": "virtio-disk0",
106 "len": 10737418240, "offset": 134217728,
107 "speed": 0 },
108 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
109
110BLOCK_JOB_COMPLETED
111-------------------
112
113Emitted when a block job has completed.
114
115Data:
116
117- "type": Job type (json-string; "stream" for image streaming
118 "commit" for block commit)
119- "device": Device name (json-string)
120- "len": Maximum progress value (json-int)
121- "offset": Current progress value (json-int)
122 On success this is equal to len.
123 On failure this is less than len.
124- "speed": Rate limit, bytes per second (json-int)
125- "error": Error message (json-string, optional)
126 Only present on failure. This field contains a human-readable
127 error message. There are no semantics other than that streaming
128 has failed and clients should not try to interpret the error
129 string.
130
131Example:
132
133{ "event": "BLOCK_JOB_COMPLETED",
134 "data": { "type": "stream", "device": "virtio-disk0",
135 "len": 10737418240, "offset": 10737418240,
136 "speed": 0 },
137 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
138
139BLOCK_JOB_ERROR
140---------------
141
142Emitted when a block job encounters an error.
143
144Data:
145
146- "device": device name (json-string)
147- "operation": I/O operation (json-string, "read" or "write")
148- "action": action that has been taken, it's one of the following (json-string):
149 "ignore": error has been ignored, the job may fail later
150 "report": error will be reported and the job canceled
151 "stop": error caused job to be paused
152
153Example:
154
155{ "event": "BLOCK_JOB_ERROR",
156 "data": { "device": "ide0-hd1",
157 "operation": "write",
158 "action": "stop" },
159 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
160
161BLOCK_JOB_READY
162---------------
163
164Emitted when a block job is ready to complete.
165
166Data:
167
a22d8e47
MA
168- "type": Job type (json-string; "stream" for image streaming
169 "commit" for block commit)
170- "device": Device name (json-string)
171- "len": Maximum progress value (json-int)
172- "offset": Current progress value (json-int)
173 On success this is equal to len.
174 On failure this is less than len.
175- "speed": Rate limit, bytes per second (json-int)
dfab4892
LC
176
177Example:
178
179{ "event": "BLOCK_JOB_READY",
a22d8e47
MA
180 "data": { "device": "drive0", "type": "mirror", "speed": 0,
181 "len": 2097152, "offset": 2097152 }
dfab4892
LC
182 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
183
184Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
185event.
186
187DEVICE_DELETED
188--------------
189
190Emitted whenever the device removal completion is acknowledged
191by the guest.
192At this point, it's safe to reuse the specified device ID.
193Device removal can be initiated by the guest or by HMP/QMP commands.
194
195Data:
196
197- "device": device name (json-string, optional)
198- "path": device path (json-string)
199
200{ "event": "DEVICE_DELETED",
201 "data": { "device": "virtio-net-pci-0",
202 "path": "/machine/peripheral/virtio-net-pci-0" },
203 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
204
205DEVICE_TRAY_MOVED
206-----------------
207
208It's emitted whenever the tray of a removable device is moved by the guest
209or by HMP/QMP commands.
210
211Data:
212
213- "device": device name (json-string)
214- "tray-open": true if the tray has been opened or false if it has been closed
215 (json-bool)
216
217{ "event": "DEVICE_TRAY_MOVED",
218 "data": { "device": "ide1-cd0",
219 "tray-open": true
220 },
221 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
222
d42a0d14
PX
223DUMP_COMPLETED
224--------------
225
226Emitted when the guest has finished one memory dump.
227
228Data:
229
230- "result": DumpQueryResult type described in qapi-schema.json
231- "error": Error message when dump failed. This is only a
232 human-readable string provided when dump failed. It should not be
233 parsed in any way (json-string, optional)
234
235Example:
236
237{ "event": "DUMP_COMPLETED",
238 "data": {"result": {"total": 1090650112, "status": "completed",
239 "completed": 1090650112} } }
240
dfab4892
LC
241GUEST_PANICKED
242--------------
243
244Emitted when guest OS panic is detected.
245
246Data:
247
248- "action": Action that has been taken (json-string, currently always "pause").
249
250Example:
251
252{ "event": "GUEST_PANICKED",
253 "data": { "action": "pause" } }
254
777abdfe 255MEM_UNPLUG_ERROR
bc09e061
ZG
256--------------------
257Emitted when memory hot unplug error occurs.
258
259Data:
260
261- "device": device name (json-string)
262- "msg": Informative message (e.g., reason for the error) (json-string)
263
264Example:
265
777abdfe 266{ "event": "MEM_UNPLUG_ERROR"
bc09e061
ZG
267 "data": { "device": "dimm1",
268 "msg": "acpi: device unplug for unsupported device"
269 },
270 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
271
dfab4892
LC
272NIC_RX_FILTER_CHANGED
273---------------------
274
275The event is emitted once until the query command is executed,
276the first event will always be emitted.
277
278Data:
279
280- "name": net client name (json-string)
281- "path": device path (json-string)
282
283{ "event": "NIC_RX_FILTER_CHANGED",
284 "data": { "name": "vnet0",
285 "path": "/machine/peripheral/vnet0/virtio-backend" },
286 "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
287}
288
db52658b
EB
289POWERDOWN
290---------
291
292Emitted when the Virtual Machine is powered down through the power
293control system, such as via ACPI.
294
295Data: None.
296
297Example:
298
299{ "event": "POWERDOWN",
300 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
301
dfab4892
LC
302QUORUM_FAILURE
303--------------
304
305Emitted by the Quorum block driver if it fails to establish a quorum.
306
307Data:
308
4e855baa
BC
309- "reference": device name if defined else node name.
310- "sector-num": Number of the first sector of the failed read operation.
311- "sectors-count": Failed read operation sector count.
dfab4892
LC
312
313Example:
314
315{ "event": "QUORUM_FAILURE",
4e855baa 316 "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
dfab4892
LC
317 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
318
7f1e7b23
MA
319Note: this event is rate-limited.
320
dfab4892
LC
321QUORUM_REPORT_BAD
322-----------------
323
324Emitted to report a corruption of a Quorum file.
325
326Data:
327
4e855baa
BC
328- "error": Error message (json-string, optional)
329 Only present on failure. This field contains a human-readable
330 error message. There are no semantics other than that the
331 block layer reported an error and clients should not try to
332 interpret the error string.
333- "node-name": The graph node name of the block driver state.
334- "sector-num": Number of the first sector of the failed read operation.
335- "sectors-count": Failed read operation sector count.
dfab4892
LC
336
337Example:
338
339{ "event": "QUORUM_REPORT_BAD",
4e855baa 340 "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
dfab4892
LC
341 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
342
7f1e7b23
MA
343Note: this event is rate-limited.
344
dfab4892
LC
345RESET
346-----
347
1454ac68 348Emitted when the Virtual Machine is reset.
dfab4892
LC
349
350Data: None.
351
352Example:
353
354{ "event": "RESET",
355 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
356
357RESUME
358------
359
360Emitted when the Virtual Machine resumes execution.
361
362Data: None.
363
364Example:
365
366{ "event": "RESUME",
367 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
368
369RTC_CHANGE
370----------
371
372Emitted when the guest changes the RTC time.
373
374Data:
375
376- "offset": Offset between base RTC clock (as specified by -rtc base), and
377new RTC clock value (json-number)
378
379Example:
380
381{ "event": "RTC_CHANGE",
382 "data": { "offset": 78 },
383 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
384
7f1e7b23
MA
385Note: this event is rate-limited.
386
dfab4892
LC
387SHUTDOWN
388--------
389
db52658b
EB
390Emitted when the Virtual Machine has shut down, indicating that qemu
391is about to exit.
dfab4892
LC
392
393Data: None.
394
395Example:
396
397{ "event": "SHUTDOWN",
398 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
399
400Note: If the command-line option "-no-shutdown" has been specified, a STOP
401event will eventually follow the SHUTDOWN event.
402
f8ecd945
EB
403SPICE_CONNECTED
404---------------
dfab4892 405
f8ecd945 406Emitted when a SPICE client connects.
dfab4892
LC
407
408Data:
409
410- "server": Server information (json-object)
411 - "host": IP address (json-string)
412 - "port": port number (json-string)
413 - "family": address family (json-string, "ipv4" or "ipv6")
414- "client": Client information (json-object)
415 - "host": IP address (json-string)
416 - "port": port number (json-string)
417 - "family": address family (json-string, "ipv4" or "ipv6")
418
419Example:
420
421{ "timestamp": {"seconds": 1290688046, "microseconds": 388707},
422 "event": "SPICE_CONNECTED",
423 "data": {
424 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
425 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
426}}
427
f8ecd945
EB
428SPICE_DISCONNECTED
429------------------
430
431Emitted when a SPICE client disconnects.
432
433Data:
434
435- "server": Server information (json-object)
436 - "host": IP address (json-string)
437 - "port": port number (json-string)
438 - "family": address family (json-string, "ipv4" or "ipv6")
439- "client": Client information (json-object)
440 - "host": IP address (json-string)
441 - "port": port number (json-string)
442 - "family": address family (json-string, "ipv4" or "ipv6")
443
444Example:
445
446{ "timestamp": {"seconds": 1290688046, "microseconds": 388707},
447 "event": "SPICE_DISCONNECTED",
448 "data": {
449 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
450 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
451}}
452
dfab4892
LC
453SPICE_INITIALIZED
454-----------------
455
456Emitted after initial handshake and authentication takes place (if any)
1454ac68 457and the SPICE channel is up and running
dfab4892
LC
458
459Data:
460
461- "server": Server information (json-object)
462 - "host": IP address (json-string)
463 - "port": port number (json-string)
464 - "family": address family (json-string, "ipv4" or "ipv6")
465 - "auth": authentication method (json-string, optional)
466- "client": Client information (json-object)
467 - "host": IP address (json-string)
468 - "port": port number (json-string)
469 - "family": address family (json-string, "ipv4" or "ipv6")
470 - "connection-id": spice connection id. All channels with the same id
471 belong to the same spice session (json-int)
472 - "channel-type": channel type. "1" is the main control channel, filter for
473 this one if you want track spice sessions only (json-int)
474 - "channel-id": channel id. Usually "0", might be different needed when
475 multiple channels of the same type exist, such as multiple
476 display channels in a multihead setup (json-int)
477 - "tls": whevener the channel is encrypted (json-bool)
478
479Example:
480
481{ "timestamp": {"seconds": 1290688046, "microseconds": 417172},
482 "event": "SPICE_INITIALIZED",
483 "data": {"server": {"auth": "spice", "port": "5921",
484 "family": "ipv4", "host": "127.0.0.1"},
485 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
486 "connection-id": 1804289383, "host": "127.0.0.1",
487 "channel-id": 0, "tls": true}
488}}
489
5e255004
EB
490SPICE_MIGRATE_COMPLETED
491-----------------------
492
493Emitted when SPICE migration has completed
494
495Data: None.
496
497Example:
498
499{ "timestamp": {"seconds": 1290688046, "microseconds": 417172},
500 "event": "SPICE_MIGRATE_COMPLETED" }
501
598cd2bd
JQ
502MIGRATION
503---------
504
505Emitted when a migration event happens
506
507Data: None.
508
509 - "status": migration status
510 See MigrationStatus in ~/qapi-schema.json for possible values
511
512Example:
513
514{"timestamp": {"seconds": 1432121972, "microseconds": 744001},
515 "event": "MIGRATION", "data": {"status": "completed"}}
5e255004 516
4addcd4f
DDAG
517MIGRATION_PASS
518--------------
519
520Emitted from the source side of a migration at the start of each pass
521(when it syncs the dirty bitmap)
522
523Data: None.
524
525 - "pass": An incrementing count (starting at 1 on the first pass)
526
527Example:
528{"timestamp": {"seconds": 1449669631, "microseconds": 239225},
529 "event": "MIGRATION_PASS", "data": {"pass": 2}}
530
dfab4892
LC
531STOP
532----
533
534Emitted when the Virtual Machine is stopped.
535
536Data: None.
537
538Example:
539
540{ "event": "STOP",
541 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
542
543SUSPEND
544-------
545
546Emitted when guest enters S3 state.
547
548Data: None.
549
550Example:
551
552{ "event": "SUSPEND",
553 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
554
555SUSPEND_DISK
556------------
557
558Emitted when the guest makes a request to enter S4 state.
559
560Data: None.
561
562Example:
563
564{ "event": "SUSPEND_DISK",
565 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
566
567Note: QEMU shuts down when entering S4 state.
568
569VNC_CONNECTED
570-------------
571
572Emitted when a VNC client establishes a connection.
573
574Data:
575
576- "server": Server information (json-object)
577 - "host": IP address (json-string)
578 - "service": port number (json-string)
579 - "family": address family (json-string, "ipv4" or "ipv6")
580 - "auth": authentication method (json-string, optional)
581- "client": Client information (json-object)
582 - "host": IP address (json-string)
583 - "service": port number (json-string)
584 - "family": address family (json-string, "ipv4" or "ipv6")
585
586Example:
587
588{ "event": "VNC_CONNECTED",
589 "data": {
590 "server": { "auth": "sasl", "family": "ipv4",
591 "service": "5901", "host": "0.0.0.0" },
592 "client": { "family": "ipv4", "service": "58425",
593 "host": "127.0.0.1" } },
594 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
595
596
597Note: This event is emitted before any authentication takes place, thus
598the authentication ID is not provided.
599
600VNC_DISCONNECTED
601----------------
602
603Emitted when the connection is closed.
604
605Data:
606
607- "server": Server information (json-object)
608 - "host": IP address (json-string)
609 - "service": port number (json-string)
610 - "family": address family (json-string, "ipv4" or "ipv6")
611 - "auth": authentication method (json-string, optional)
612- "client": Client information (json-object)
613 - "host": IP address (json-string)
614 - "service": port number (json-string)
615 - "family": address family (json-string, "ipv4" or "ipv6")
616 - "x509_dname": TLS dname (json-string, optional)
617 - "sasl_username": SASL username (json-string, optional)
618
619Example:
620
621{ "event": "VNC_DISCONNECTED",
622 "data": {
623 "server": { "auth": "sasl", "family": "ipv4",
624 "service": "5901", "host": "0.0.0.0" },
625 "client": { "family": "ipv4", "service": "58425",
626 "host": "127.0.0.1", "sasl_username": "luiz" } },
627 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
628
629VNC_INITIALIZED
630---------------
631
632Emitted after authentication takes place (if any) and the VNC session is
633made active.
634
635Data:
636
637- "server": Server information (json-object)
638 - "host": IP address (json-string)
639 - "service": port number (json-string)
640 - "family": address family (json-string, "ipv4" or "ipv6")
641 - "auth": authentication method (json-string, optional)
642- "client": Client information (json-object)
643 - "host": IP address (json-string)
644 - "service": port number (json-string)
645 - "family": address family (json-string, "ipv4" or "ipv6")
646 - "x509_dname": TLS dname (json-string, optional)
647 - "sasl_username": SASL username (json-string, optional)
648
649Example:
650
651{ "event": "VNC_INITIALIZED",
652 "data": {
653 "server": { "auth": "sasl", "family": "ipv4",
654 "service": "5901", "host": "0.0.0.0"},
655 "client": { "family": "ipv4", "service": "46089",
656 "host": "127.0.0.1", "sasl_username": "luiz" } },
657 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
658
032badde
EB
659VSERPORT_CHANGE
660---------------
661
662Emitted when the guest opens or closes a virtio-serial port.
663
664Data:
665
666- "id": device identifier of the virtio-serial port (json-string)
667- "open": true if the guest has opened the virtio-serial port (json-bool)
668
669Example:
670
671{ "event": "VSERPORT_CHANGE",
672 "data": { "id": "channel0", "open": true },
673 "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
674
7f1e7b23
MA
675Note: this event is rate-limited separately for each "id".
676
dfab4892
LC
677WAKEUP
678------
679
680Emitted when the guest has woken up from S3 and is running.
681
682Data: None.
683
684Example:
685
686{ "event": "WAKEUP",
687 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
688
689WATCHDOG
690--------
691
692Emitted when the watchdog device's timer is expired.
693
694Data:
695
696- "action": Action that has been taken, it's one of the following (json-string):
697 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
698
699Example:
700
701{ "event": "WATCHDOG",
702 "data": { "action": "reset" },
703 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
704
705Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
706followed respectively by the RESET, SHUTDOWN, or STOP events.
7f1e7b23
MA
707
708Note: this event is rate-limited.