Add qemu 2.4.0
[kvmfornfv.git] / qemu / docs / qmp / qmp-events.txt
1                    QEMU Machine Protocol Events
2                    ============================
3
4 ACPI_DEVICE_OST
5 ---------------
6
7 Emitted 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
14 BALLOON_CHANGE
15 --------------
16
17 Emitted when the guest changes the actual BALLOON level. This
18 value is equivalent to the 'actual' field return by the
19 'query-balloon' command
20
21 Data:
22
23 - "actual": actual level of the guest memory balloon in bytes (json-number)
24
25 Example:
26
27 { "event": "BALLOON_CHANGE",
28     "data": { "actual": 944766976 },
29     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
30
31 BLOCK_IMAGE_CORRUPTED
32 ---------------------
33
34 Emitted when a disk image is being marked corrupt. The image can be
35 identified by its device or node name. The 'device' field is always
36 present for compatibility reasons, but it can be empty ("") if the
37 image does not have a device name associated.
38
39 Data:
40
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
46                is the host's access offset into the image
47                (json-int, optional)
48 - "size":      If the corruption resulted from an image access, this
49                is the access size (json-int, optional)
50
51 Example:
52
53 { "event": "BLOCK_IMAGE_CORRUPTED",
54     "data": { "device": "ide0-hd0", "node-name": "node0",
55         "msg": "Prevented active L1 table overwrite", "offset": 196608,
56         "size": 65536 },
57     "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
58
59 BLOCK_IO_ERROR
60 --------------
61
62 Emitted when a disk I/O error occurs.
63
64 Data:
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
73 Example:
74
75 { "event": "BLOCK_IO_ERROR",
76     "data": { "device": "ide0-hd1",
77               "operation": "write",
78               "action": "stop" },
79     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
80
81 Note: If action is "stop", a STOP event will eventually follow the
82 BLOCK_IO_ERROR event.
83
84 BLOCK_JOB_CANCELLED
85 -------------------
86
87 Emitted when a block job has been cancelled.
88
89 Data:
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
100 Example:
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
108 BLOCK_JOB_COMPLETED
109 -------------------
110
111 Emitted when a block job has completed.
112
113 Data:
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
129 Example:
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
137 BLOCK_JOB_ERROR
138 ---------------
139
140 Emitted when a block job encounters an error.
141
142 Data:
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
151 Example:
152
153 { "event": "BLOCK_JOB_ERROR",
154     "data": { "device": "ide0-hd1",
155               "operation": "write",
156               "action": "stop" },
157     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
158
159 BLOCK_JOB_READY
160 ---------------
161
162 Emitted when a block job is ready to complete.
163
164 Data:
165
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)
174
175 Example:
176
177 { "event": "BLOCK_JOB_READY",
178     "data": { "device": "drive0", "type": "mirror", "speed": 0,
179               "len": 2097152, "offset": 2097152 }
180     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
181
182 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
183 event.
184
185 DEVICE_DELETED
186 --------------
187
188 Emitted whenever the device removal completion is acknowledged
189 by the guest.
190 At this point, it's safe to reuse the specified device ID.
191 Device removal can be initiated by the guest or by HMP/QMP commands.
192
193 Data:
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
203 DEVICE_TRAY_MOVED
204 -----------------
205
206 It's emitted whenever the tray of a removable device is moved by the guest
207 or by HMP/QMP commands.
208
209 Data:
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
221 GUEST_PANICKED
222 --------------
223
224 Emitted when guest OS panic is detected.
225
226 Data:
227
228 - "action": Action that has been taken (json-string, currently always "pause").
229
230 Example:
231
232 { "event": "GUEST_PANICKED",
233      "data": { "action": "pause" } }
234
235 MEM_UNPLUG_ERROR
236 --------------------
237 Emitted when memory hot unplug error occurs.
238
239 Data:
240
241 - "device": device name (json-string)
242 - "msg": Informative message (e.g., reason for the error) (json-string)
243
244 Example:
245
246 { "event": "MEM_UNPLUG_ERROR"
247   "data": { "device": "dimm1",
248             "msg": "acpi: device unplug for unsupported device"
249   },
250   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
251
252 NIC_RX_FILTER_CHANGED
253 ---------------------
254
255 The event is emitted once until the query command is executed,
256 the first event will always be emitted.
257
258 Data:
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
269 POWERDOWN
270 ---------
271
272 Emitted when the Virtual Machine is powered down through the power
273 control system, such as via ACPI.
274
275 Data: None.
276
277 Example:
278
279 { "event": "POWERDOWN",
280     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
281
282 QUORUM_FAILURE
283 --------------
284
285 Emitted by the Quorum block driver if it fails to establish a quorum.
286
287 Data:
288
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.
292
293 Example:
294
295 { "event": "QUORUM_FAILURE",
296      "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
297      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
298
299 QUORUM_REPORT_BAD
300 -----------------
301
302 Emitted to report a corruption of a Quorum file.
303
304 Data:
305
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.
314
315 Example:
316
317 { "event": "QUORUM_REPORT_BAD",
318      "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
319      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
320
321 RESET
322 -----
323
324 Emitted when the Virtual Machine is reset.
325
326 Data: None.
327
328 Example:
329
330 { "event": "RESET",
331     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
332
333 RESUME
334 ------
335
336 Emitted when the Virtual Machine resumes execution.
337
338 Data: None.
339
340 Example:
341
342 { "event": "RESUME",
343     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
344
345 RTC_CHANGE
346 ----------
347
348 Emitted when the guest changes the RTC time.
349
350 Data:
351
352 - "offset": Offset between base RTC clock (as specified by -rtc base), and
353 new RTC clock value (json-number)
354
355 Example:
356
357 { "event": "RTC_CHANGE",
358     "data": { "offset": 78 },
359     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
360
361 SHUTDOWN
362 --------
363
364 Emitted when the Virtual Machine has shut down, indicating that qemu
365 is about to exit.
366
367 Data: None.
368
369 Example:
370
371 { "event": "SHUTDOWN",
372     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
373
374 Note: If the command-line option "-no-shutdown" has been specified, a STOP
375 event will eventually follow the SHUTDOWN event.
376
377 SPICE_CONNECTED
378 ---------------
379
380 Emitted when a SPICE client connects.
381
382 Data:
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
393 Example:
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
402 SPICE_DISCONNECTED
403 ------------------
404
405 Emitted when a SPICE client disconnects.
406
407 Data:
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
418 Example:
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
427 SPICE_INITIALIZED
428 -----------------
429
430 Emitted after initial handshake and authentication takes place (if any)
431 and the SPICE channel is up and running
432
433 Data:
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
453 Example:
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
464 SPICE_MIGRATE_COMPLETED
465 -----------------------
466
467 Emitted when SPICE migration has completed
468
469 Data: None.
470
471 Example:
472
473 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
474   "event": "SPICE_MIGRATE_COMPLETED" }
475
476 MIGRATION
477 ---------
478
479 Emitted when a migration event happens
480
481 Data: None.
482
483  - "status": migration status
484      See MigrationStatus in ~/qapi-schema.json for possible values
485
486 Example:
487
488 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
489  "event": "MIGRATION", "data": {"status": "completed"}}
490
491 STOP
492 ----
493
494 Emitted when the Virtual Machine is stopped.
495
496 Data: None.
497
498 Example:
499
500 { "event": "STOP",
501     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
502
503 SUSPEND
504 -------
505
506 Emitted when guest enters S3 state.
507
508 Data: None.
509
510 Example:
511
512 { "event": "SUSPEND",
513      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
514
515 SUSPEND_DISK
516 ------------
517
518 Emitted when the guest makes a request to enter S4 state.
519
520 Data: None.
521
522 Example:
523
524 { "event": "SUSPEND_DISK",
525      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
526
527 Note: QEMU shuts down when entering S4 state.
528
529 VNC_CONNECTED
530 -------------
531
532 Emitted when a VNC client establishes a connection.
533
534 Data:
535
536 - "server": Server information (json-object)
537   - "host": IP address (json-string)
538   - "service": port number (json-string)
539   - "family": address family (json-string, "ipv4" or "ipv6")
540   - "auth": authentication method (json-string, optional)
541 - "client": Client information (json-object)
542   - "host": IP address (json-string)
543   - "service": port number (json-string)
544   - "family": address family (json-string, "ipv4" or "ipv6")
545
546 Example:
547
548 { "event": "VNC_CONNECTED",
549     "data": {
550         "server": { "auth": "sasl", "family": "ipv4",
551                     "service": "5901", "host": "0.0.0.0" },
552         "client": { "family": "ipv4", "service": "58425",
553                     "host": "127.0.0.1" } },
554     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
555
556
557 Note: This event is emitted before any authentication takes place, thus
558 the authentication ID is not provided.
559
560 VNC_DISCONNECTED
561 ----------------
562
563 Emitted when the connection is closed.
564
565 Data:
566
567 - "server": Server information (json-object)
568   - "host": IP address (json-string)
569   - "service": port number (json-string)
570   - "family": address family (json-string, "ipv4" or "ipv6")
571   - "auth": authentication method (json-string, optional)
572 - "client": Client information (json-object)
573   - "host": IP address (json-string)
574   - "service": port number (json-string)
575   - "family": address family (json-string, "ipv4" or "ipv6")
576   - "x509_dname": TLS dname (json-string, optional)
577   - "sasl_username": SASL username (json-string, optional)
578
579 Example:
580
581 { "event": "VNC_DISCONNECTED",
582     "data": {
583         "server": { "auth": "sasl", "family": "ipv4",
584                     "service": "5901", "host": "0.0.0.0" },
585         "client": { "family": "ipv4", "service": "58425",
586                     "host": "127.0.0.1", "sasl_username": "luiz" } },
587     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
588
589 VNC_INITIALIZED
590 ---------------
591
592 Emitted after authentication takes place (if any) and the VNC session is
593 made active.
594
595 Data:
596
597 - "server": Server information (json-object)
598   - "host": IP address (json-string)
599   - "service": port number (json-string)
600   - "family": address family (json-string, "ipv4" or "ipv6")
601   - "auth": authentication method (json-string, optional)
602 - "client": Client information (json-object)
603   - "host": IP address (json-string)
604   - "service": port number (json-string)
605   - "family": address family (json-string, "ipv4" or "ipv6")
606   - "x509_dname": TLS dname (json-string, optional)
607   - "sasl_username": SASL username (json-string, optional)
608
609 Example:
610
611 { "event": "VNC_INITIALIZED",
612     "data": {
613         "server": { "auth": "sasl", "family": "ipv4",
614                     "service": "5901", "host": "0.0.0.0"},
615         "client": { "family": "ipv4", "service": "46089",
616                     "host": "127.0.0.1", "sasl_username": "luiz" } },
617         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
618
619 VSERPORT_CHANGE
620 ---------------
621
622 Emitted when the guest opens or closes a virtio-serial port.
623
624 Data:
625
626 - "id": device identifier of the virtio-serial port (json-string)
627 - "open": true if the guest has opened the virtio-serial port (json-bool)
628
629 Example:
630
631 { "event": "VSERPORT_CHANGE",
632     "data": { "id": "channel0", "open": true },
633     "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
634
635 WAKEUP
636 ------
637
638 Emitted when the guest has woken up from S3 and is running.
639
640 Data: None.
641
642 Example:
643
644 { "event": "WAKEUP",
645      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
646
647 WATCHDOG
648 --------
649
650 Emitted when the watchdog device's timer is expired.
651
652 Data:
653
654 - "action": Action that has been taken, it's one of the following (json-string):
655             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
656
657 Example:
658
659 { "event": "WATCHDOG",
660      "data": { "action": "reset" },
661      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
662
663 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
664 followed respectively by the RESET, SHUTDOWN, or STOP events.