]> git.proxmox.com Git - qemu.git/blame - QMP/qmp-events.txt
qmp: qmp-events.txt: add missing doc for the SUSPEND event
[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
53- "type": Job type ("stream" for image streaming, json-string)
54- "device": Device name (json-string)
55- "len": Maximum progress value (json-int)
56- "offset": Current progress value (json-int)
57 On success this is equal to len.
58 On failure this is less than len.
59- "speed": Rate limit, bytes per second (json-int)
60
61Example:
62
63{ "event": "BLOCK_JOB_CANCELLED",
64 "data": { "type": "stream", "device": "virtio-disk0",
65 "len": 10737418240, "offset": 134217728,
66 "speed": 0 },
67 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
68
69BLOCK_JOB_COMPLETED
70-------------------
71
72Emitted when a block job has completed.
73
74Data:
75
76- "type": Job type ("stream" for image streaming, json-string)
77- "device": Device name (json-string)
78- "len": Maximum progress value (json-int)
79- "offset": Current progress value (json-int)
80 On success this is equal to len.
81 On failure this is less than len.
82- "speed": Rate limit, bytes per second (json-int)
83- "error": Error message (json-string, optional)
84 Only present on failure. This field contains a human-readable
85 error message. There are no semantics other than that streaming
86 has failed and clients should not try to interpret the error
87 string.
88
89Example:
90
91{ "event": "BLOCK_JOB_COMPLETED",
92 "data": { "type": "stream", "device": "virtio-disk0",
93 "len": 10737418240, "offset": 10737418240,
94 "speed": 0 },
95 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
96
6f382ed2
LC
97DEVICE_TRAY_MOVED
98-----------------
99
100It's emitted whenever the tray of a removable device is moved by the guest
101or by HMP/QMP commands.
102
103Data:
104
105- "device": device name (json-string)
106- "tray-open": true if the tray has been opened or false if it has been closed
107 (json-bool)
108
109{ "event": "DEVICE_TRAY_MOVED",
110 "data": { "device": "ide1-cd0",
111 "tray-open": true
112 },
113 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
114
d74c7dfd
LC
115RESET
116-----
117
118Emitted when the Virtual Machine is reseted.
e2419113 119
e2419113
LC
120Data: None.
121
d74c7dfd
LC
122Example:
123
124{ "event": "RESET",
125 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
126
6ed2c484
LC
127RESUME
128------
129
130Emitted when the Virtual Machine resumes execution.
131
132Data: None.
133
134Example:
135
136{ "event": "RESUME",
137 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
138
80cd3478
LC
139RTC_CHANGE
140----------
141
db11571f 142Emitted when the guest changes the RTC time.
80cd3478
LC
143
144Data:
145
146- "offset": delta against the host UTC in seconds (json-number)
147
148Example:
149
150{ "event": "RTC_CHANGE",
151 "data": { "offset": 78 },
152 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
153
d74c7dfd
LC
154SHUTDOWN
155--------
156
157Emitted when the Virtual Machine is powered down.
e2419113 158
e2419113
LC
159Data: None.
160
d74c7dfd
LC
161Example:
162
163{ "event": "SHUTDOWN",
164 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
165
166Note: If the command-line option "-no-shutdown" has been specified, a STOP
167event will eventually follow the SHUTDOWN event.
168
cb8900fe
LC
169SPICE_CONNECTED, SPICE_DISCONNECTED
170-----------------------------------
171
172Emitted when a SPICE client connects or disconnects.
173
174Data:
175
176- "server": Server information (json-object)
177 - "host": IP address (json-string)
178 - "port": port number (json-string)
179 - "family": address family (json-string, "ipv4" or "ipv6")
180- "client": Client information (json-object)
181 - "host": IP address (json-string)
182 - "port": port number (json-string)
183 - "family": address family (json-string, "ipv4" or "ipv6")
184
185Example:
186
187{ "timestamp": {"seconds": 1290688046, "microseconds": 388707},
188 "event": "SPICE_CONNECTED",
189 "data": {
190 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
191 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
192}}
193
194SPICE_INITIALIZED
195-----------------
196
197Emitted after initial handshake and authentication takes place (if any)
198and the SPICE channel is up'n'running
199
200Data:
201
202- "server": Server information (json-object)
203 - "host": IP address (json-string)
204 - "port": port number (json-string)
205 - "family": address family (json-string, "ipv4" or "ipv6")
206 - "auth": authentication method (json-string, optional)
207- "client": Client information (json-object)
208 - "host": IP address (json-string)
209 - "port": port number (json-string)
210 - "family": address family (json-string, "ipv4" or "ipv6")
211 - "connection-id": spice connection id. All channels with the same id
212 belong to the same spice session (json-int)
213 - "channel-type": channel type. "1" is the main control channel, filter for
214 this one if you want track spice sessions only (json-int)
215 - "channel-id": channel id. Usually "0", might be different needed when
216 multiple channels of the same type exist, such as multiple
217 display channels in a multihead setup (json-int)
218 - "tls": whevener the channel is encrypted (json-bool)
219
220Example:
221
222{ "timestamp": {"seconds": 1290688046, "microseconds": 417172},
223 "event": "SPICE_INITIALIZED",
224 "data": {"server": {"auth": "spice", "port": "5921",
225 "family": "ipv4", "host": "127.0.0.1"},
226 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
227 "connection-id": 1804289383, "host": "127.0.0.1",
228 "channel-id": 0, "tls": true}
229}}
230
d74c7dfd
LC
231STOP
232----
233
234Emitted when the Virtual Machine is stopped.
e2419113 235
e2419113
LC
236Data: None.
237
d74c7dfd 238Example:
586153d9 239
7af72c24 240{ "event": "STOP",
d74c7dfd 241 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
0d72f3d3 242
67e3cf26
LC
243SUSPEND
244-------
245
246Emitted when guest enters S3 state.
247
248Data: None.
249
250Example:
251
252{ "event": "SUSPEND",
253 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
254
d74c7dfd
LC
255VNC_CONNECTED
256-------------
0d72f3d3 257
d74c7dfd
LC
258Emitted when a VNC client establishes a connection.
259
260Data:
261
262- "server": Server information (json-object)
263 - "host": IP address (json-string)
264 - "service": port number (json-string)
265 - "family": address family (json-string, "ipv4" or "ipv6")
266 - "auth": authentication method (json-string, optional)
267- "client": Client information (json-object)
268 - "host": IP address (json-string)
269 - "service": port number (json-string)
270 - "family": address family (json-string, "ipv4" or "ipv6")
271
272Example:
0d2ed46a 273
d74c7dfd
LC
274{ "event": "VNC_CONNECTED",
275 "data": {
276 "server": { "auth": "sasl", "family": "ipv4",
277 "service": "5901", "host": "0.0.0.0" },
278 "client": { "family": "ipv4", "service": "58425",
279 "host": "127.0.0.1" } },
280 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
0d2ed46a 281
aa1db6ed 282
d74c7dfd
LC
283Note: This event is emitted before any authentication takes place, thus
284the authentication ID is not provided.
285
286VNC_DISCONNECTED
aa1db6ed
LC
287----------------
288
dee3bffc 289Emitted when the connection is closed.
d74c7dfd 290
aa1db6ed
LC
291Data:
292
d74c7dfd
LC
293- "server": Server information (json-object)
294 - "host": IP address (json-string)
295 - "service": port number (json-string)
296 - "family": address family (json-string, "ipv4" or "ipv6")
297 - "auth": authentication method (json-string, optional)
298- "client": Client information (json-object)
299 - "host": IP address (json-string)
300 - "service": port number (json-string)
301 - "family": address family (json-string, "ipv4" or "ipv6")
302 - "x509_dname": TLS dname (json-string, optional)
303 - "sasl_username": SASL username (json-string, optional)
aa1db6ed
LC
304
305Example:
306
d74c7dfd
LC
307{ "event": "VNC_DISCONNECTED",
308 "data": {
309 "server": { "auth": "sasl", "family": "ipv4",
310 "service": "5901", "host": "0.0.0.0" },
311 "client": { "family": "ipv4", "service": "58425",
312 "host": "127.0.0.1", "sasl_username": "luiz" } },
313 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
314
315VNC_INITIALIZED
316---------------
317
318Emitted after authentication takes place (if any) and the VNC session is
319made active.
320
321Data:
322
323- "server": Server 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 - "auth": authentication method (json-string, optional)
328- "client": Client information (json-object)
329 - "host": IP address (json-string)
330 - "service": port number (json-string)
331 - "family": address family (json-string, "ipv4" or "ipv6")
332 - "x509_dname": TLS dname (json-string, optional)
333 - "sasl_username": SASL username (json-string, optional)
334
335Example:
336
337{ "event": "VNC_INITIALIZED",
338 "data": {
339 "server": { "auth": "sasl", "family": "ipv4",
340 "service": "5901", "host": "0.0.0.0"},
341 "client": { "family": "ipv4", "service": "46089",
342 "host": "127.0.0.1", "sasl_username": "luiz" } },
343 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
9eedeb3b 344
17c8660b
LC
345WAKEUP
346------
347
348Emitted when the guest has woken up from S3 and is running.
349
350Data: None.
351
352Example:
353
354{ "event": "WATCHDOG",
355 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
356
9eedeb3b
LC
357WATCHDOG
358--------
359
360Emitted when the watchdog device's timer is expired.
361
362Data:
363
364- "action": Action that has been taken, it's one of the following (json-string):
365 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
366
367Example:
368
369{ "event": "WATCHDOG",
370 "data": { "action": "reset" },
371 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
372
373Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
374followed respectively by the RESET, SHUTDOWN, or STOP events.