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 host's access offset into the image
48 - "size": If the corruption resulted from an image access, this
49 is the access size (json-int, optional)
53 { "event": "BLOCK_IMAGE_CORRUPTED",
54 "data": { "device": "ide0-hd0", "node-name": "node0",
55 "msg": "Prevented active L1 table overwrite", "offset": 196608,
57 "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
62 Emitted when a disk I/O error occurs.
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
75 { "event": "BLOCK_IO_ERROR",
76 "data": { "device": "ide0-hd1",
79 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
81 Note: If action is "stop", a STOP event will eventually follow the
87 Emitted when a block job has been cancelled.
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)
102 { "event": "BLOCK_JOB_CANCELLED",
103 "data": { "type": "stream", "device": "virtio-disk0",
104 "len": 10737418240, "offset": 134217728,
106 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
111 Emitted when a block job has completed.
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
131 { "event": "BLOCK_JOB_COMPLETED",
132 "data": { "type": "stream", "device": "virtio-disk0",
133 "len": 10737418240, "offset": 10737418240,
135 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
140 Emitted when a block job encounters an error.
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
153 { "event": "BLOCK_JOB_ERROR",
154 "data": { "device": "ide0-hd1",
155 "operation": "write",
157 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
162 Emitted when a block job is ready to complete.
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)
177 { "event": "BLOCK_JOB_READY",
178 "data": { "device": "drive0", "type": "mirror", "speed": 0,
179 "len": 2097152, "offset": 2097152 }
180 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
182 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
188 Emitted whenever the device removal completion is acknowledged
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.
195 - "device": device name (json-string, optional)
196 - "path": device path (json-string)
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 } }
206 It's emitted whenever the tray of a removable device is moved by the guest
207 or by HMP/QMP commands.
211 - "device": device name (json-string)
212 - "tray-open": true if the tray has been opened or false if it has been closed
215 { "event": "DEVICE_TRAY_MOVED",
216 "data": { "device": "ide1-cd0",
219 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
224 Emitted when guest OS panic is detected.
228 - "action": Action that has been taken (json-string, currently always "pause").
232 { "event": "GUEST_PANICKED",
233 "data": { "action": "pause" } }
237 Emitted when memory hot unplug error occurs.
241 - "device": device name (json-string)
242 - "msg": Informative message (e.g., reason for the error) (json-string)
246 { "event": "MEM_UNPLUG_ERROR"
247 "data": { "device": "dimm1",
248 "msg": "acpi: device unplug for unsupported device"
250 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
252 NIC_RX_FILTER_CHANGED
253 ---------------------
255 The event is emitted once until the query command is executed,
256 the first event will always be emitted.
260 - "name": net client name (json-string)
261 - "path": device path (json-string)
263 { "event": "NIC_RX_FILTER_CHANGED",
264 "data": { "name": "vnet0",
265 "path": "/machine/peripheral/vnet0/virtio-backend" },
266 "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
272 Emitted when the Virtual Machine is powered down through the power
273 control system, such as via ACPI.
279 { "event": "POWERDOWN",
280 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
285 Emitted by the Quorum block driver if it fails to establish a quorum.
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.
295 { "event": "QUORUM_FAILURE",
296 "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
297 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
302 Emitted to report a corruption of a Quorum file.
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.
317 { "event": "QUORUM_REPORT_BAD",
318 "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
319 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
324 Emitted when the Virtual Machine is reset.
331 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
336 Emitted when the Virtual Machine resumes execution.
343 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
348 Emitted when the guest changes the RTC time.
352 - "offset": Offset between base RTC clock (as specified by -rtc base), and
353 new RTC clock value (json-number)
357 { "event": "RTC_CHANGE",
358 "data": { "offset": 78 },
359 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
364 Emitted when the Virtual Machine has shut down, indicating that qemu
371 { "event": "SHUTDOWN",
372 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
374 Note: If the command-line option "-no-shutdown" has been specified, a STOP
375 event will eventually follow the SHUTDOWN event.
380 Emitted when a SPICE client connects.
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")
395 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
396 "event": "SPICE_CONNECTED",
398 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
399 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
405 Emitted when a SPICE client disconnects.
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")
420 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
421 "event": "SPICE_DISCONNECTED",
423 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
424 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
430 Emitted after initial handshake and authentication takes place (if any)
431 and the SPICE channel is up and running
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)
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}
464 SPICE_MIGRATE_COMPLETED
465 -----------------------
467 Emitted when SPICE migration has completed
473 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
474 "event": "SPICE_MIGRATE_COMPLETED" }
479 Emitted when a migration event happens
483 - "status": migration status
484 See MigrationStatus in ~/qapi-schema.json for possible values
488 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
489 "event": "MIGRATION", "data": {"status": "completed"}}
494 Emitted when the Virtual Machine is stopped.
501 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
506 Emitted when guest enters S3 state.
512 { "event": "SUSPEND",
513 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
518 Emitted when the guest makes a request to enter S4 state.
524 { "event": "SUSPEND_DISK",
525 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
527 Note: QEMU shuts down when entering S4 state.
532 Emitted when a VNC client establishes a connection.
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")
548 { "event": "VNC_CONNECTED",
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 } }
557 Note: This event is emitted before any authentication takes place, thus
558 the authentication ID is not provided.
563 Emitted when the connection is closed.
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)
581 { "event": "VNC_DISCONNECTED",
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 } }
592 Emitted after authentication takes place (if any) and the VNC session is
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)
611 { "event": "VNC_INITIALIZED",
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 } }
622 Emitted when the guest opens or closes a virtio-serial port.
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)
631 { "event": "VSERPORT_CHANGE",
632 "data": { "id": "channel0", "open": true },
633 "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
638 Emitted when the guest has woken up from S3 and is running.
645 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
650 Emitted when the watchdog device's timer is expired.
654 - "action": Action that has been taken, it's one of the following (json-string):
655 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
659 { "event": "WATCHDOG",
660 "data": { "action": "reset" },
661 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
663 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
664 followed respectively by the RESET, SHUTDOWN, or STOP events.