1 QEMU Machine Protocol Events
2 ============================
7 Emitted when guest executes ACPI _OST method.
9 - data: ACPIOSTInfo type as described in qapi-schema.json
11 { "event": "ACPI_DEVICE_OST",
12 "data": { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0 } }
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
23 - "actual": actual level of the guest memory balloon in bytes (json-number)
27 { "event": "BALLOON_CHANGE",
28 "data": { "actual": 944766976 },
29 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
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.
41 - "device": Device name (json-string)
42 - "node-name": Node name (json-string, optional)
43 - "msg": Informative message (e.g., reason for the corruption)
45 - "offset": If the corruption resulted from an image access, this
46 is the access offset into the image (json-int)
47 - "size": If the corruption resulted from an image access, this
48 is the access size (json-int)
52 { "event": "BLOCK_IMAGE_CORRUPTED",
53 "data": { "device": "ide0-hd0", "node-name": "node0",
54 "msg": "Prevented active L1 table overwrite", "offset": 196608,
56 "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
61 Emitted when a disk I/O error occurs.
65 - "device": device name (json-string)
66 - "operation": I/O operation (json-string, "read" or "write")
67 - "action": action that has been taken, it's one of the following (json-string):
68 "ignore": error has been ignored
69 "report": error has been reported to the device
70 "stop": the VM is going to stop because of the error
74 { "event": "BLOCK_IO_ERROR",
75 "data": { "device": "ide0-hd1",
78 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
80 Note: If action is "stop", a STOP event will eventually follow the
86 Emitted when a block job has been cancelled.
90 - "type": Job type (json-string; "stream" for image streaming
91 "commit" for block commit)
92 - "device": Device name (json-string)
93 - "len": Maximum progress value (json-int)
94 - "offset": Current progress value (json-int)
95 On success this is equal to len.
96 On failure this is less than len.
97 - "speed": Rate limit, bytes per second (json-int)
101 { "event": "BLOCK_JOB_CANCELLED",
102 "data": { "type": "stream", "device": "virtio-disk0",
103 "len": 10737418240, "offset": 134217728,
105 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
110 Emitted when a block job has completed.
114 - "type": Job type (json-string; "stream" for image streaming
115 "commit" for block commit)
116 - "device": Device name (json-string)
117 - "len": Maximum progress value (json-int)
118 - "offset": Current progress value (json-int)
119 On success this is equal to len.
120 On failure this is less than len.
121 - "speed": Rate limit, bytes per second (json-int)
122 - "error": Error message (json-string, optional)
123 Only present on failure. This field contains a human-readable
124 error message. There are no semantics other than that streaming
125 has failed and clients should not try to interpret the error
130 { "event": "BLOCK_JOB_COMPLETED",
131 "data": { "type": "stream", "device": "virtio-disk0",
132 "len": 10737418240, "offset": 10737418240,
134 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
139 Emitted when a block job encounters an error.
143 - "device": device name (json-string)
144 - "operation": I/O operation (json-string, "read" or "write")
145 - "action": action that has been taken, it's one of the following (json-string):
146 "ignore": error has been ignored, the job may fail later
147 "report": error will be reported and the job canceled
148 "stop": error caused job to be paused
152 { "event": "BLOCK_JOB_ERROR",
153 "data": { "device": "ide0-hd1",
154 "operation": "write",
156 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
161 Emitted when a block job is ready to complete.
165 - "type": Job type (json-string; "stream" for image streaming
166 "commit" for block commit)
167 - "device": Device name (json-string)
168 - "len": Maximum progress value (json-int)
169 - "offset": Current progress value (json-int)
170 On success this is equal to len.
171 On failure this is less than len.
172 - "speed": Rate limit, bytes per second (json-int)
176 { "event": "BLOCK_JOB_READY",
177 "data": { "device": "drive0", "type": "mirror", "speed": 0,
178 "len": 2097152, "offset": 2097152 }
179 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
181 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
187 Emitted whenever the device removal completion is acknowledged
189 At this point, it's safe to reuse the specified device ID.
190 Device removal can be initiated by the guest or by HMP/QMP commands.
194 - "device": device name (json-string, optional)
195 - "path": device path (json-string)
197 { "event": "DEVICE_DELETED",
198 "data": { "device": "virtio-net-pci-0",
199 "path": "/machine/peripheral/virtio-net-pci-0" },
200 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
205 It's emitted whenever the tray of a removable device is moved by the guest
206 or by HMP/QMP commands.
210 - "device": device name (json-string)
211 - "tray-open": true if the tray has been opened or false if it has been closed
214 { "event": "DEVICE_TRAY_MOVED",
215 "data": { "device": "ide1-cd0",
218 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
223 Emitted when guest OS panic is detected.
227 - "action": Action that has been taken (json-string, currently always "pause").
231 { "event": "GUEST_PANICKED",
232 "data": { "action": "pause" } }
234 NIC_RX_FILTER_CHANGED
235 ---------------------
237 The event is emitted once until the query command is executed,
238 the first event will always be emitted.
242 - "name": net client name (json-string)
243 - "path": device path (json-string)
245 { "event": "NIC_RX_FILTER_CHANGED",
246 "data": { "name": "vnet0",
247 "path": "/machine/peripheral/vnet0/virtio-backend" },
248 "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
254 Emitted when the Virtual Machine is powered down through the power
255 control system, such as via ACPI.
261 { "event": "POWERDOWN",
262 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
267 Emitted by the Quorum block driver if it fails to establish a quorum.
271 - "reference": device name if defined else node name.
272 - "sector-num": Number of the first sector of the failed read operation.
273 - "sectors-count": Failed read operation sector count.
277 { "event": "QUORUM_FAILURE",
278 "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
279 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
284 Emitted to report a corruption of a Quorum file.
288 - "error": Error message (json-string, optional)
289 Only present on failure. This field contains a human-readable
290 error message. There are no semantics other than that the
291 block layer reported an error and clients should not try to
292 interpret the error string.
293 - "node-name": The graph node name of the block driver state.
294 - "sector-num": Number of the first sector of the failed read operation.
295 - "sectors-count": Failed read operation sector count.
299 { "event": "QUORUM_REPORT_BAD",
300 "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
301 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
306 Emitted when the Virtual Machine is reset.
313 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
318 Emitted when the Virtual Machine resumes execution.
325 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
330 Emitted when the guest changes the RTC time.
334 - "offset": Offset between base RTC clock (as specified by -rtc base), and
335 new RTC clock value (json-number)
339 { "event": "RTC_CHANGE",
340 "data": { "offset": 78 },
341 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
346 Emitted when the Virtual Machine has shut down, indicating that qemu
353 { "event": "SHUTDOWN",
354 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
356 Note: If the command-line option "-no-shutdown" has been specified, a STOP
357 event will eventually follow the SHUTDOWN event.
362 Emitted when a SPICE client connects.
366 - "server": Server information (json-object)
367 - "host": IP address (json-string)
368 - "port": port number (json-string)
369 - "family": address family (json-string, "ipv4" or "ipv6")
370 - "client": Client information (json-object)
371 - "host": IP address (json-string)
372 - "port": port number (json-string)
373 - "family": address family (json-string, "ipv4" or "ipv6")
377 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
378 "event": "SPICE_CONNECTED",
380 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
381 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
387 Emitted when a SPICE client disconnects.
391 - "server": Server information (json-object)
392 - "host": IP address (json-string)
393 - "port": port number (json-string)
394 - "family": address family (json-string, "ipv4" or "ipv6")
395 - "client": Client information (json-object)
396 - "host": IP address (json-string)
397 - "port": port number (json-string)
398 - "family": address family (json-string, "ipv4" or "ipv6")
402 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
403 "event": "SPICE_DISCONNECTED",
405 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
406 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
412 Emitted after initial handshake and authentication takes place (if any)
413 and the SPICE channel is up and running
417 - "server": Server information (json-object)
418 - "host": IP address (json-string)
419 - "port": port number (json-string)
420 - "family": address family (json-string, "ipv4" or "ipv6")
421 - "auth": authentication method (json-string, optional)
422 - "client": Client information (json-object)
423 - "host": IP address (json-string)
424 - "port": port number (json-string)
425 - "family": address family (json-string, "ipv4" or "ipv6")
426 - "connection-id": spice connection id. All channels with the same id
427 belong to the same spice session (json-int)
428 - "channel-type": channel type. "1" is the main control channel, filter for
429 this one if you want track spice sessions only (json-int)
430 - "channel-id": channel id. Usually "0", might be different needed when
431 multiple channels of the same type exist, such as multiple
432 display channels in a multihead setup (json-int)
433 - "tls": whevener the channel is encrypted (json-bool)
437 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
438 "event": "SPICE_INITIALIZED",
439 "data": {"server": {"auth": "spice", "port": "5921",
440 "family": "ipv4", "host": "127.0.0.1"},
441 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
442 "connection-id": 1804289383, "host": "127.0.0.1",
443 "channel-id": 0, "tls": true}
446 SPICE_MIGRATE_COMPLETED
447 -----------------------
449 Emitted when SPICE migration has completed
455 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
456 "event": "SPICE_MIGRATE_COMPLETED" }
462 Emitted when the Virtual Machine is stopped.
469 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
474 Emitted when guest enters S3 state.
480 { "event": "SUSPEND",
481 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
486 Emitted when the guest makes a request to enter S4 state.
492 { "event": "SUSPEND_DISK",
493 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
495 Note: QEMU shuts down when entering S4 state.
500 Emitted when a VNC client establishes a connection.
504 - "server": Server information (json-object)
505 - "host": IP address (json-string)
506 - "service": port number (json-string)
507 - "family": address family (json-string, "ipv4" or "ipv6")
508 - "auth": authentication method (json-string, optional)
509 - "client": Client information (json-object)
510 - "host": IP address (json-string)
511 - "service": port number (json-string)
512 - "family": address family (json-string, "ipv4" or "ipv6")
516 { "event": "VNC_CONNECTED",
518 "server": { "auth": "sasl", "family": "ipv4",
519 "service": "5901", "host": "0.0.0.0" },
520 "client": { "family": "ipv4", "service": "58425",
521 "host": "127.0.0.1" } },
522 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
525 Note: This event is emitted before any authentication takes place, thus
526 the authentication ID is not provided.
531 Emitted when the connection is closed.
535 - "server": Server information (json-object)
536 - "host": IP address (json-string)
537 - "service": port number (json-string)
538 - "family": address family (json-string, "ipv4" or "ipv6")
539 - "auth": authentication method (json-string, optional)
540 - "client": Client information (json-object)
541 - "host": IP address (json-string)
542 - "service": port number (json-string)
543 - "family": address family (json-string, "ipv4" or "ipv6")
544 - "x509_dname": TLS dname (json-string, optional)
545 - "sasl_username": SASL username (json-string, optional)
549 { "event": "VNC_DISCONNECTED",
551 "server": { "auth": "sasl", "family": "ipv4",
552 "service": "5901", "host": "0.0.0.0" },
553 "client": { "family": "ipv4", "service": "58425",
554 "host": "127.0.0.1", "sasl_username": "luiz" } },
555 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
560 Emitted after authentication takes place (if any) and the VNC session is
565 - "server": Server information (json-object)
566 - "host": IP address (json-string)
567 - "service": port number (json-string)
568 - "family": address family (json-string, "ipv4" or "ipv6")
569 - "auth": authentication method (json-string, optional)
570 - "client": Client information (json-object)
571 - "host": IP address (json-string)
572 - "service": port number (json-string)
573 - "family": address family (json-string, "ipv4" or "ipv6")
574 - "x509_dname": TLS dname (json-string, optional)
575 - "sasl_username": SASL username (json-string, optional)
579 { "event": "VNC_INITIALIZED",
581 "server": { "auth": "sasl", "family": "ipv4",
582 "service": "5901", "host": "0.0.0.0"},
583 "client": { "family": "ipv4", "service": "46089",
584 "host": "127.0.0.1", "sasl_username": "luiz" } },
585 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
590 Emitted when the guest opens or closes a virtio-serial port.
594 - "id": device identifier of the virtio-serial port (json-string)
595 - "open": true if the guest has opened the virtio-serial port (json-bool)
599 { "event": "VSERPORT_CHANGE",
600 "data": { "id": "channel0", "open": true },
601 "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
606 Emitted when the guest has woken up from S3 and is running.
613 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
618 Emitted when the watchdog device's timer is expired.
622 - "action": Action that has been taken, it's one of the following (json-string):
623 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
627 { "event": "WATCHDOG",
628 "data": { "action": "reset" },
629 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
631 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
632 followed respectively by the RESET, SHUTDOWN, or STOP events.