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 } }
31 Note: this event is rate-limited.
36 Emitted when a disk image is being marked corrupt. The image can be
37 identified by its device or node name. The 'device' field is always
38 present for compatibility reasons, but it can be empty ("") if the
39 image does not have a device name associated.
43 - "device": Device name (json-string)
44 - "node-name": Node name (json-string, optional)
45 - "msg": Informative message (e.g., reason for the corruption)
47 - "offset": If the corruption resulted from an image access, this
48 is the host's access offset into the image
50 - "size": If the corruption resulted from an image access, this
51 is the access size (json-int, optional)
55 { "event": "BLOCK_IMAGE_CORRUPTED",
56 "data": { "device": "ide0-hd0", "node-name": "node0",
57 "msg": "Prevented active L1 table overwrite", "offset": 196608,
59 "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
64 Emitted when a disk I/O error occurs.
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
77 { "event": "BLOCK_IO_ERROR",
78 "data": { "device": "ide0-hd1",
81 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
83 Note: If action is "stop", a STOP event will eventually follow the
89 Emitted when a block job has been cancelled.
93 - "type": Job type (json-string; "stream" for image streaming
94 "commit" for block commit)
95 - "device": Job identifier. Originally the device name but other
96 values are allowed since QEMU 2.7 (json-string)
97 - "len": Maximum progress value (json-int)
98 - "offset": Current progress value (json-int)
99 On success this is equal to len.
100 On failure this is less than len.
101 - "speed": Rate limit, bytes per second (json-int)
105 { "event": "BLOCK_JOB_CANCELLED",
106 "data": { "type": "stream", "device": "virtio-disk0",
107 "len": 10737418240, "offset": 134217728,
109 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
114 Emitted when a block job has completed.
118 - "type": Job type (json-string; "stream" for image streaming
119 "commit" for block commit)
120 - "device": Job identifier. Originally the device name but other
121 values are allowed since QEMU 2.7 (json-string)
122 - "len": Maximum progress value (json-int)
123 - "offset": Current progress value (json-int)
124 On success this is equal to len.
125 On failure this is less than len.
126 - "speed": Rate limit, bytes per second (json-int)
127 - "error": Error message (json-string, optional)
128 Only present on failure. This field contains a human-readable
129 error message. There are no semantics other than that streaming
130 has failed and clients should not try to interpret the error
135 { "event": "BLOCK_JOB_COMPLETED",
136 "data": { "type": "stream", "device": "virtio-disk0",
137 "len": 10737418240, "offset": 10737418240,
139 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
144 Emitted when a block job encounters an error.
148 - "device": Job identifier. Originally the device name but other
149 values are allowed since QEMU 2.7 (json-string)
150 - "operation": I/O operation (json-string, "read" or "write")
151 - "action": action that has been taken, it's one of the following (json-string):
152 "ignore": error has been ignored, the job may fail later
153 "report": error will be reported and the job canceled
154 "stop": error caused job to be paused
158 { "event": "BLOCK_JOB_ERROR",
159 "data": { "device": "ide0-hd1",
160 "operation": "write",
162 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
167 Emitted when a block job is ready to complete.
171 - "type": Job type (json-string; "stream" for image streaming
172 "commit" for block commit)
173 - "device": Job identifier. Originally the device name but other
174 values are allowed since QEMU 2.7 (json-string)
175 - "len": Maximum progress value (json-int)
176 - "offset": Current progress value (json-int)
177 On success this is equal to len.
178 On failure this is less than len.
179 - "speed": Rate limit, bytes per second (json-int)
183 { "event": "BLOCK_JOB_READY",
184 "data": { "device": "drive0", "type": "mirror", "speed": 0,
185 "len": 2097152, "offset": 2097152 }
186 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
188 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
194 Emitted whenever the device removal completion is acknowledged
196 At this point, it's safe to reuse the specified device ID.
197 Device removal can be initiated by the guest or by HMP/QMP commands.
201 - "device": device name (json-string, optional)
202 - "path": device path (json-string)
204 { "event": "DEVICE_DELETED",
205 "data": { "device": "virtio-net-pci-0",
206 "path": "/machine/peripheral/virtio-net-pci-0" },
207 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
212 It's emitted whenever the tray of a removable device is moved by the guest
213 or by HMP/QMP commands.
217 - "device": device name (json-string)
218 - "tray-open": true if the tray has been opened or false if it has been closed
221 { "event": "DEVICE_TRAY_MOVED",
222 "data": { "device": "ide1-cd0",
225 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
230 Emitted when the guest has finished one memory dump.
234 - "result": DumpQueryResult type described in qapi-schema.json
235 - "error": Error message when dump failed. This is only a
236 human-readable string provided when dump failed. It should not be
237 parsed in any way (json-string, optional)
241 { "event": "DUMP_COMPLETED",
242 "data": {"result": {"total": 1090650112, "status": "completed",
243 "completed": 1090650112} } }
248 Emitted when guest OS panic is detected.
252 - "action": Action that has been taken (json-string, currently always "pause").
256 { "event": "GUEST_PANICKED",
257 "data": { "action": "pause" } }
261 Emitted when memory hot unplug error occurs.
265 - "device": device name (json-string)
266 - "msg": Informative message (e.g., reason for the error) (json-string)
270 { "event": "MEM_UNPLUG_ERROR"
271 "data": { "device": "dimm1",
272 "msg": "acpi: device unplug for unsupported device"
274 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
276 NIC_RX_FILTER_CHANGED
277 ---------------------
279 The event is emitted once until the query command is executed,
280 the first event will always be emitted.
284 - "name": net client name (json-string)
285 - "path": device path (json-string)
287 { "event": "NIC_RX_FILTER_CHANGED",
288 "data": { "name": "vnet0",
289 "path": "/machine/peripheral/vnet0/virtio-backend" },
290 "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
296 Emitted when the Virtual Machine is powered down through the power
297 control system, such as via ACPI.
303 { "event": "POWERDOWN",
304 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
309 Emitted by the Quorum block driver if it fails to establish a quorum.
313 - "reference": device name if defined else node name.
314 - "sector-num": Number of the first sector of the failed read operation.
315 - "sectors-count": Failed read operation sector count.
319 { "event": "QUORUM_FAILURE",
320 "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
321 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
323 Note: this event is rate-limited.
328 Emitted to report a corruption of a Quorum file.
332 - "type": Quorum operation type
333 - "error": Error message (json-string, optional)
334 Only present on failure. This field contains a human-readable
335 error message. There are no semantics other than that the
336 block layer reported an error and clients should not try to
337 interpret the error string.
338 - "node-name": The graph node name of the block driver state.
339 - "sector-num": Number of the first sector of the failed read operation.
340 - "sectors-count": Failed read operation sector count.
345 { "event": "QUORUM_REPORT_BAD",
346 "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5,
348 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
351 { "event": "QUORUM_REPORT_BAD",
352 "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120,
353 "type": "flush", "error": "Broken pipe" },
354 "timestamp": { "seconds": 1456406829, "microseconds": 291763 } }
356 Note: this event is rate-limited.
361 Emitted when the Virtual Machine is reset.
368 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
373 Emitted when the Virtual Machine resumes execution.
380 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
385 Emitted when the guest changes the RTC time.
389 - "offset": Offset between base RTC clock (as specified by -rtc base), and
390 new RTC clock value (json-number)
394 { "event": "RTC_CHANGE",
395 "data": { "offset": 78 },
396 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
398 Note: this event is rate-limited.
403 Emitted when the Virtual Machine has shut down, indicating that qemu
410 { "event": "SHUTDOWN",
411 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
413 Note: If the command-line option "-no-shutdown" has been specified, a STOP
414 event will eventually follow the SHUTDOWN event.
419 Emitted when a SPICE client connects.
423 - "server": Server information (json-object)
424 - "host": IP address (json-string)
425 - "port": port number (json-string)
426 - "family": address family (json-string, "ipv4" or "ipv6")
427 - "client": Client information (json-object)
428 - "host": IP address (json-string)
429 - "port": port number (json-string)
430 - "family": address family (json-string, "ipv4" or "ipv6")
434 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
435 "event": "SPICE_CONNECTED",
437 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
438 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
444 Emitted when a SPICE client disconnects.
448 - "server": Server information (json-object)
449 - "host": IP address (json-string)
450 - "port": port number (json-string)
451 - "family": address family (json-string, "ipv4" or "ipv6")
452 - "client": Client information (json-object)
453 - "host": IP address (json-string)
454 - "port": port number (json-string)
455 - "family": address family (json-string, "ipv4" or "ipv6")
459 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
460 "event": "SPICE_DISCONNECTED",
462 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
463 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
469 Emitted after initial handshake and authentication takes place (if any)
470 and the SPICE channel is up and running
474 - "server": Server information (json-object)
475 - "host": IP address (json-string)
476 - "port": port number (json-string)
477 - "family": address family (json-string, "ipv4" or "ipv6")
478 - "auth": authentication method (json-string, optional)
479 - "client": Client information (json-object)
480 - "host": IP address (json-string)
481 - "port": port number (json-string)
482 - "family": address family (json-string, "ipv4" or "ipv6")
483 - "connection-id": spice connection id. All channels with the same id
484 belong to the same spice session (json-int)
485 - "channel-type": channel type. "1" is the main control channel, filter for
486 this one if you want track spice sessions only (json-int)
487 - "channel-id": channel id. Usually "0", might be different needed when
488 multiple channels of the same type exist, such as multiple
489 display channels in a multihead setup (json-int)
490 - "tls": whevener the channel is encrypted (json-bool)
494 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
495 "event": "SPICE_INITIALIZED",
496 "data": {"server": {"auth": "spice", "port": "5921",
497 "family": "ipv4", "host": "127.0.0.1"},
498 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
499 "connection-id": 1804289383, "host": "127.0.0.1",
500 "channel-id": 0, "tls": true}
503 SPICE_MIGRATE_COMPLETED
504 -----------------------
506 Emitted when SPICE migration has completed
512 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
513 "event": "SPICE_MIGRATE_COMPLETED" }
518 Emitted when a migration event happens
522 - "status": migration status
523 See MigrationStatus in ~/qapi-schema.json for possible values
527 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
528 "event": "MIGRATION", "data": {"status": "completed"}}
533 Emitted from the source side of a migration at the start of each pass
534 (when it syncs the dirty bitmap)
538 - "pass": An incrementing count (starting at 1 on the first pass)
541 {"timestamp": {"seconds": 1449669631, "microseconds": 239225},
542 "event": "MIGRATION_PASS", "data": {"pass": 2}}
547 Emitted when the Virtual Machine is stopped.
554 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
559 Emitted when guest enters S3 state.
565 { "event": "SUSPEND",
566 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
571 Emitted when the guest makes a request to enter S4 state.
577 { "event": "SUSPEND_DISK",
578 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
580 Note: QEMU shuts down when entering S4 state.
585 Emitted when a VNC client establishes a connection.
589 - "server": Server information (json-object)
590 - "host": IP address (json-string)
591 - "service": port number (json-string)
592 - "family": address family (json-string, "ipv4" or "ipv6")
593 - "auth": authentication method (json-string, optional)
594 - "client": Client information (json-object)
595 - "host": IP address (json-string)
596 - "service": port number (json-string)
597 - "family": address family (json-string, "ipv4" or "ipv6")
601 { "event": "VNC_CONNECTED",
603 "server": { "auth": "sasl", "family": "ipv4",
604 "service": "5901", "host": "0.0.0.0" },
605 "client": { "family": "ipv4", "service": "58425",
606 "host": "127.0.0.1" } },
607 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
610 Note: This event is emitted before any authentication takes place, thus
611 the authentication ID is not provided.
616 Emitted when the connection is closed.
620 - "server": Server information (json-object)
621 - "host": IP address (json-string)
622 - "service": port number (json-string)
623 - "family": address family (json-string, "ipv4" or "ipv6")
624 - "auth": authentication method (json-string, optional)
625 - "client": Client information (json-object)
626 - "host": IP address (json-string)
627 - "service": port number (json-string)
628 - "family": address family (json-string, "ipv4" or "ipv6")
629 - "x509_dname": TLS dname (json-string, optional)
630 - "sasl_username": SASL username (json-string, optional)
634 { "event": "VNC_DISCONNECTED",
636 "server": { "auth": "sasl", "family": "ipv4",
637 "service": "5901", "host": "0.0.0.0" },
638 "client": { "family": "ipv4", "service": "58425",
639 "host": "127.0.0.1", "sasl_username": "luiz" } },
640 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
645 Emitted after authentication takes place (if any) and the VNC session is
650 - "server": Server information (json-object)
651 - "host": IP address (json-string)
652 - "service": port number (json-string)
653 - "family": address family (json-string, "ipv4" or "ipv6")
654 - "auth": authentication method (json-string, optional)
655 - "client": Client information (json-object)
656 - "host": IP address (json-string)
657 - "service": port number (json-string)
658 - "family": address family (json-string, "ipv4" or "ipv6")
659 - "x509_dname": TLS dname (json-string, optional)
660 - "sasl_username": SASL username (json-string, optional)
664 { "event": "VNC_INITIALIZED",
666 "server": { "auth": "sasl", "family": "ipv4",
667 "service": "5901", "host": "0.0.0.0"},
668 "client": { "family": "ipv4", "service": "46089",
669 "host": "127.0.0.1", "sasl_username": "luiz" } },
670 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
675 Emitted when the guest opens or closes a virtio-serial port.
679 - "id": device identifier of the virtio-serial port (json-string)
680 - "open": true if the guest has opened the virtio-serial port (json-bool)
684 { "event": "VSERPORT_CHANGE",
685 "data": { "id": "channel0", "open": true },
686 "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
688 Note: this event is rate-limited separately for each "id".
693 Emitted when the guest has woken up from S3 and is running.
700 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
705 Emitted when the watchdog device's timer is expired.
709 - "action": Action that has been taken, it's one of the following (json-string):
710 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
714 { "event": "WATCHDOG",
715 "data": { "action": "reset" },
716 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
718 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
719 followed respectively by the RESET, SHUTDOWN, or STOP events.
721 Note: this event is rate-limited.