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": Device name (json-string)
96 - "len": Maximum progress value (json-int)
97 - "offset": Current progress value (json-int)
98 On success this is equal to len.
99 On failure this is less than len.
100 - "speed": Rate limit, bytes per second (json-int)
104 { "event": "BLOCK_JOB_CANCELLED",
105 "data": { "type": "stream", "device": "virtio-disk0",
106 "len": 10737418240, "offset": 134217728,
108 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
113 Emitted when a block job has completed.
117 - "type": Job type (json-string; "stream" for image streaming
118 "commit" for block commit)
119 - "device": Device name (json-string)
120 - "len": Maximum progress value (json-int)
121 - "offset": Current progress value (json-int)
122 On success this is equal to len.
123 On failure this is less than len.
124 - "speed": Rate limit, bytes per second (json-int)
125 - "error": Error message (json-string, optional)
126 Only present on failure. This field contains a human-readable
127 error message. There are no semantics other than that streaming
128 has failed and clients should not try to interpret the error
133 { "event": "BLOCK_JOB_COMPLETED",
134 "data": { "type": "stream", "device": "virtio-disk0",
135 "len": 10737418240, "offset": 10737418240,
137 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
142 Emitted when a block job encounters an error.
146 - "device": device name (json-string)
147 - "operation": I/O operation (json-string, "read" or "write")
148 - "action": action that has been taken, it's one of the following (json-string):
149 "ignore": error has been ignored, the job may fail later
150 "report": error will be reported and the job canceled
151 "stop": error caused job to be paused
155 { "event": "BLOCK_JOB_ERROR",
156 "data": { "device": "ide0-hd1",
157 "operation": "write",
159 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
164 Emitted when a block job is ready to complete.
168 - "type": Job type (json-string; "stream" for image streaming
169 "commit" for block commit)
170 - "device": Device name (json-string)
171 - "len": Maximum progress value (json-int)
172 - "offset": Current progress value (json-int)
173 On success this is equal to len.
174 On failure this is less than len.
175 - "speed": Rate limit, bytes per second (json-int)
179 { "event": "BLOCK_JOB_READY",
180 "data": { "device": "drive0", "type": "mirror", "speed": 0,
181 "len": 2097152, "offset": 2097152 }
182 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
184 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
190 Emitted whenever the device removal completion is acknowledged
192 At this point, it's safe to reuse the specified device ID.
193 Device removal can be initiated by the guest or by HMP/QMP commands.
197 - "device": device name (json-string, optional)
198 - "path": device path (json-string)
200 { "event": "DEVICE_DELETED",
201 "data": { "device": "virtio-net-pci-0",
202 "path": "/machine/peripheral/virtio-net-pci-0" },
203 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
208 It's emitted whenever the tray of a removable device is moved by the guest
209 or by HMP/QMP commands.
213 - "device": device name (json-string)
214 - "tray-open": true if the tray has been opened or false if it has been closed
217 { "event": "DEVICE_TRAY_MOVED",
218 "data": { "device": "ide1-cd0",
221 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
226 Emitted when guest OS panic is detected.
230 - "action": Action that has been taken (json-string, currently always "pause").
234 { "event": "GUEST_PANICKED",
235 "data": { "action": "pause" } }
239 Emitted when memory hot unplug error occurs.
243 - "device": device name (json-string)
244 - "msg": Informative message (e.g., reason for the error) (json-string)
248 { "event": "MEM_UNPLUG_ERROR"
249 "data": { "device": "dimm1",
250 "msg": "acpi: device unplug for unsupported device"
252 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
254 NIC_RX_FILTER_CHANGED
255 ---------------------
257 The event is emitted once until the query command is executed,
258 the first event will always be emitted.
262 - "name": net client name (json-string)
263 - "path": device path (json-string)
265 { "event": "NIC_RX_FILTER_CHANGED",
266 "data": { "name": "vnet0",
267 "path": "/machine/peripheral/vnet0/virtio-backend" },
268 "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
274 Emitted when the Virtual Machine is powered down through the power
275 control system, such as via ACPI.
281 { "event": "POWERDOWN",
282 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
287 Emitted by the Quorum block driver if it fails to establish a quorum.
291 - "reference": device name if defined else node name.
292 - "sector-num": Number of the first sector of the failed read operation.
293 - "sectors-count": Failed read operation sector count.
297 { "event": "QUORUM_FAILURE",
298 "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
299 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
301 Note: this event is rate-limited.
306 Emitted to report a corruption of a Quorum file.
310 - "error": Error message (json-string, optional)
311 Only present on failure. This field contains a human-readable
312 error message. There are no semantics other than that the
313 block layer reported an error and clients should not try to
314 interpret the error string.
315 - "node-name": The graph node name of the block driver state.
316 - "sector-num": Number of the first sector of the failed read operation.
317 - "sectors-count": Failed read operation sector count.
321 { "event": "QUORUM_REPORT_BAD",
322 "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
323 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
325 Note: this event is rate-limited.
330 Emitted when the Virtual Machine is reset.
337 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
342 Emitted when the Virtual Machine resumes execution.
349 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
354 Emitted when the guest changes the RTC time.
358 - "offset": Offset between base RTC clock (as specified by -rtc base), and
359 new RTC clock value (json-number)
363 { "event": "RTC_CHANGE",
364 "data": { "offset": 78 },
365 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
367 Note: this event is rate-limited.
372 Emitted when the Virtual Machine has shut down, indicating that qemu
379 { "event": "SHUTDOWN",
380 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
382 Note: If the command-line option "-no-shutdown" has been specified, a STOP
383 event will eventually follow the SHUTDOWN event.
388 Emitted when a SPICE client connects.
392 - "server": Server information (json-object)
393 - "host": IP address (json-string)
394 - "port": port number (json-string)
395 - "family": address family (json-string, "ipv4" or "ipv6")
396 - "client": Client information (json-object)
397 - "host": IP address (json-string)
398 - "port": port number (json-string)
399 - "family": address family (json-string, "ipv4" or "ipv6")
403 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
404 "event": "SPICE_CONNECTED",
406 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
407 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
413 Emitted when a SPICE client disconnects.
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 - "client": Client information (json-object)
422 - "host": IP address (json-string)
423 - "port": port number (json-string)
424 - "family": address family (json-string, "ipv4" or "ipv6")
428 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
429 "event": "SPICE_DISCONNECTED",
431 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
432 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
438 Emitted after initial handshake and authentication takes place (if any)
439 and the SPICE channel is up and running
443 - "server": Server information (json-object)
444 - "host": IP address (json-string)
445 - "port": port number (json-string)
446 - "family": address family (json-string, "ipv4" or "ipv6")
447 - "auth": authentication method (json-string, optional)
448 - "client": Client 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 - "connection-id": spice connection id. All channels with the same id
453 belong to the same spice session (json-int)
454 - "channel-type": channel type. "1" is the main control channel, filter for
455 this one if you want track spice sessions only (json-int)
456 - "channel-id": channel id. Usually "0", might be different needed when
457 multiple channels of the same type exist, such as multiple
458 display channels in a multihead setup (json-int)
459 - "tls": whevener the channel is encrypted (json-bool)
463 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
464 "event": "SPICE_INITIALIZED",
465 "data": {"server": {"auth": "spice", "port": "5921",
466 "family": "ipv4", "host": "127.0.0.1"},
467 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
468 "connection-id": 1804289383, "host": "127.0.0.1",
469 "channel-id": 0, "tls": true}
472 SPICE_MIGRATE_COMPLETED
473 -----------------------
475 Emitted when SPICE migration has completed
481 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
482 "event": "SPICE_MIGRATE_COMPLETED" }
487 Emitted when a migration event happens
491 - "status": migration status
492 See MigrationStatus in ~/qapi-schema.json for possible values
496 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
497 "event": "MIGRATION", "data": {"status": "completed"}}
502 Emitted when the Virtual Machine is stopped.
509 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
514 Emitted when guest enters S3 state.
520 { "event": "SUSPEND",
521 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
526 Emitted when the guest makes a request to enter S4 state.
532 { "event": "SUSPEND_DISK",
533 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
535 Note: QEMU shuts down when entering S4 state.
540 Emitted when a VNC client establishes a connection.
544 - "server": Server information (json-object)
545 - "host": IP address (json-string)
546 - "service": port number (json-string)
547 - "family": address family (json-string, "ipv4" or "ipv6")
548 - "auth": authentication method (json-string, optional)
549 - "client": Client information (json-object)
550 - "host": IP address (json-string)
551 - "service": port number (json-string)
552 - "family": address family (json-string, "ipv4" or "ipv6")
556 { "event": "VNC_CONNECTED",
558 "server": { "auth": "sasl", "family": "ipv4",
559 "service": "5901", "host": "0.0.0.0" },
560 "client": { "family": "ipv4", "service": "58425",
561 "host": "127.0.0.1" } },
562 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
565 Note: This event is emitted before any authentication takes place, thus
566 the authentication ID is not provided.
571 Emitted when the connection is closed.
575 - "server": Server information (json-object)
576 - "host": IP address (json-string)
577 - "service": port number (json-string)
578 - "family": address family (json-string, "ipv4" or "ipv6")
579 - "auth": authentication method (json-string, optional)
580 - "client": Client information (json-object)
581 - "host": IP address (json-string)
582 - "service": port number (json-string)
583 - "family": address family (json-string, "ipv4" or "ipv6")
584 - "x509_dname": TLS dname (json-string, optional)
585 - "sasl_username": SASL username (json-string, optional)
589 { "event": "VNC_DISCONNECTED",
591 "server": { "auth": "sasl", "family": "ipv4",
592 "service": "5901", "host": "0.0.0.0" },
593 "client": { "family": "ipv4", "service": "58425",
594 "host": "127.0.0.1", "sasl_username": "luiz" } },
595 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
600 Emitted after authentication takes place (if any) and the VNC session is
605 - "server": Server information (json-object)
606 - "host": IP address (json-string)
607 - "service": port number (json-string)
608 - "family": address family (json-string, "ipv4" or "ipv6")
609 - "auth": authentication method (json-string, optional)
610 - "client": Client information (json-object)
611 - "host": IP address (json-string)
612 - "service": port number (json-string)
613 - "family": address family (json-string, "ipv4" or "ipv6")
614 - "x509_dname": TLS dname (json-string, optional)
615 - "sasl_username": SASL username (json-string, optional)
619 { "event": "VNC_INITIALIZED",
621 "server": { "auth": "sasl", "family": "ipv4",
622 "service": "5901", "host": "0.0.0.0"},
623 "client": { "family": "ipv4", "service": "46089",
624 "host": "127.0.0.1", "sasl_username": "luiz" } },
625 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
630 Emitted when the guest opens or closes a virtio-serial port.
634 - "id": device identifier of the virtio-serial port (json-string)
635 - "open": true if the guest has opened the virtio-serial port (json-bool)
639 { "event": "VSERPORT_CHANGE",
640 "data": { "id": "channel0", "open": true },
641 "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
643 Note: this event is rate-limited separately for each "id".
648 Emitted when the guest has woken up from S3 and is running.
655 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
660 Emitted when the watchdog device's timer is expired.
664 - "action": Action that has been taken, it's one of the following (json-string):
665 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
669 { "event": "WATCHDOG",
670 "data": { "action": "reset" },
671 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
673 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
674 followed respectively by the RESET, SHUTDOWN, or STOP events.
676 Note: this event is rate-limited.