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 I/O error occurs.
40 - "device": device name. This is always present for compatibility
41 reasons, but it can be empty ("") if the image does not
42 have a device name associated. (json-string)
43 - "node-name": node name. Note that errors may be reported for the root node
44 that is directly attached to a guest device rather than for the
45 node where the error occurred. (json-string)
46 - "operation": I/O operation (json-string, "read" or "write")
47 - "action": action that has been taken, it's one of the following (json-string):
48 "ignore": error has been ignored
49 "report": error has been reported to the device
50 "stop": the VM is going to stop because of the error
54 { "event": "BLOCK_IO_ERROR",
55 "data": { "device": "ide0-hd1",
56 "node-name": "#block212",
59 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
61 Note: If action is "stop", a STOP event will eventually follow the
67 Emitted when a block job has been cancelled.
71 - "type": Job type (json-string; "stream" for image streaming
72 "commit" for block commit)
73 - "device": Job identifier. Originally the device name but other
74 values are allowed since QEMU 2.7 (json-string)
75 - "len": Maximum progress value (json-int)
76 - "offset": Current progress value (json-int)
77 On success this is equal to len.
78 On failure this is less than len.
79 - "speed": Rate limit, bytes per second (json-int)
83 { "event": "BLOCK_JOB_CANCELLED",
84 "data": { "type": "stream", "device": "virtio-disk0",
85 "len": 10737418240, "offset": 134217728,
87 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
92 Emitted when a block job has completed.
96 - "type": Job type (json-string; "stream" for image streaming
97 "commit" for block commit)
98 - "device": Job identifier. Originally the device name but other
99 values are allowed since QEMU 2.7 (json-string)
100 - "len": Maximum progress value (json-int)
101 - "offset": Current progress value (json-int)
102 On success this is equal to len.
103 On failure this is less than len.
104 - "speed": Rate limit, bytes per second (json-int)
105 - "error": Error message (json-string, optional)
106 Only present on failure. This field contains a human-readable
107 error message. There are no semantics other than that streaming
108 has failed and clients should not try to interpret the error
113 { "event": "BLOCK_JOB_COMPLETED",
114 "data": { "type": "stream", "device": "virtio-disk0",
115 "len": 10737418240, "offset": 10737418240,
117 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
122 Emitted when a block job encounters an error.
126 - "device": Job identifier. Originally the device name but other
127 values are allowed since QEMU 2.7 (json-string)
128 - "operation": I/O operation (json-string, "read" or "write")
129 - "action": action that has been taken, it's one of the following (json-string):
130 "ignore": error has been ignored, the job may fail later
131 "report": error will be reported and the job canceled
132 "stop": error caused job to be paused
136 { "event": "BLOCK_JOB_ERROR",
137 "data": { "device": "ide0-hd1",
138 "operation": "write",
140 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
145 Emitted when a block job is ready to complete.
149 - "type": Job type (json-string; "stream" for image streaming
150 "commit" for block commit)
151 - "device": Job identifier. Originally the device name but other
152 values are allowed since QEMU 2.7 (json-string)
153 - "len": Maximum progress value (json-int)
154 - "offset": Current progress value (json-int)
155 On success this is equal to len.
156 On failure this is less than len.
157 - "speed": Rate limit, bytes per second (json-int)
161 { "event": "BLOCK_JOB_READY",
162 "data": { "device": "drive0", "type": "mirror", "speed": 0,
163 "len": 2097152, "offset": 2097152 }
164 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
166 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
172 Emitted whenever the device removal completion is acknowledged
174 At this point, it's safe to reuse the specified device ID.
175 Device removal can be initiated by the guest or by HMP/QMP commands.
179 - "device": device name (json-string, optional)
180 - "path": device path (json-string)
182 { "event": "DEVICE_DELETED",
183 "data": { "device": "virtio-net-pci-0",
184 "path": "/machine/peripheral/virtio-net-pci-0" },
185 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
190 It's emitted whenever the tray of a removable device is moved by the guest
191 or by HMP/QMP commands.
195 - "device": Block device name. This is always present for compatibility
196 reasons, but it can be empty ("") if the image does not have a
197 device name associated. (json-string)
198 - "id": The name or QOM path of the guest device (json-string)
199 - "tray-open": true if the tray has been opened or false if it has been closed
202 { "event": "DEVICE_TRAY_MOVED",
203 "data": { "device": "ide1-cd0",
204 "id": "/machine/unattached/device[22]",
207 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
212 Emitted when the guest has finished one memory dump.
216 - "result": DumpQueryResult type described in qapi-schema.json
217 - "error": Error message when dump failed. This is only a
218 human-readable string provided when dump failed. It should not be
219 parsed in any way (json-string, optional)
223 { "event": "DUMP_COMPLETED",
224 "data": {"result": {"total": 1090650112, "status": "completed",
225 "completed": 1090650112} } }
230 Emitted when guest OS panic is detected.
234 - "action": Action that has been taken (json-string, currently always "pause").
238 { "event": "GUEST_PANICKED",
239 "data": { "action": "pause" } }
243 Emitted when memory hot unplug error occurs.
247 - "device": device name (json-string)
248 - "msg": Informative message (e.g., reason for the error) (json-string)
252 { "event": "MEM_UNPLUG_ERROR"
253 "data": { "device": "dimm1",
254 "msg": "acpi: device unplug for unsupported device"
256 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
258 NIC_RX_FILTER_CHANGED
259 ---------------------
261 The event is emitted once until the query command is executed,
262 the first event will always be emitted.
266 - "name": net client name (json-string)
267 - "path": device path (json-string)
269 { "event": "NIC_RX_FILTER_CHANGED",
270 "data": { "name": "vnet0",
271 "path": "/machine/peripheral/vnet0/virtio-backend" },
272 "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
278 Emitted when the Virtual Machine is powered down through the power
279 control system, such as via ACPI.
285 { "event": "POWERDOWN",
286 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
291 Emitted by the Quorum block driver if it fails to establish a quorum.
295 - "reference": device name if defined else node name.
296 - "sector-num": Number of the first sector of the failed read operation.
297 - "sectors-count": Failed read operation sector count.
301 { "event": "QUORUM_FAILURE",
302 "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
303 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
305 Note: this event is rate-limited.
310 Emitted to report a corruption of a Quorum file.
314 - "type": Quorum operation type
315 - "error": Error message (json-string, optional)
316 Only present on failure. This field contains a human-readable
317 error message. There are no semantics other than that the
318 block layer reported an error and clients should not try to
319 interpret the error string.
320 - "node-name": The graph node name of the block driver state.
321 - "sector-num": Number of the first sector of the failed read operation.
322 - "sectors-count": Failed read operation sector count.
327 { "event": "QUORUM_REPORT_BAD",
328 "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5,
330 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
333 { "event": "QUORUM_REPORT_BAD",
334 "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120,
335 "type": "flush", "error": "Broken pipe" },
336 "timestamp": { "seconds": 1456406829, "microseconds": 291763 } }
338 Note: this event is rate-limited.
343 Emitted when the Virtual Machine is reset.
350 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
355 Emitted when the Virtual Machine resumes execution.
362 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
367 Emitted when the guest changes the RTC time.
371 - "offset": Offset between base RTC clock (as specified by -rtc base), and
372 new RTC clock value (json-number)
376 { "event": "RTC_CHANGE",
377 "data": { "offset": 78 },
378 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
380 Note: this event is rate-limited.
385 Emitted when the Virtual Machine has shut down, indicating that qemu
392 { "event": "SHUTDOWN",
393 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
395 Note: If the command-line option "-no-shutdown" has been specified, a STOP
396 event will eventually follow the SHUTDOWN event.
401 Emitted when a SPICE client connects.
405 - "server": Server information (json-object)
406 - "host": IP address (json-string)
407 - "port": port number (json-string)
408 - "family": address family (json-string, "ipv4" or "ipv6")
409 - "client": Client information (json-object)
410 - "host": IP address (json-string)
411 - "port": port number (json-string)
412 - "family": address family (json-string, "ipv4" or "ipv6")
416 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
417 "event": "SPICE_CONNECTED",
419 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
420 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
426 Emitted when a SPICE client disconnects.
430 - "server": Server information (json-object)
431 - "host": IP address (json-string)
432 - "port": port number (json-string)
433 - "family": address family (json-string, "ipv4" or "ipv6")
434 - "client": Client information (json-object)
435 - "host": IP address (json-string)
436 - "port": port number (json-string)
437 - "family": address family (json-string, "ipv4" or "ipv6")
441 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
442 "event": "SPICE_DISCONNECTED",
444 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
445 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
451 Emitted after initial handshake and authentication takes place (if any)
452 and the SPICE channel is up and running
456 - "server": Server information (json-object)
457 - "host": IP address (json-string)
458 - "port": port number (json-string)
459 - "family": address family (json-string, "ipv4" or "ipv6")
460 - "auth": authentication method (json-string, optional)
461 - "client": Client 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 - "connection-id": spice connection id. All channels with the same id
466 belong to the same spice session (json-int)
467 - "channel-type": channel type. "1" is the main control channel, filter for
468 this one if you want track spice sessions only (json-int)
469 - "channel-id": channel id. Usually "0", might be different needed when
470 multiple channels of the same type exist, such as multiple
471 display channels in a multihead setup (json-int)
472 - "tls": whevener the channel is encrypted (json-bool)
476 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
477 "event": "SPICE_INITIALIZED",
478 "data": {"server": {"auth": "spice", "port": "5921",
479 "family": "ipv4", "host": "127.0.0.1"},
480 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
481 "connection-id": 1804289383, "host": "127.0.0.1",
482 "channel-id": 0, "tls": true}
485 SPICE_MIGRATE_COMPLETED
486 -----------------------
488 Emitted when SPICE migration has completed
494 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
495 "event": "SPICE_MIGRATE_COMPLETED" }
500 Emitted when a migration event happens
504 - "status": migration status
505 See MigrationStatus in ~/qapi-schema.json for possible values
509 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
510 "event": "MIGRATION", "data": {"status": "completed"}}
515 Emitted from the source side of a migration at the start of each pass
516 (when it syncs the dirty bitmap)
520 - "pass": An incrementing count (starting at 1 on the first pass)
523 {"timestamp": {"seconds": 1449669631, "microseconds": 239225},
524 "event": "MIGRATION_PASS", "data": {"pass": 2}}
529 Emitted when the Virtual Machine is stopped.
536 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
541 Emitted when guest enters S3 state.
547 { "event": "SUSPEND",
548 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
553 Emitted when the guest makes a request to enter S4 state.
559 { "event": "SUSPEND_DISK",
560 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
562 Note: QEMU shuts down when entering S4 state.
567 Emitted when a VNC client establishes a connection.
571 - "server": Server information (json-object)
572 - "host": IP address (json-string)
573 - "service": port number (json-string)
574 - "family": address family (json-string, "ipv4" or "ipv6")
575 - "auth": authentication method (json-string, optional)
576 - "client": Client information (json-object)
577 - "host": IP address (json-string)
578 - "service": port number (json-string)
579 - "family": address family (json-string, "ipv4" or "ipv6")
583 { "event": "VNC_CONNECTED",
585 "server": { "auth": "sasl", "family": "ipv4",
586 "service": "5901", "host": "0.0.0.0" },
587 "client": { "family": "ipv4", "service": "58425",
588 "host": "127.0.0.1" } },
589 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
592 Note: This event is emitted before any authentication takes place, thus
593 the authentication ID is not provided.
598 Emitted when the connection is closed.
602 - "server": Server 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 - "auth": authentication method (json-string, optional)
607 - "client": Client 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 - "x509_dname": TLS dname (json-string, optional)
612 - "sasl_username": SASL username (json-string, optional)
616 { "event": "VNC_DISCONNECTED",
618 "server": { "auth": "sasl", "family": "ipv4",
619 "service": "5901", "host": "0.0.0.0" },
620 "client": { "family": "ipv4", "service": "58425",
621 "host": "127.0.0.1", "sasl_username": "luiz" } },
622 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
627 Emitted after authentication takes place (if any) and the VNC session is
632 - "server": Server information (json-object)
633 - "host": IP address (json-string)
634 - "service": port number (json-string)
635 - "family": address family (json-string, "ipv4" or "ipv6")
636 - "auth": authentication method (json-string, optional)
637 - "client": Client 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 - "x509_dname": TLS dname (json-string, optional)
642 - "sasl_username": SASL username (json-string, optional)
646 { "event": "VNC_INITIALIZED",
648 "server": { "auth": "sasl", "family": "ipv4",
649 "service": "5901", "host": "0.0.0.0"},
650 "client": { "family": "ipv4", "service": "46089",
651 "host": "127.0.0.1", "sasl_username": "luiz" } },
652 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
657 Emitted when the guest opens or closes a virtio-serial port.
661 - "id": device identifier of the virtio-serial port (json-string)
662 - "open": true if the guest has opened the virtio-serial port (json-bool)
666 { "event": "VSERPORT_CHANGE",
667 "data": { "id": "channel0", "open": true },
668 "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
670 Note: this event is rate-limited separately for each "id".
675 Emitted when the guest has woken up from S3 and is running.
682 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
687 Emitted when the watchdog device's timer is expired.
691 - "action": Action that has been taken, it's one of the following (json-string):
692 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
696 { "event": "WATCHDOG",
697 "data": { "action": "reset" },
698 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
700 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
701 followed respectively by the RESET, SHUTDOWN, or STOP events.
703 Note: this event is rate-limited.