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