]> git.proxmox.com Git - qemu.git/blame - QMP/qmp-events.txt
Merge remote-tracking branch 'kraxel/seabios-b1c35f2' into staging
[qemu.git] / QMP / qmp-events.txt
CommitLineData
d74c7dfd
LC
1 QEMU Monitor Protocol Events
2 ============================
e2419113 3
cb8900fe
LC
4BALLOON_CHANGE
5--------------
6
7Emitted when the guest changes the actual BALLOON level. This
8value is equivalent to the 'actual' field return by the
9'query-balloon' command
10
11Data:
12
13- "actual": actual level of the guest memory balloon in bytes (json-number)
14
15Example:
16
17{ "event": "BALLOON_CHANGE",
18 "data": { "actual": 944766976 },
19 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
20
d74c7dfd
LC
21BLOCK_IO_ERROR
22--------------
23
24Emitted when a disk I/O error occurs.
25
26Data:
27
28- "device": device name (json-string)
29- "operation": I/O operation (json-string, "read" or "write")
30- "action": action that has been taken, it's one of the following (json-string):
31 "ignore": error has been ignored
32 "report": error has been reported to the device
33 "stop": error caused VM to be stopped
34
35Example:
36
37{ "event": "BLOCK_IO_ERROR",
38 "data": { "device": "ide0-hd1",
39 "operation": "write",
40 "action": "stop" },
41 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
42
43Note: If action is "stop", a STOP event will eventually follow the
44BLOCK_IO_ERROR event.
45
cb8900fe
LC
46BLOCK_JOB_CANCELLED
47-------------------
48
49Emitted when a block job has been cancelled.
50
51Data:
52
ed61fc10
JC
53- "type": Job type (json-string; "stream" for image streaming
54 "commit" for block commit)
cb8900fe
LC
55- "device": Device name (json-string)
56- "len": Maximum progress value (json-int)
57- "offset": Current progress value (json-int)
58 On success this is equal to len.
59 On failure this is less than len.
60- "speed": Rate limit, bytes per second (json-int)
61
62Example:
63
64{ "event": "BLOCK_JOB_CANCELLED",
65 "data": { "type": "stream", "device": "virtio-disk0",
66 "len": 10737418240, "offset": 134217728,
67 "speed": 0 },
68 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
69
70BLOCK_JOB_COMPLETED
71-------------------
72
73Emitted when a block job has completed.
74
75Data:
76
ed61fc10
JC
77- "type": Job type (json-string; "stream" for image streaming
78 "commit" for block commit)
cb8900fe
LC
79- "device": Device name (json-string)
80- "len": Maximum progress value (json-int)
81- "offset": Current progress value (json-int)
82 On success this is equal to len.
83 On failure this is less than len.
84- "speed": Rate limit, bytes per second (json-int)
85- "error": Error message (json-string, optional)
86 Only present on failure. This field contains a human-readable
87 error message. There are no semantics other than that streaming
88 has failed and clients should not try to interpret the error
89 string.
90
91Example:
92
93{ "event": "BLOCK_JOB_COMPLETED",
94 "data": { "type": "stream", "device": "virtio-disk0",
95 "len": 10737418240, "offset": 10737418240,
96 "speed": 0 },
97 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
98
32c81a4a
PB
99BLOCK_JOB_ERROR
100---------------
101
102Emitted when a block job encounters an error.
103
104Data:
105
106- "device": device name (json-string)
107- "operation": I/O operation (json-string, "read" or "write")
108- "action": action that has been taken, it's one of the following (json-string):
109 "ignore": error has been ignored, the job may fail later
110 "report": error will be reported and the job canceled
111 "stop": error caused job to be paused
112
113Example:
114
115{ "event": "BLOCK_JOB_ERROR",
116 "data": { "device": "ide0-hd1",
117 "operation": "write",
118 "action": "stop" },
119 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
120
a66a2a36
PB
121BLOCK_JOB_READY
122---------------
123
124Emitted when a block job is ready to complete.
125
126Data:
127
128- "device": device name (json-string)
129
130Example:
131
132{ "event": "BLOCK_JOB_READY",
133 "data": { "device": "ide0-hd1" },
134 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
135
136Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
137event.
138
6f382ed2
LC
139DEVICE_TRAY_MOVED
140-----------------
141
142It's emitted whenever the tray of a removable device is moved by the guest
143or by HMP/QMP commands.
144
145Data:
146
147- "device": device name (json-string)
148- "tray-open": true if the tray has been opened or false if it has been closed
149 (json-bool)
150
151{ "event": "DEVICE_TRAY_MOVED",
152 "data": { "device": "ide1-cd0",
153 "tray-open": true
154 },
155 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
156
d74c7dfd
LC
157RESET
158-----
159
160Emitted when the Virtual Machine is reseted.
e2419113 161
e2419113
LC
162Data: None.
163
d74c7dfd
LC
164Example:
165
166{ "event": "RESET",
167 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
168
6ed2c484
LC
169RESUME
170------
171
172Emitted when the Virtual Machine resumes execution.
173
174Data: None.
175
176Example:
177
178{ "event": "RESUME",
179 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
180
80cd3478
LC
181RTC_CHANGE
182----------
183
db11571f 184Emitted when the guest changes the RTC time.
80cd3478
LC
185
186Data:
187
188- "offset": delta against the host UTC in seconds (json-number)
189
190Example:
191
192{ "event": "RTC_CHANGE",
193 "data": { "offset": 78 },
194 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
195
d74c7dfd
LC
196SHUTDOWN
197--------
198
199Emitted when the Virtual Machine is powered down.
e2419113 200
e2419113
LC
201Data: None.
202
d74c7dfd
LC
203Example:
204
205{ "event": "SHUTDOWN",
206 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
207
208Note: If the command-line option "-no-shutdown" has been specified, a STOP
209event will eventually follow the SHUTDOWN event.
210
cb8900fe
LC
211SPICE_CONNECTED, SPICE_DISCONNECTED
212-----------------------------------
213
214Emitted when a SPICE client connects or disconnects.
215
216Data:
217
218- "server": Server information (json-object)
219 - "host": IP address (json-string)
220 - "port": port number (json-string)
221 - "family": address family (json-string, "ipv4" or "ipv6")
222- "client": Client information (json-object)
223 - "host": IP address (json-string)
224 - "port": port number (json-string)
225 - "family": address family (json-string, "ipv4" or "ipv6")
226
227Example:
228
229{ "timestamp": {"seconds": 1290688046, "microseconds": 388707},
230 "event": "SPICE_CONNECTED",
231 "data": {
232 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
233 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
234}}
235
236SPICE_INITIALIZED
237-----------------
238
239Emitted after initial handshake and authentication takes place (if any)
240and the SPICE channel is up'n'running
241
242Data:
243
244- "server": Server information (json-object)
245 - "host": IP address (json-string)
246 - "port": port number (json-string)
247 - "family": address family (json-string, "ipv4" or "ipv6")
248 - "auth": authentication method (json-string, optional)
249- "client": Client information (json-object)
250 - "host": IP address (json-string)
251 - "port": port number (json-string)
252 - "family": address family (json-string, "ipv4" or "ipv6")
253 - "connection-id": spice connection id. All channels with the same id
254 belong to the same spice session (json-int)
255 - "channel-type": channel type. "1" is the main control channel, filter for
256 this one if you want track spice sessions only (json-int)
257 - "channel-id": channel id. Usually "0", might be different needed when
258 multiple channels of the same type exist, such as multiple
259 display channels in a multihead setup (json-int)
260 - "tls": whevener the channel is encrypted (json-bool)
261
262Example:
263
264{ "timestamp": {"seconds": 1290688046, "microseconds": 417172},
265 "event": "SPICE_INITIALIZED",
266 "data": {"server": {"auth": "spice", "port": "5921",
267 "family": "ipv4", "host": "127.0.0.1"},
268 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
269 "connection-id": 1804289383, "host": "127.0.0.1",
270 "channel-id": 0, "tls": true}
271}}
272
d74c7dfd
LC
273STOP
274----
275
276Emitted when the Virtual Machine is stopped.
e2419113 277
e2419113
LC
278Data: None.
279
d74c7dfd 280Example:
586153d9 281
7af72c24 282{ "event": "STOP",
d74c7dfd 283 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
0d72f3d3 284
67e3cf26
LC
285SUSPEND
286-------
287
288Emitted when guest enters S3 state.
289
290Data: None.
291
292Example:
293
294{ "event": "SUSPEND",
295 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
296
25df49f6
LC
297SUSPEND_DISK
298------------
299
300Emitted when the guest makes a request to enter S4 state.
301
302Data: None.
303
304Example:
305
306{ "event": "SUSPEND_DISK",
307 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
308
309Note: QEMU shuts down when entering S4 state.
310
d74c7dfd
LC
311VNC_CONNECTED
312-------------
0d72f3d3 313
d74c7dfd
LC
314Emitted when a VNC client establishes a connection.
315
316Data:
317
318- "server": Server information (json-object)
319 - "host": IP address (json-string)
320 - "service": port number (json-string)
321 - "family": address family (json-string, "ipv4" or "ipv6")
322 - "auth": authentication method (json-string, optional)
323- "client": Client information (json-object)
324 - "host": IP address (json-string)
325 - "service": port number (json-string)
326 - "family": address family (json-string, "ipv4" or "ipv6")
327
328Example:
0d2ed46a 329
d74c7dfd
LC
330{ "event": "VNC_CONNECTED",
331 "data": {
332 "server": { "auth": "sasl", "family": "ipv4",
333 "service": "5901", "host": "0.0.0.0" },
334 "client": { "family": "ipv4", "service": "58425",
335 "host": "127.0.0.1" } },
336 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
0d2ed46a 337
aa1db6ed 338
d74c7dfd
LC
339Note: This event is emitted before any authentication takes place, thus
340the authentication ID is not provided.
341
342VNC_DISCONNECTED
aa1db6ed
LC
343----------------
344
dee3bffc 345Emitted when the connection is closed.
d74c7dfd 346
aa1db6ed
LC
347Data:
348
d74c7dfd
LC
349- "server": Server information (json-object)
350 - "host": IP address (json-string)
351 - "service": port number (json-string)
352 - "family": address family (json-string, "ipv4" or "ipv6")
353 - "auth": authentication method (json-string, optional)
354- "client": Client information (json-object)
355 - "host": IP address (json-string)
356 - "service": port number (json-string)
357 - "family": address family (json-string, "ipv4" or "ipv6")
358 - "x509_dname": TLS dname (json-string, optional)
359 - "sasl_username": SASL username (json-string, optional)
aa1db6ed
LC
360
361Example:
362
d74c7dfd
LC
363{ "event": "VNC_DISCONNECTED",
364 "data": {
365 "server": { "auth": "sasl", "family": "ipv4",
366 "service": "5901", "host": "0.0.0.0" },
367 "client": { "family": "ipv4", "service": "58425",
368 "host": "127.0.0.1", "sasl_username": "luiz" } },
369 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
370
371VNC_INITIALIZED
372---------------
373
374Emitted after authentication takes place (if any) and the VNC session is
375made active.
376
377Data:
378
379- "server": Server information (json-object)
380 - "host": IP address (json-string)
381 - "service": port number (json-string)
382 - "family": address family (json-string, "ipv4" or "ipv6")
383 - "auth": authentication method (json-string, optional)
384- "client": Client information (json-object)
385 - "host": IP address (json-string)
386 - "service": port number (json-string)
387 - "family": address family (json-string, "ipv4" or "ipv6")
388 - "x509_dname": TLS dname (json-string, optional)
389 - "sasl_username": SASL username (json-string, optional)
390
391Example:
392
393{ "event": "VNC_INITIALIZED",
394 "data": {
395 "server": { "auth": "sasl", "family": "ipv4",
396 "service": "5901", "host": "0.0.0.0"},
397 "client": { "family": "ipv4", "service": "46089",
398 "host": "127.0.0.1", "sasl_username": "luiz" } },
399 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
9eedeb3b 400
17c8660b
LC
401WAKEUP
402------
403
404Emitted when the guest has woken up from S3 and is running.
405
406Data: None.
407
408Example:
409
410{ "event": "WATCHDOG",
411 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
412
9eedeb3b
LC
413WATCHDOG
414--------
415
416Emitted when the watchdog device's timer is expired.
417
418Data:
419
420- "action": Action that has been taken, it's one of the following (json-string):
421 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
422
423Example:
424
425{ "event": "WATCHDOG",
426 "data": { "action": "reset" },
427 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
428
429Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
430followed respectively by the RESET, SHUTDOWN, or STOP events.