Statistics
| Branch: | Revision:

root / qemu-monitor.hx @ 8135aeed

History | View | Annotate | Download (58.9 kB)

1 2313086a Blue Swirl
HXCOMM Use DEFHEADING() to define headings in both help text and texi
2 2313086a Blue Swirl
HXCOMM Text between STEXI and ETEXI are copied to texi version and
3 2313086a Blue Swirl
HXCOMM discarded from C version
4 b40292e7 Jan Kiszka
HXCOMM Text between SQMP and EQMP is copied to the QMP documention file and
5 b40292e7 Jan Kiszka
HXCOMM does not show up in the other formats.
6 2313086a Blue Swirl
HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
7 2313086a Blue Swirl
HXCOMM monitor commands
8 2313086a Blue Swirl
HXCOMM HXCOMM can be used for comments, discarded from both texi and C
9 2313086a Blue Swirl
10 b40292e7 Jan Kiszka
SQMP
11 b40292e7 Jan Kiszka
                        QMP Supported Commands
12 b40292e7 Jan Kiszka
                        ----------------------
13 b40292e7 Jan Kiszka
14 b40292e7 Jan Kiszka
This document describes all commands currently supported by QMP.
15 b40292e7 Jan Kiszka
16 b40292e7 Jan Kiszka
Most of the time their usage is exactly the same as in the user Monitor, this
17 b40292e7 Jan Kiszka
means that any other document which also describe commands (the manpage,
18 b40292e7 Jan Kiszka
QEMU's manual, etc) can and should be consulted.
19 b40292e7 Jan Kiszka
20 b40292e7 Jan Kiszka
QMP has two types of commands: regular and query commands. Regular commands
21 b40292e7 Jan Kiszka
usually change the Virtual Machine's state someway, while query commands just
22 b40292e7 Jan Kiszka
return information. The sections below are divided accordingly.
23 b40292e7 Jan Kiszka
24 b40292e7 Jan Kiszka
It's important to observe that all communication examples are formatted in
25 b40292e7 Jan Kiszka
a reader-friendly way, so that they're easier to understand. However, in real
26 b40292e7 Jan Kiszka
protocol usage, they're emitted as a single line.
27 b40292e7 Jan Kiszka
28 b40292e7 Jan Kiszka
Also, the following notation is used to denote data flow:
29 b40292e7 Jan Kiszka
30 b40292e7 Jan Kiszka
-> data issued by the Client
31 b40292e7 Jan Kiszka
<- Server data response
32 b40292e7 Jan Kiszka
33 b40292e7 Jan Kiszka
Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
34 b40292e7 Jan Kiszka
information on the Server command and response formats.
35 b40292e7 Jan Kiszka
36 b40292e7 Jan Kiszka
NOTE: This document is temporary and will be replaced soon.
37 b40292e7 Jan Kiszka
38 b40292e7 Jan Kiszka
1. Regular Commands
39 b40292e7 Jan Kiszka
===================
40 b40292e7 Jan Kiszka
41 b40292e7 Jan Kiszka
Server's responses in the examples below are always a success response, please
42 b40292e7 Jan Kiszka
refer to the QMP specification for more details on error responses.
43 b40292e7 Jan Kiszka
44 b40292e7 Jan Kiszka
EQMP
45 b40292e7 Jan Kiszka
46 2313086a Blue Swirl
STEXI
47 2313086a Blue Swirl
@table @option
48 2313086a Blue Swirl
ETEXI
49 2313086a Blue Swirl
50 d7f9b689 Luiz Capitulino
    {
51 d7f9b689 Luiz Capitulino
        .name       = "help|?",
52 d7f9b689 Luiz Capitulino
        .args_type  = "name:s?",
53 d7f9b689 Luiz Capitulino
        .params     = "[cmd]",
54 d7f9b689 Luiz Capitulino
        .help       = "show the help",
55 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_help_cmd,
56 d7f9b689 Luiz Capitulino
    },
57 d7f9b689 Luiz Capitulino
58 2313086a Blue Swirl
STEXI
59 2313086a Blue Swirl
@item help or ? [@var{cmd}]
60 70fcbbe7 Stefan Weil
@findex help
61 2313086a Blue Swirl
Show the help for all commands or just for command @var{cmd}.
62 2313086a Blue Swirl
ETEXI
63 2313086a Blue Swirl
64 d7f9b689 Luiz Capitulino
    {
65 d7f9b689 Luiz Capitulino
        .name       = "commit",
66 d7f9b689 Luiz Capitulino
        .args_type  = "device:B",
67 d7f9b689 Luiz Capitulino
        .params     = "device|all",
68 d7f9b689 Luiz Capitulino
        .help       = "commit changes to the disk images (if -snapshot is used) or backing files",
69 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_commit,
70 d7f9b689 Luiz Capitulino
    },
71 d7f9b689 Luiz Capitulino
72 2313086a Blue Swirl
STEXI
73 2313086a Blue Swirl
@item commit
74 70fcbbe7 Stefan Weil
@findex commit
75 2313086a Blue Swirl
Commit changes to the disk images (if -snapshot is used) or backing files.
76 2313086a Blue Swirl
ETEXI
77 2313086a Blue Swirl
78 d7f9b689 Luiz Capitulino
    {
79 d7f9b689 Luiz Capitulino
        .name       = "q|quit",
80 d7f9b689 Luiz Capitulino
        .args_type  = "",
81 d7f9b689 Luiz Capitulino
        .params     = "",
82 d7f9b689 Luiz Capitulino
        .help       = "quit the emulator",
83 b223f35f Luiz Capitulino
        .user_print = monitor_user_noop,
84 261394db Luiz Capitulino
        .mhandler.cmd_new = do_quit,
85 d7f9b689 Luiz Capitulino
    },
86 d7f9b689 Luiz Capitulino
87 2313086a Blue Swirl
STEXI
88 2313086a Blue Swirl
@item q or quit
89 70fcbbe7 Stefan Weil
@findex quit
90 2313086a Blue Swirl
Quit the emulator.
91 2313086a Blue Swirl
ETEXI
92 b40292e7 Jan Kiszka
SQMP
93 b40292e7 Jan Kiszka
quit
94 b40292e7 Jan Kiszka
----
95 b40292e7 Jan Kiszka
96 b40292e7 Jan Kiszka
Quit the emulator.
97 b40292e7 Jan Kiszka
98 b40292e7 Jan Kiszka
Arguments: None.
99 b40292e7 Jan Kiszka
100 b40292e7 Jan Kiszka
Example:
101 b40292e7 Jan Kiszka
102 b40292e7 Jan Kiszka
-> { "execute": "quit" }
103 b40292e7 Jan Kiszka
<- { "return": {} }
104 b40292e7 Jan Kiszka
105 b40292e7 Jan Kiszka
EQMP
106 2313086a Blue Swirl
107 d7f9b689 Luiz Capitulino
    {
108 d7f9b689 Luiz Capitulino
        .name       = "eject",
109 78d714e0 Luiz Capitulino
        .args_type  = "force:-f,device:B",
110 d7f9b689 Luiz Capitulino
        .params     = "[-f] device",
111 d7f9b689 Luiz Capitulino
        .help       = "eject a removable medium (use -f to force it)",
112 e1c923a6 Luiz Capitulino
        .user_print = monitor_user_noop,
113 261394db Luiz Capitulino
        .mhandler.cmd_new = do_eject,
114 d7f9b689 Luiz Capitulino
    },
115 d7f9b689 Luiz Capitulino
116 2313086a Blue Swirl
STEXI
117 2313086a Blue Swirl
@item eject [-f] @var{device}
118 70fcbbe7 Stefan Weil
@findex eject
119 2313086a Blue Swirl
Eject a removable medium (use -f to force it).
120 2313086a Blue Swirl
ETEXI
121 b40292e7 Jan Kiszka
SQMP
122 b40292e7 Jan Kiszka
eject
123 b40292e7 Jan Kiszka
-----
124 b40292e7 Jan Kiszka
125 b40292e7 Jan Kiszka
Eject a removable medium.
126 b40292e7 Jan Kiszka
127 b40292e7 Jan Kiszka
Arguments: 
128 b40292e7 Jan Kiszka
129 b40292e7 Jan Kiszka
- force: force ejection (json-bool, optional)
130 b40292e7 Jan Kiszka
- device: device name (json-string)
131 b40292e7 Jan Kiszka
132 b40292e7 Jan Kiszka
Example:
133 b40292e7 Jan Kiszka
134 b40292e7 Jan Kiszka
-> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
135 b40292e7 Jan Kiszka
<- { "return": {} }
136 b40292e7 Jan Kiszka
137 b40292e7 Jan Kiszka
Note: The "force" argument defaults to false.
138 b40292e7 Jan Kiszka
139 b40292e7 Jan Kiszka
EQMP
140 2313086a Blue Swirl
141 d7f9b689 Luiz Capitulino
    {
142 d7f9b689 Luiz Capitulino
        .name       = "change",
143 d7f9b689 Luiz Capitulino
        .args_type  = "device:B,target:F,arg:s?",
144 d7f9b689 Luiz Capitulino
        .params     = "device filename [format]",
145 d7f9b689 Luiz Capitulino
        .help       = "change a removable medium, optional format",
146 ec3b82af Markus Armbruster
        .user_print = monitor_user_noop,
147 261394db Luiz Capitulino
        .mhandler.cmd_new = do_change,
148 d7f9b689 Luiz Capitulino
    },
149 d7f9b689 Luiz Capitulino
150 2313086a Blue Swirl
STEXI
151 2313086a Blue Swirl
@item change @var{device} @var{setting}
152 70fcbbe7 Stefan Weil
@findex change
153 2313086a Blue Swirl
154 2313086a Blue Swirl
Change the configuration of a device.
155 2313086a Blue Swirl
156 2313086a Blue Swirl
@table @option
157 2313086a Blue Swirl
@item change @var{diskdevice} @var{filename} [@var{format}]
158 2313086a Blue Swirl
Change the medium for a removable disk device to point to @var{filename}. eg
159 2313086a Blue Swirl
160 2313086a Blue Swirl
@example
161 2313086a Blue Swirl
(qemu) change ide1-cd0 /path/to/some.iso
162 2313086a Blue Swirl
@end example
163 2313086a Blue Swirl
164 2313086a Blue Swirl
@var{format} is optional.
165 2313086a Blue Swirl
166 2313086a Blue Swirl
@item change vnc @var{display},@var{options}
167 2313086a Blue Swirl
Change the configuration of the VNC server. The valid syntax for @var{display}
168 2313086a Blue Swirl
and @var{options} are described at @ref{sec_invocation}. eg
169 2313086a Blue Swirl
170 2313086a Blue Swirl
@example
171 2313086a Blue Swirl
(qemu) change vnc localhost:1
172 2313086a Blue Swirl
@end example
173 2313086a Blue Swirl
174 2313086a Blue Swirl
@item change vnc password [@var{password}]
175 2313086a Blue Swirl
176 2313086a Blue Swirl
Change the password associated with the VNC server. If the new password is not
177 2313086a Blue Swirl
supplied, the monitor will prompt for it to be entered. VNC passwords are only
178 2313086a Blue Swirl
significant up to 8 letters. eg
179 2313086a Blue Swirl
180 2313086a Blue Swirl
@example
181 2313086a Blue Swirl
(qemu) change vnc password
182 2313086a Blue Swirl
Password: ********
183 2313086a Blue Swirl
@end example
184 2313086a Blue Swirl
185 2313086a Blue Swirl
@end table
186 2313086a Blue Swirl
ETEXI
187 b40292e7 Jan Kiszka
SQMP
188 b40292e7 Jan Kiszka
change
189 b40292e7 Jan Kiszka
------
190 b40292e7 Jan Kiszka
191 b40292e7 Jan Kiszka
Change a removable medium or VNC configuration.
192 b40292e7 Jan Kiszka
193 b40292e7 Jan Kiszka
Arguments:
194 b40292e7 Jan Kiszka
195 b40292e7 Jan Kiszka
- "device": device name (json-string)
196 b40292e7 Jan Kiszka
- "target": filename or item (json-string)
197 b40292e7 Jan Kiszka
- "arg": additional argument (json-string, optional)
198 b40292e7 Jan Kiszka
199 b40292e7 Jan Kiszka
Examples:
200 b40292e7 Jan Kiszka
201 b40292e7 Jan Kiszka
1. Change a removable medium
202 b40292e7 Jan Kiszka
203 b40292e7 Jan Kiszka
-> { "execute": "change",
204 b40292e7 Jan Kiszka
             "arguments": { "device": "ide1-cd0",
205 b40292e7 Jan Kiszka
                            "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
206 b40292e7 Jan Kiszka
<- { "return": {} }
207 b40292e7 Jan Kiszka
208 b40292e7 Jan Kiszka
2. Change VNC password
209 b40292e7 Jan Kiszka
210 b40292e7 Jan Kiszka
-> { "execute": "change",
211 b40292e7 Jan Kiszka
             "arguments": { "device": "vnc", "target": "password",
212 b40292e7 Jan Kiszka
                            "arg": "foobar1" } }
213 b40292e7 Jan Kiszka
<- { "return": {} }
214 b40292e7 Jan Kiszka
215 b40292e7 Jan Kiszka
EQMP
216 2313086a Blue Swirl
217 d7f9b689 Luiz Capitulino
    {
218 d7f9b689 Luiz Capitulino
        .name       = "screendump",
219 d7f9b689 Luiz Capitulino
        .args_type  = "filename:F",
220 d7f9b689 Luiz Capitulino
        .params     = "filename",
221 d7f9b689 Luiz Capitulino
        .help       = "save screen into PPM image 'filename'",
222 f1dc58e0 Luiz Capitulino
        .user_print = monitor_user_noop,
223 f1dc58e0 Luiz Capitulino
        .mhandler.cmd_new = do_screen_dump,
224 d7f9b689 Luiz Capitulino
    },
225 d7f9b689 Luiz Capitulino
226 2313086a Blue Swirl
STEXI
227 2313086a Blue Swirl
@item screendump @var{filename}
228 70fcbbe7 Stefan Weil
@findex screendump
229 2313086a Blue Swirl
Save screen into PPM image @var{filename}.
230 2313086a Blue Swirl
ETEXI
231 b40292e7 Jan Kiszka
SQMP
232 b40292e7 Jan Kiszka
screendump
233 b40292e7 Jan Kiszka
----------
234 b40292e7 Jan Kiszka
235 b40292e7 Jan Kiszka
Save screen into PPM image.
236 b40292e7 Jan Kiszka
237 b40292e7 Jan Kiszka
Arguments:
238 b40292e7 Jan Kiszka
239 b40292e7 Jan Kiszka
- "filename": file path (json-string)
240 b40292e7 Jan Kiszka
241 b40292e7 Jan Kiszka
Example:
242 b40292e7 Jan Kiszka
243 b40292e7 Jan Kiszka
-> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
244 b40292e7 Jan Kiszka
<- { "return": {} }
245 b40292e7 Jan Kiszka
246 b40292e7 Jan Kiszka
EQMP
247 2313086a Blue Swirl
248 d7f9b689 Luiz Capitulino
    {
249 d7f9b689 Luiz Capitulino
        .name       = "logfile",
250 d7f9b689 Luiz Capitulino
        .args_type  = "filename:F",
251 d7f9b689 Luiz Capitulino
        .params     = "filename",
252 d7f9b689 Luiz Capitulino
        .help       = "output logs to 'filename'",
253 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_logfile,
254 d7f9b689 Luiz Capitulino
    },
255 d7f9b689 Luiz Capitulino
256 2313086a Blue Swirl
STEXI
257 2313086a Blue Swirl
@item logfile @var{filename}
258 70fcbbe7 Stefan Weil
@findex logfile
259 2313086a Blue Swirl
Output logs to @var{filename}.
260 2313086a Blue Swirl
ETEXI
261 2313086a Blue Swirl
262 d7f9b689 Luiz Capitulino
    {
263 d7f9b689 Luiz Capitulino
        .name       = "log",
264 d7f9b689 Luiz Capitulino
        .args_type  = "items:s",
265 d7f9b689 Luiz Capitulino
        .params     = "item1[,...]",
266 d7f9b689 Luiz Capitulino
        .help       = "activate logging of the specified items to '/tmp/qemu.log'",
267 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_log,
268 d7f9b689 Luiz Capitulino
    },
269 d7f9b689 Luiz Capitulino
270 2313086a Blue Swirl
STEXI
271 2313086a Blue Swirl
@item log @var{item1}[,...]
272 70fcbbe7 Stefan Weil
@findex log
273 2313086a Blue Swirl
Activate logging of the specified items to @file{/tmp/qemu.log}.
274 2313086a Blue Swirl
ETEXI
275 2313086a Blue Swirl
276 d7f9b689 Luiz Capitulino
    {
277 d7f9b689 Luiz Capitulino
        .name       = "savevm",
278 d7f9b689 Luiz Capitulino
        .args_type  = "name:s?",
279 d7f9b689 Luiz Capitulino
        .params     = "[tag|id]",
280 d7f9b689 Luiz Capitulino
        .help       = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
281 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_savevm,
282 d7f9b689 Luiz Capitulino
    },
283 d7f9b689 Luiz Capitulino
284 2313086a Blue Swirl
STEXI
285 2313086a Blue Swirl
@item savevm [@var{tag}|@var{id}]
286 70fcbbe7 Stefan Weil
@findex savevm
287 2313086a Blue Swirl
Create a snapshot of the whole virtual machine. If @var{tag} is
288 2313086a Blue Swirl
provided, it is used as human readable identifier. If there is already
289 2313086a Blue Swirl
a snapshot with the same tag or ID, it is replaced. More info at
290 2313086a Blue Swirl
@ref{vm_snapshots}.
291 2313086a Blue Swirl
ETEXI
292 2313086a Blue Swirl
293 d7f9b689 Luiz Capitulino
    {
294 d7f9b689 Luiz Capitulino
        .name       = "loadvm",
295 d7f9b689 Luiz Capitulino
        .args_type  = "name:s",
296 d7f9b689 Luiz Capitulino
        .params     = "tag|id",
297 d7f9b689 Luiz Capitulino
        .help       = "restore a VM snapshot from its tag or id",
298 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_loadvm,
299 d7f9b689 Luiz Capitulino
    },
300 d7f9b689 Luiz Capitulino
301 2313086a Blue Swirl
STEXI
302 2313086a Blue Swirl
@item loadvm @var{tag}|@var{id}
303 70fcbbe7 Stefan Weil
@findex loadvm
304 2313086a Blue Swirl
Set the whole virtual machine to the snapshot identified by the tag
305 2313086a Blue Swirl
@var{tag} or the unique snapshot ID @var{id}.
306 2313086a Blue Swirl
ETEXI
307 2313086a Blue Swirl
308 d7f9b689 Luiz Capitulino
    {
309 d7f9b689 Luiz Capitulino
        .name       = "delvm",
310 d7f9b689 Luiz Capitulino
        .args_type  = "name:s",
311 d7f9b689 Luiz Capitulino
        .params     = "tag|id",
312 d7f9b689 Luiz Capitulino
        .help       = "delete a VM snapshot from its tag or id",
313 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_delvm,
314 d7f9b689 Luiz Capitulino
    },
315 d7f9b689 Luiz Capitulino
316 2313086a Blue Swirl
STEXI
317 2313086a Blue Swirl
@item delvm @var{tag}|@var{id}
318 70fcbbe7 Stefan Weil
@findex delvm
319 2313086a Blue Swirl
Delete the snapshot identified by @var{tag} or @var{id}.
320 2313086a Blue Swirl
ETEXI
321 2313086a Blue Swirl
322 d7f9b689 Luiz Capitulino
    {
323 d7f9b689 Luiz Capitulino
        .name       = "singlestep",
324 d7f9b689 Luiz Capitulino
        .args_type  = "option:s?",
325 d7f9b689 Luiz Capitulino
        .params     = "[on|off]",
326 d7f9b689 Luiz Capitulino
        .help       = "run emulation in singlestep mode or switch to normal mode",
327 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_singlestep,
328 d7f9b689 Luiz Capitulino
    },
329 d7f9b689 Luiz Capitulino
330 2313086a Blue Swirl
STEXI
331 2313086a Blue Swirl
@item singlestep [off]
332 70fcbbe7 Stefan Weil
@findex singlestep
333 2313086a Blue Swirl
Run the emulation in single step mode.
334 2313086a Blue Swirl
If called with option off, the emulation returns to normal mode.
335 2313086a Blue Swirl
ETEXI
336 2313086a Blue Swirl
337 d7f9b689 Luiz Capitulino
    {
338 d7f9b689 Luiz Capitulino
        .name       = "stop",
339 d7f9b689 Luiz Capitulino
        .args_type  = "",
340 d7f9b689 Luiz Capitulino
        .params     = "",
341 d7f9b689 Luiz Capitulino
        .help       = "stop emulation",
342 e0c97bde Luiz Capitulino
        .user_print = monitor_user_noop,
343 261394db Luiz Capitulino
        .mhandler.cmd_new = do_stop,
344 d7f9b689 Luiz Capitulino
    },
345 d7f9b689 Luiz Capitulino
346 2313086a Blue Swirl
STEXI
347 2313086a Blue Swirl
@item stop
348 70fcbbe7 Stefan Weil
@findex stop
349 2313086a Blue Swirl
Stop emulation.
350 2313086a Blue Swirl
ETEXI
351 b40292e7 Jan Kiszka
SQMP
352 b40292e7 Jan Kiszka
stop
353 b40292e7 Jan Kiszka
----
354 b40292e7 Jan Kiszka
355 b40292e7 Jan Kiszka
Stop the emulator.
356 b40292e7 Jan Kiszka
357 b40292e7 Jan Kiszka
Arguments: None.
358 b40292e7 Jan Kiszka
359 b40292e7 Jan Kiszka
Example:
360 b40292e7 Jan Kiszka
361 b40292e7 Jan Kiszka
-> { "execute": "stop" }
362 b40292e7 Jan Kiszka
<- { "return": {} }
363 b40292e7 Jan Kiszka
364 b40292e7 Jan Kiszka
EQMP
365 2313086a Blue Swirl
366 d7f9b689 Luiz Capitulino
    {
367 d7f9b689 Luiz Capitulino
        .name       = "c|cont",
368 d7f9b689 Luiz Capitulino
        .args_type  = "",
369 d7f9b689 Luiz Capitulino
        .params     = "",
370 d7f9b689 Luiz Capitulino
        .help       = "resume emulation",
371 a1f896a0 Luiz Capitulino
        .user_print = monitor_user_noop,
372 261394db Luiz Capitulino
        .mhandler.cmd_new = do_cont,
373 d7f9b689 Luiz Capitulino
    },
374 d7f9b689 Luiz Capitulino
375 2313086a Blue Swirl
STEXI
376 2313086a Blue Swirl
@item c or cont
377 70fcbbe7 Stefan Weil
@findex cont
378 2313086a Blue Swirl
Resume emulation.
379 2313086a Blue Swirl
ETEXI
380 b40292e7 Jan Kiszka
SQMP
381 b40292e7 Jan Kiszka
cont
382 b40292e7 Jan Kiszka
----
383 b40292e7 Jan Kiszka
384 b40292e7 Jan Kiszka
Resume emulation.
385 b40292e7 Jan Kiszka
386 b40292e7 Jan Kiszka
Arguments: None.
387 b40292e7 Jan Kiszka
388 b40292e7 Jan Kiszka
Example:
389 b40292e7 Jan Kiszka
390 b40292e7 Jan Kiszka
-> { "execute": "cont" }
391 b40292e7 Jan Kiszka
<- { "return": {} }
392 b40292e7 Jan Kiszka
393 b40292e7 Jan Kiszka
EQMP
394 2313086a Blue Swirl
395 d7f9b689 Luiz Capitulino
    {
396 d7f9b689 Luiz Capitulino
        .name       = "gdbserver",
397 d7f9b689 Luiz Capitulino
        .args_type  = "device:s?",
398 d7f9b689 Luiz Capitulino
        .params     = "[device]",
399 d7f9b689 Luiz Capitulino
        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
400 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_gdbserver,
401 d7f9b689 Luiz Capitulino
    },
402 d7f9b689 Luiz Capitulino
403 2313086a Blue Swirl
STEXI
404 2313086a Blue Swirl
@item gdbserver [@var{port}]
405 70fcbbe7 Stefan Weil
@findex gdbserver
406 2313086a Blue Swirl
Start gdbserver session (default @var{port}=1234)
407 2313086a Blue Swirl
ETEXI
408 2313086a Blue Swirl
409 d7f9b689 Luiz Capitulino
    {
410 d7f9b689 Luiz Capitulino
        .name       = "x",
411 d7f9b689 Luiz Capitulino
        .args_type  = "fmt:/,addr:l",
412 d7f9b689 Luiz Capitulino
        .params     = "/fmt addr",
413 d7f9b689 Luiz Capitulino
        .help       = "virtual memory dump starting at 'addr'",
414 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_memory_dump,
415 d7f9b689 Luiz Capitulino
    },
416 d7f9b689 Luiz Capitulino
417 2313086a Blue Swirl
STEXI
418 2313086a Blue Swirl
@item x/fmt @var{addr}
419 70fcbbe7 Stefan Weil
@findex x
420 2313086a Blue Swirl
Virtual memory dump starting at @var{addr}.
421 2313086a Blue Swirl
ETEXI
422 2313086a Blue Swirl
423 d7f9b689 Luiz Capitulino
    {
424 d7f9b689 Luiz Capitulino
        .name       = "xp",
425 d7f9b689 Luiz Capitulino
        .args_type  = "fmt:/,addr:l",
426 d7f9b689 Luiz Capitulino
        .params     = "/fmt addr",
427 d7f9b689 Luiz Capitulino
        .help       = "physical memory dump starting at 'addr'",
428 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_physical_memory_dump,
429 d7f9b689 Luiz Capitulino
    },
430 d7f9b689 Luiz Capitulino
431 2313086a Blue Swirl
STEXI
432 2313086a Blue Swirl
@item xp /@var{fmt} @var{addr}
433 70fcbbe7 Stefan Weil
@findex xp
434 2313086a Blue Swirl
Physical memory dump starting at @var{addr}.
435 2313086a Blue Swirl
436 2313086a Blue Swirl
@var{fmt} is a format which tells the command how to format the
437 2313086a Blue Swirl
data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
438 2313086a Blue Swirl
439 2313086a Blue Swirl
@table @var
440 2313086a Blue Swirl
@item count
441 2313086a Blue Swirl
is the number of items to be dumped.
442 2313086a Blue Swirl
443 2313086a Blue Swirl
@item format
444 2313086a Blue Swirl
can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
445 2313086a Blue Swirl
c (char) or i (asm instruction).
446 2313086a Blue Swirl
447 2313086a Blue Swirl
@item size
448 2313086a Blue Swirl
can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
449 2313086a Blue Swirl
@code{h} or @code{w} can be specified with the @code{i} format to
450 2313086a Blue Swirl
respectively select 16 or 32 bit code instruction size.
451 2313086a Blue Swirl
452 2313086a Blue Swirl
@end table
453 2313086a Blue Swirl
454 2313086a Blue Swirl
Examples:
455 2313086a Blue Swirl
@itemize
456 2313086a Blue Swirl
@item
457 2313086a Blue Swirl
Dump 10 instructions at the current instruction pointer:
458 2313086a Blue Swirl
@example
459 2313086a Blue Swirl
(qemu) x/10i $eip
460 2313086a Blue Swirl
0x90107063:  ret
461 2313086a Blue Swirl
0x90107064:  sti
462 2313086a Blue Swirl
0x90107065:  lea    0x0(%esi,1),%esi
463 2313086a Blue Swirl
0x90107069:  lea    0x0(%edi,1),%edi
464 2313086a Blue Swirl
0x90107070:  ret
465 2313086a Blue Swirl
0x90107071:  jmp    0x90107080
466 2313086a Blue Swirl
0x90107073:  nop
467 2313086a Blue Swirl
0x90107074:  nop
468 2313086a Blue Swirl
0x90107075:  nop
469 2313086a Blue Swirl
0x90107076:  nop
470 2313086a Blue Swirl
@end example
471 2313086a Blue Swirl
472 2313086a Blue Swirl
@item
473 2313086a Blue Swirl
Dump 80 16 bit values at the start of the video memory.
474 2313086a Blue Swirl
@smallexample
475 2313086a Blue Swirl
(qemu) xp/80hx 0xb8000
476 2313086a Blue Swirl
0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
477 2313086a Blue Swirl
0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
478 2313086a Blue Swirl
0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
479 2313086a Blue Swirl
0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
480 2313086a Blue Swirl
0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
481 2313086a Blue Swirl
0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
482 2313086a Blue Swirl
0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
483 2313086a Blue Swirl
0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
484 2313086a Blue Swirl
0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
485 2313086a Blue Swirl
0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
486 2313086a Blue Swirl
@end smallexample
487 2313086a Blue Swirl
@end itemize
488 2313086a Blue Swirl
ETEXI
489 2313086a Blue Swirl
490 d7f9b689 Luiz Capitulino
    {
491 d7f9b689 Luiz Capitulino
        .name       = "p|print",
492 d7f9b689 Luiz Capitulino
        .args_type  = "fmt:/,val:l",
493 d7f9b689 Luiz Capitulino
        .params     = "/fmt expr",
494 d7f9b689 Luiz Capitulino
        .help       = "print expression value (use $reg for CPU register access)",
495 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_print,
496 d7f9b689 Luiz Capitulino
    },
497 d7f9b689 Luiz Capitulino
498 2313086a Blue Swirl
STEXI
499 2313086a Blue Swirl
@item p or print/@var{fmt} @var{expr}
500 70fcbbe7 Stefan Weil
@findex print
501 2313086a Blue Swirl
502 2313086a Blue Swirl
Print expression value. Only the @var{format} part of @var{fmt} is
503 2313086a Blue Swirl
used.
504 2313086a Blue Swirl
ETEXI
505 2313086a Blue Swirl
506 d7f9b689 Luiz Capitulino
    {
507 d7f9b689 Luiz Capitulino
        .name       = "i",
508 d7f9b689 Luiz Capitulino
        .args_type  = "fmt:/,addr:i,index:i.",
509 d7f9b689 Luiz Capitulino
        .params     = "/fmt addr",
510 d7f9b689 Luiz Capitulino
        .help       = "I/O port read",
511 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_ioport_read,
512 d7f9b689 Luiz Capitulino
    },
513 d7f9b689 Luiz Capitulino
514 2313086a Blue Swirl
STEXI
515 2313086a Blue Swirl
Read I/O port.
516 2313086a Blue Swirl
ETEXI
517 2313086a Blue Swirl
518 d7f9b689 Luiz Capitulino
    {
519 d7f9b689 Luiz Capitulino
        .name       = "o",
520 d7f9b689 Luiz Capitulino
        .args_type  = "fmt:/,addr:i,val:i",
521 d7f9b689 Luiz Capitulino
        .params     = "/fmt addr value",
522 d7f9b689 Luiz Capitulino
        .help       = "I/O port write",
523 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_ioport_write,
524 d7f9b689 Luiz Capitulino
    },
525 d7f9b689 Luiz Capitulino
526 f114784f Jan Kiszka
STEXI
527 f114784f Jan Kiszka
Write to I/O port.
528 f114784f Jan Kiszka
ETEXI
529 2313086a Blue Swirl
530 d7f9b689 Luiz Capitulino
    {
531 d7f9b689 Luiz Capitulino
        .name       = "sendkey",
532 d7f9b689 Luiz Capitulino
        .args_type  = "string:s,hold_time:i?",
533 d7f9b689 Luiz Capitulino
        .params     = "keys [hold_ms]",
534 d7f9b689 Luiz Capitulino
        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
535 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_sendkey,
536 d7f9b689 Luiz Capitulino
    },
537 d7f9b689 Luiz Capitulino
538 2313086a Blue Swirl
STEXI
539 2313086a Blue Swirl
@item sendkey @var{keys}
540 70fcbbe7 Stefan Weil
@findex sendkey
541 2313086a Blue Swirl
542 2313086a Blue Swirl
Send @var{keys} to the emulator. @var{keys} could be the name of the
543 2313086a Blue Swirl
key or @code{#} followed by the raw value in either decimal or hexadecimal
544 2313086a Blue Swirl
format. Use @code{-} to press several keys simultaneously. Example:
545 2313086a Blue Swirl
@example
546 2313086a Blue Swirl
sendkey ctrl-alt-f1
547 2313086a Blue Swirl
@end example
548 2313086a Blue Swirl
549 2313086a Blue Swirl
This command is useful to send keys that your graphical user interface
550 2313086a Blue Swirl
intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
551 2313086a Blue Swirl
ETEXI
552 2313086a Blue Swirl
553 d7f9b689 Luiz Capitulino
    {
554 d7f9b689 Luiz Capitulino
        .name       = "system_reset",
555 d7f9b689 Luiz Capitulino
        .args_type  = "",
556 d7f9b689 Luiz Capitulino
        .params     = "",
557 d7f9b689 Luiz Capitulino
        .help       = "reset the system",
558 c80d259e Luiz Capitulino
        .user_print = monitor_user_noop,
559 261394db Luiz Capitulino
        .mhandler.cmd_new = do_system_reset,
560 d7f9b689 Luiz Capitulino
    },
561 d7f9b689 Luiz Capitulino
562 2313086a Blue Swirl
STEXI
563 2313086a Blue Swirl
@item system_reset
564 70fcbbe7 Stefan Weil
@findex system_reset
565 2313086a Blue Swirl
566 2313086a Blue Swirl
Reset the system.
567 2313086a Blue Swirl
ETEXI
568 b40292e7 Jan Kiszka
SQMP
569 b40292e7 Jan Kiszka
system_reset
570 b40292e7 Jan Kiszka
------------
571 b40292e7 Jan Kiszka
572 b40292e7 Jan Kiszka
Reset the system.
573 b40292e7 Jan Kiszka
574 b40292e7 Jan Kiszka
Arguments: None.
575 b40292e7 Jan Kiszka
576 b40292e7 Jan Kiszka
Example:
577 b40292e7 Jan Kiszka
578 b40292e7 Jan Kiszka
-> { "execute": "system_reset" }
579 b40292e7 Jan Kiszka
<- { "return": {} }
580 b40292e7 Jan Kiszka
581 b40292e7 Jan Kiszka
EQMP
582 2313086a Blue Swirl
583 d7f9b689 Luiz Capitulino
    {
584 d7f9b689 Luiz Capitulino
        .name       = "system_powerdown",
585 d7f9b689 Luiz Capitulino
        .args_type  = "",
586 d7f9b689 Luiz Capitulino
        .params     = "",
587 d7f9b689 Luiz Capitulino
        .help       = "send system power down event",
588 43076664 Luiz Capitulino
        .user_print = monitor_user_noop,
589 261394db Luiz Capitulino
        .mhandler.cmd_new = do_system_powerdown,
590 d7f9b689 Luiz Capitulino
    },
591 d7f9b689 Luiz Capitulino
592 2313086a Blue Swirl
STEXI
593 2313086a Blue Swirl
@item system_powerdown
594 70fcbbe7 Stefan Weil
@findex system_powerdown
595 2313086a Blue Swirl
596 2313086a Blue Swirl
Power down the system (if supported).
597 2313086a Blue Swirl
ETEXI
598 b40292e7 Jan Kiszka
SQMP
599 b40292e7 Jan Kiszka
system_powerdown
600 b40292e7 Jan Kiszka
----------------
601 b40292e7 Jan Kiszka
602 b40292e7 Jan Kiszka
Send system power down event.
603 b40292e7 Jan Kiszka
604 b40292e7 Jan Kiszka
Arguments: None.
605 b40292e7 Jan Kiszka
606 b40292e7 Jan Kiszka
Example:
607 b40292e7 Jan Kiszka
608 b40292e7 Jan Kiszka
-> { "execute": "system_powerdown" }
609 b40292e7 Jan Kiszka
<- { "return": {} }
610 b40292e7 Jan Kiszka
611 b40292e7 Jan Kiszka
EQMP
612 2313086a Blue Swirl
613 d7f9b689 Luiz Capitulino
    {
614 d7f9b689 Luiz Capitulino
        .name       = "sum",
615 d7f9b689 Luiz Capitulino
        .args_type  = "start:i,size:i",
616 d7f9b689 Luiz Capitulino
        .params     = "addr size",
617 d7f9b689 Luiz Capitulino
        .help       = "compute the checksum of a memory region",
618 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_sum,
619 d7f9b689 Luiz Capitulino
    },
620 d7f9b689 Luiz Capitulino
621 2313086a Blue Swirl
STEXI
622 2313086a Blue Swirl
@item sum @var{addr} @var{size}
623 70fcbbe7 Stefan Weil
@findex sum
624 2313086a Blue Swirl
625 2313086a Blue Swirl
Compute the checksum of a memory region.
626 2313086a Blue Swirl
ETEXI
627 2313086a Blue Swirl
628 d7f9b689 Luiz Capitulino
    {
629 d7f9b689 Luiz Capitulino
        .name       = "usb_add",
630 d7f9b689 Luiz Capitulino
        .args_type  = "devname:s",
631 d7f9b689 Luiz Capitulino
        .params     = "device",
632 d7f9b689 Luiz Capitulino
        .help       = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
633 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_usb_add,
634 d7f9b689 Luiz Capitulino
    },
635 d7f9b689 Luiz Capitulino
636 2313086a Blue Swirl
STEXI
637 2313086a Blue Swirl
@item usb_add @var{devname}
638 70fcbbe7 Stefan Weil
@findex usb_add
639 2313086a Blue Swirl
640 2313086a Blue Swirl
Add the USB device @var{devname}.  For details of available devices see
641 2313086a Blue Swirl
@ref{usb_devices}
642 2313086a Blue Swirl
ETEXI
643 2313086a Blue Swirl
644 d7f9b689 Luiz Capitulino
    {
645 d7f9b689 Luiz Capitulino
        .name       = "usb_del",
646 d7f9b689 Luiz Capitulino
        .args_type  = "devname:s",
647 d7f9b689 Luiz Capitulino
        .params     = "device",
648 d7f9b689 Luiz Capitulino
        .help       = "remove USB device 'bus.addr'",
649 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_usb_del,
650 d7f9b689 Luiz Capitulino
    },
651 d7f9b689 Luiz Capitulino
652 2313086a Blue Swirl
STEXI
653 2313086a Blue Swirl
@item usb_del @var{devname}
654 70fcbbe7 Stefan Weil
@findex usb_del
655 2313086a Blue Swirl
656 2313086a Blue Swirl
Remove the USB device @var{devname} from the QEMU virtual USB
657 2313086a Blue Swirl
hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
658 2313086a Blue Swirl
command @code{info usb} to see the devices you can remove.
659 2313086a Blue Swirl
ETEXI
660 2313086a Blue Swirl
661 d7f9b689 Luiz Capitulino
    {
662 d7f9b689 Luiz Capitulino
        .name       = "device_add",
663 c7e4e8ce Markus Armbruster
        .args_type  = "device:O",
664 c7e4e8ce Markus Armbruster
        .params     = "driver[,prop=value][,...]",
665 d7f9b689 Luiz Capitulino
        .help       = "add device, like -device on the command line",
666 8bc27249 Markus Armbruster
        .user_print = monitor_user_noop,
667 8bc27249 Markus Armbruster
        .mhandler.cmd_new = do_device_add,
668 d7f9b689 Luiz Capitulino
    },
669 d7f9b689 Luiz Capitulino
670 3418bd25 Gerd Hoffmann
STEXI
671 3418bd25 Gerd Hoffmann
@item device_add @var{config}
672 70fcbbe7 Stefan Weil
@findex device_add
673 3418bd25 Gerd Hoffmann
674 3418bd25 Gerd Hoffmann
Add device.
675 3418bd25 Gerd Hoffmann
ETEXI
676 b40292e7 Jan Kiszka
SQMP
677 b40292e7 Jan Kiszka
device_add
678 b40292e7 Jan Kiszka
----------
679 b40292e7 Jan Kiszka
680 b40292e7 Jan Kiszka
Add a device.
681 b40292e7 Jan Kiszka
682 b40292e7 Jan Kiszka
Arguments:
683 b40292e7 Jan Kiszka
684 b40292e7 Jan Kiszka
- "driver": the name of the new device's driver (json-string)
685 b40292e7 Jan Kiszka
- "bus": the device's parent bus (device tree path, json-string, optional)
686 b40292e7 Jan Kiszka
- "id": the device's ID, must be unique (json-string)
687 b40292e7 Jan Kiszka
- device properties
688 b40292e7 Jan Kiszka
689 b40292e7 Jan Kiszka
Example:
690 b40292e7 Jan Kiszka
691 b40292e7 Jan Kiszka
-> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
692 b40292e7 Jan Kiszka
<- { "return": {} }
693 b40292e7 Jan Kiszka
694 b40292e7 Jan Kiszka
Notes:
695 b40292e7 Jan Kiszka
696 b40292e7 Jan Kiszka
(1) For detailed information about this command, please refer to the
697 b40292e7 Jan Kiszka
    'docs/qdev-device-use.txt' file.
698 b40292e7 Jan Kiszka
699 b40292e7 Jan Kiszka
(2) It's possible to list device properties by running QEMU with the
700 b40292e7 Jan Kiszka
    "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
701 b40292e7 Jan Kiszka
702 b40292e7 Jan Kiszka
EQMP
703 3418bd25 Gerd Hoffmann
704 d7f9b689 Luiz Capitulino
    {
705 d7f9b689 Luiz Capitulino
        .name       = "device_del",
706 d7f9b689 Luiz Capitulino
        .args_type  = "id:s",
707 d7f9b689 Luiz Capitulino
        .params     = "device",
708 d7f9b689 Luiz Capitulino
        .help       = "remove device",
709 17a38eaa Markus Armbruster
        .user_print = monitor_user_noop,
710 17a38eaa Markus Armbruster
        .mhandler.cmd_new = do_device_del,
711 d7f9b689 Luiz Capitulino
    },
712 d7f9b689 Luiz Capitulino
713 3418bd25 Gerd Hoffmann
STEXI
714 3418bd25 Gerd Hoffmann
@item device_del @var{id}
715 70fcbbe7 Stefan Weil
@findex device_del
716 3418bd25 Gerd Hoffmann
717 3418bd25 Gerd Hoffmann
Remove device @var{id}.
718 3418bd25 Gerd Hoffmann
ETEXI
719 b40292e7 Jan Kiszka
SQMP
720 b40292e7 Jan Kiszka
device_del
721 b40292e7 Jan Kiszka
----------
722 b40292e7 Jan Kiszka
723 b40292e7 Jan Kiszka
Remove a device.
724 b40292e7 Jan Kiszka
725 b40292e7 Jan Kiszka
Arguments:
726 b40292e7 Jan Kiszka
727 b40292e7 Jan Kiszka
- "id": the device's ID (json-string)
728 b40292e7 Jan Kiszka
729 b40292e7 Jan Kiszka
Example:
730 b40292e7 Jan Kiszka
731 b40292e7 Jan Kiszka
-> { "execute": "device_del", "arguments": { "id": "net1" } }
732 b40292e7 Jan Kiszka
<- { "return": {} }
733 b40292e7 Jan Kiszka
734 b40292e7 Jan Kiszka
EQMP
735 3418bd25 Gerd Hoffmann
736 d7f9b689 Luiz Capitulino
    {
737 d7f9b689 Luiz Capitulino
        .name       = "cpu",
738 d7f9b689 Luiz Capitulino
        .args_type  = "index:i",
739 d7f9b689 Luiz Capitulino
        .params     = "index",
740 d7f9b689 Luiz Capitulino
        .help       = "set the default CPU",
741 81a1b45a Markus Armbruster
        .user_print = monitor_user_noop,
742 261394db Luiz Capitulino
        .mhandler.cmd_new = do_cpu_set,
743 d7f9b689 Luiz Capitulino
    },
744 3418bd25 Gerd Hoffmann
745 2313086a Blue Swirl
STEXI
746 c427ea9c Markus Armbruster
@item cpu @var{index}
747 c427ea9c Markus Armbruster
@findex cpu
748 2313086a Blue Swirl
Set the default CPU.
749 2313086a Blue Swirl
ETEXI
750 b40292e7 Jan Kiszka
SQMP
751 b40292e7 Jan Kiszka
cpu
752 b40292e7 Jan Kiszka
---
753 b40292e7 Jan Kiszka
754 b40292e7 Jan Kiszka
Set the default CPU.
755 b40292e7 Jan Kiszka
756 b40292e7 Jan Kiszka
Arguments:
757 b40292e7 Jan Kiszka
758 b40292e7 Jan Kiszka
- "index": the CPU's index (json-int)
759 b40292e7 Jan Kiszka
760 b40292e7 Jan Kiszka
Example:
761 b40292e7 Jan Kiszka
762 b40292e7 Jan Kiszka
-> { "execute": "cpu", "arguments": { "index": 0 } }
763 b40292e7 Jan Kiszka
<- { "return": {} }
764 b40292e7 Jan Kiszka
765 b40292e7 Jan Kiszka
Note: CPUs' indexes are obtained with the 'query-cpus' command.
766 b40292e7 Jan Kiszka
767 b40292e7 Jan Kiszka
EQMP
768 2313086a Blue Swirl
769 d7f9b689 Luiz Capitulino
    {
770 d7f9b689 Luiz Capitulino
        .name       = "mouse_move",
771 d7f9b689 Luiz Capitulino
        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
772 d7f9b689 Luiz Capitulino
        .params     = "dx dy [dz]",
773 d7f9b689 Luiz Capitulino
        .help       = "send mouse move events",
774 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_mouse_move,
775 d7f9b689 Luiz Capitulino
    },
776 d7f9b689 Luiz Capitulino
777 2313086a Blue Swirl
STEXI
778 2313086a Blue Swirl
@item mouse_move @var{dx} @var{dy} [@var{dz}]
779 70fcbbe7 Stefan Weil
@findex mouse_move
780 2313086a Blue Swirl
Move the active mouse to the specified coordinates @var{dx} @var{dy}
781 2313086a Blue Swirl
with optional scroll axis @var{dz}.
782 2313086a Blue Swirl
ETEXI
783 2313086a Blue Swirl
784 d7f9b689 Luiz Capitulino
    {
785 d7f9b689 Luiz Capitulino
        .name       = "mouse_button",
786 d7f9b689 Luiz Capitulino
        .args_type  = "button_state:i",
787 d7f9b689 Luiz Capitulino
        .params     = "state",
788 d7f9b689 Luiz Capitulino
        .help       = "change mouse button state (1=L, 2=M, 4=R)",
789 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_mouse_button,
790 d7f9b689 Luiz Capitulino
    },
791 d7f9b689 Luiz Capitulino
792 2313086a Blue Swirl
STEXI
793 2313086a Blue Swirl
@item mouse_button @var{val}
794 70fcbbe7 Stefan Weil
@findex mouse_button
795 2313086a Blue Swirl
Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
796 2313086a Blue Swirl
ETEXI
797 2313086a Blue Swirl
798 d7f9b689 Luiz Capitulino
    {
799 d7f9b689 Luiz Capitulino
        .name       = "mouse_set",
800 d7f9b689 Luiz Capitulino
        .args_type  = "index:i",
801 d7f9b689 Luiz Capitulino
        .params     = "index",
802 d7f9b689 Luiz Capitulino
        .help       = "set which mouse device receives events",
803 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_mouse_set,
804 d7f9b689 Luiz Capitulino
    },
805 d7f9b689 Luiz Capitulino
806 2313086a Blue Swirl
STEXI
807 2313086a Blue Swirl
@item mouse_set @var{index}
808 70fcbbe7 Stefan Weil
@findex mouse_set
809 2313086a Blue Swirl
Set which mouse device receives events at given @var{index}, index
810 2313086a Blue Swirl
can be obtained with
811 2313086a Blue Swirl
@example
812 2313086a Blue Swirl
info mice
813 2313086a Blue Swirl
@end example
814 2313086a Blue Swirl
ETEXI
815 2313086a Blue Swirl
816 2313086a Blue Swirl
#ifdef HAS_AUDIO
817 d7f9b689 Luiz Capitulino
    {
818 d7f9b689 Luiz Capitulino
        .name       = "wavcapture",
819 d7f9b689 Luiz Capitulino
        .args_type  = "path:F,freq:i?,bits:i?,nchannels:i?",
820 d7f9b689 Luiz Capitulino
        .params     = "path [frequency [bits [channels]]]",
821 d7f9b689 Luiz Capitulino
        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
822 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_wav_capture,
823 d7f9b689 Luiz Capitulino
    },
824 2313086a Blue Swirl
#endif
825 2313086a Blue Swirl
STEXI
826 2313086a Blue Swirl
@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
827 70fcbbe7 Stefan Weil
@findex wavcapture
828 2313086a Blue Swirl
Capture audio into @var{filename}. Using sample rate @var{frequency}
829 2313086a Blue Swirl
bits per sample @var{bits} and number of channels @var{channels}.
830 2313086a Blue Swirl
831 2313086a Blue Swirl
Defaults:
832 2313086a Blue Swirl
@itemize @minus
833 2313086a Blue Swirl
@item Sample rate = 44100 Hz - CD quality
834 2313086a Blue Swirl
@item Bits = 16
835 2313086a Blue Swirl
@item Number of channels = 2 - Stereo
836 2313086a Blue Swirl
@end itemize
837 2313086a Blue Swirl
ETEXI
838 2313086a Blue Swirl
839 2313086a Blue Swirl
#ifdef HAS_AUDIO
840 d7f9b689 Luiz Capitulino
    {
841 d7f9b689 Luiz Capitulino
        .name       = "stopcapture",
842 d7f9b689 Luiz Capitulino
        .args_type  = "n:i",
843 d7f9b689 Luiz Capitulino
        .params     = "capture index",
844 d7f9b689 Luiz Capitulino
        .help       = "stop capture",
845 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_stop_capture,
846 d7f9b689 Luiz Capitulino
    },
847 2313086a Blue Swirl
#endif
848 2313086a Blue Swirl
STEXI
849 2313086a Blue Swirl
@item stopcapture @var{index}
850 70fcbbe7 Stefan Weil
@findex stopcapture
851 2313086a Blue Swirl
Stop capture with a given @var{index}, index can be obtained with
852 2313086a Blue Swirl
@example
853 2313086a Blue Swirl
info capture
854 2313086a Blue Swirl
@end example
855 2313086a Blue Swirl
ETEXI
856 2313086a Blue Swirl
857 d7f9b689 Luiz Capitulino
    {
858 d7f9b689 Luiz Capitulino
        .name       = "memsave",
859 d7f9b689 Luiz Capitulino
        .args_type  = "val:l,size:i,filename:s",
860 d7f9b689 Luiz Capitulino
        .params     = "addr size file",
861 d7f9b689 Luiz Capitulino
        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
862 57e09454 Luiz Capitulino
        .user_print = monitor_user_noop,
863 261394db Luiz Capitulino
        .mhandler.cmd_new = do_memory_save,
864 d7f9b689 Luiz Capitulino
    },
865 d7f9b689 Luiz Capitulino
866 2313086a Blue Swirl
STEXI
867 2313086a Blue Swirl
@item memsave @var{addr} @var{size} @var{file}
868 70fcbbe7 Stefan Weil
@findex memsave
869 2313086a Blue Swirl
save to disk virtual memory dump starting at @var{addr} of size @var{size}.
870 2313086a Blue Swirl
ETEXI
871 b40292e7 Jan Kiszka
SQMP
872 b40292e7 Jan Kiszka
memsave
873 b40292e7 Jan Kiszka
-------
874 b40292e7 Jan Kiszka
875 b40292e7 Jan Kiszka
Save to disk virtual memory dump starting at 'val' of size 'size'.
876 b40292e7 Jan Kiszka
877 b40292e7 Jan Kiszka
Arguments:
878 b40292e7 Jan Kiszka
879 b40292e7 Jan Kiszka
- "val": the starting address (json-int)
880 b40292e7 Jan Kiszka
- "size": the memory size, in bytes (json-int)
881 b40292e7 Jan Kiszka
- "filename": file path (json-string)
882 b40292e7 Jan Kiszka
883 b40292e7 Jan Kiszka
Example:
884 b40292e7 Jan Kiszka
885 b40292e7 Jan Kiszka
-> { "execute": "memsave",
886 b40292e7 Jan Kiszka
             "arguments": { "val": 10,
887 b40292e7 Jan Kiszka
                            "size": 100,
888 b40292e7 Jan Kiszka
                            "filename": "/tmp/virtual-mem-dump" } }
889 b40292e7 Jan Kiszka
<- { "return": {} }
890 b40292e7 Jan Kiszka
891 b40292e7 Jan Kiszka
Note: Depends on the current CPU.
892 b40292e7 Jan Kiszka
893 b40292e7 Jan Kiszka
EQMP
894 2313086a Blue Swirl
895 d7f9b689 Luiz Capitulino
    {
896 d7f9b689 Luiz Capitulino
        .name       = "pmemsave",
897 d7f9b689 Luiz Capitulino
        .args_type  = "val:l,size:i,filename:s",
898 d7f9b689 Luiz Capitulino
        .params     = "addr size file",
899 d7f9b689 Luiz Capitulino
        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
900 18f5a8bf Luiz Capitulino
        .user_print = monitor_user_noop,
901 261394db Luiz Capitulino
        .mhandler.cmd_new = do_physical_memory_save,
902 d7f9b689 Luiz Capitulino
    },
903 d7f9b689 Luiz Capitulino
904 2313086a Blue Swirl
STEXI
905 2313086a Blue Swirl
@item pmemsave @var{addr} @var{size} @var{file}
906 70fcbbe7 Stefan Weil
@findex pmemsave
907 2313086a Blue Swirl
save to disk physical memory dump starting at @var{addr} of size @var{size}.
908 2313086a Blue Swirl
ETEXI
909 b40292e7 Jan Kiszka
SQMP
910 b40292e7 Jan Kiszka
pmemsave
911 b40292e7 Jan Kiszka
--------
912 b40292e7 Jan Kiszka
913 b40292e7 Jan Kiszka
Save to disk physical memory dump starting at 'val' of size 'size'.
914 b40292e7 Jan Kiszka
915 b40292e7 Jan Kiszka
Arguments:
916 b40292e7 Jan Kiszka
917 b40292e7 Jan Kiszka
- "val": the starting address (json-int)
918 b40292e7 Jan Kiszka
- "size": the memory size, in bytes (json-int)
919 b40292e7 Jan Kiszka
- "filename": file path (json-string)
920 b40292e7 Jan Kiszka
921 b40292e7 Jan Kiszka
Example:
922 b40292e7 Jan Kiszka
923 b40292e7 Jan Kiszka
-> { "execute": "pmemsave",
924 b40292e7 Jan Kiszka
             "arguments": { "val": 10,
925 b40292e7 Jan Kiszka
                            "size": 100,
926 b40292e7 Jan Kiszka
                            "filename": "/tmp/physical-mem-dump" } }
927 b40292e7 Jan Kiszka
<- { "return": {} }
928 b40292e7 Jan Kiszka
929 b40292e7 Jan Kiszka
EQMP
930 2313086a Blue Swirl
931 d7f9b689 Luiz Capitulino
    {
932 d7f9b689 Luiz Capitulino
        .name       = "boot_set",
933 d7f9b689 Luiz Capitulino
        .args_type  = "bootdevice:s",
934 d7f9b689 Luiz Capitulino
        .params     = "bootdevice",
935 d7f9b689 Luiz Capitulino
        .help       = "define new values for the boot device list",
936 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_boot_set,
937 d7f9b689 Luiz Capitulino
    },
938 d7f9b689 Luiz Capitulino
939 2313086a Blue Swirl
STEXI
940 2313086a Blue Swirl
@item boot_set @var{bootdevicelist}
941 70fcbbe7 Stefan Weil
@findex boot_set
942 2313086a Blue Swirl
943 2313086a Blue Swirl
Define new values for the boot device list. Those values will override
944 2313086a Blue Swirl
the values specified on the command line through the @code{-boot} option.
945 2313086a Blue Swirl
946 2313086a Blue Swirl
The values that can be specified here depend on the machine type, but are
947 2313086a Blue Swirl
the same that can be specified in the @code{-boot} command line option.
948 2313086a Blue Swirl
ETEXI
949 2313086a Blue Swirl
950 2313086a Blue Swirl
#if defined(TARGET_I386)
951 d7f9b689 Luiz Capitulino
    {
952 d7f9b689 Luiz Capitulino
        .name       = "nmi",
953 d7f9b689 Luiz Capitulino
        .args_type  = "cpu_index:i",
954 d7f9b689 Luiz Capitulino
        .params     = "cpu",
955 d7f9b689 Luiz Capitulino
        .help       = "inject an NMI on the given CPU",
956 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_inject_nmi,
957 d7f9b689 Luiz Capitulino
    },
958 2313086a Blue Swirl
#endif
959 2313086a Blue Swirl
STEXI
960 2313086a Blue Swirl
@item nmi @var{cpu}
961 70fcbbe7 Stefan Weil
@findex nmi
962 2313086a Blue Swirl
Inject an NMI on the given CPU (x86 only).
963 2313086a Blue Swirl
ETEXI
964 2313086a Blue Swirl
965 d7f9b689 Luiz Capitulino
    {
966 d7f9b689 Luiz Capitulino
        .name       = "migrate",
967 fbc3d96c lirans@il.ibm.com
        .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
968 fbc3d96c lirans@il.ibm.com
        .params     = "[-d] [-b] [-i] uri",
969 fbc3d96c lirans@il.ibm.com
        .help       = "migrate to URI (using -d to not wait for completion)"
970 fbc3d96c lirans@il.ibm.com
		      "\n\t\t\t -b for migration without shared storage with"
971 fbc3d96c lirans@il.ibm.com
		      " full copy of disk\n\t\t\t -i for migration without "
972 fbc3d96c lirans@il.ibm.com
		      "shared storage with incremental copy of disk "
973 fbc3d96c lirans@il.ibm.com
		      "(base image shared between src and destination)",
974 fbc3d96c lirans@il.ibm.com
        .user_print = monitor_user_noop,	
975 261394db Luiz Capitulino
	.mhandler.cmd_new = do_migrate,
976 d7f9b689 Luiz Capitulino
    },
977 d7f9b689 Luiz Capitulino
978 fbc3d96c lirans@il.ibm.com
979 2313086a Blue Swirl
STEXI
980 fbc3d96c lirans@il.ibm.com
@item migrate [-d] [-b] [-i] @var{uri}
981 70fcbbe7 Stefan Weil
@findex migrate
982 2313086a Blue Swirl
Migrate to @var{uri} (using -d to not wait for completion).
983 fbc3d96c lirans@il.ibm.com
	-b for migration with full copy of disk
984 fbc3d96c lirans@il.ibm.com
	-i for migration with incremental copy of disk (base image is shared)
985 2313086a Blue Swirl
ETEXI
986 b40292e7 Jan Kiszka
SQMP
987 b40292e7 Jan Kiszka
migrate
988 b40292e7 Jan Kiszka
-------
989 b40292e7 Jan Kiszka
990 b40292e7 Jan Kiszka
Migrate to URI.
991 b40292e7 Jan Kiszka
992 b40292e7 Jan Kiszka
Arguments:
993 b40292e7 Jan Kiszka
994 b40292e7 Jan Kiszka
- "blk": block migration, full disk copy (json-bool, optional)
995 b40292e7 Jan Kiszka
- "inc": incremental disk copy (json-bool, optional)
996 b40292e7 Jan Kiszka
- "uri": Destination URI (json-string)
997 b40292e7 Jan Kiszka
998 b40292e7 Jan Kiszka
Example:
999 b40292e7 Jan Kiszka
1000 b40292e7 Jan Kiszka
-> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1001 b40292e7 Jan Kiszka
<- { "return": {} }
1002 b40292e7 Jan Kiszka
1003 b40292e7 Jan Kiszka
Notes:
1004 b40292e7 Jan Kiszka
1005 b40292e7 Jan Kiszka
(1) The 'query-migrate' command should be used to check migration's progress
1006 b40292e7 Jan Kiszka
    and final result (this information is provided by the 'status' member)
1007 b40292e7 Jan Kiszka
(2) All boolean arguments default to false
1008 b40292e7 Jan Kiszka
(3) The user Monitor's "detach" argument is invalid in QMP and should not
1009 b40292e7 Jan Kiszka
    be used
1010 b40292e7 Jan Kiszka
1011 b40292e7 Jan Kiszka
EQMP
1012 2313086a Blue Swirl
1013 d7f9b689 Luiz Capitulino
    {
1014 d7f9b689 Luiz Capitulino
        .name       = "migrate_cancel",
1015 d7f9b689 Luiz Capitulino
        .args_type  = "",
1016 d7f9b689 Luiz Capitulino
        .params     = "",
1017 d7f9b689 Luiz Capitulino
        .help       = "cancel the current VM migration",
1018 911d2963 Luiz Capitulino
        .user_print = monitor_user_noop,
1019 261394db Luiz Capitulino
        .mhandler.cmd_new = do_migrate_cancel,
1020 d7f9b689 Luiz Capitulino
    },
1021 d7f9b689 Luiz Capitulino
1022 2313086a Blue Swirl
STEXI
1023 2313086a Blue Swirl
@item migrate_cancel
1024 70fcbbe7 Stefan Weil
@findex migrate_cancel
1025 2313086a Blue Swirl
Cancel the current VM migration.
1026 2313086a Blue Swirl
ETEXI
1027 b40292e7 Jan Kiszka
SQMP
1028 b40292e7 Jan Kiszka
migrate_cancel
1029 b40292e7 Jan Kiszka
--------------
1030 b40292e7 Jan Kiszka
1031 b40292e7 Jan Kiszka
Cancel the current migration.
1032 b40292e7 Jan Kiszka
1033 b40292e7 Jan Kiszka
Arguments: None.
1034 b40292e7 Jan Kiszka
1035 b40292e7 Jan Kiszka
Example:
1036 b40292e7 Jan Kiszka
1037 b40292e7 Jan Kiszka
-> { "execute": "migrate_cancel" }
1038 b40292e7 Jan Kiszka
<- { "return": {} }
1039 b40292e7 Jan Kiszka
1040 b40292e7 Jan Kiszka
EQMP
1041 2313086a Blue Swirl
1042 d7f9b689 Luiz Capitulino
    {
1043 d7f9b689 Luiz Capitulino
        .name       = "migrate_set_speed",
1044 ee9545da Markus Armbruster
        .args_type  = "value:f",
1045 d7f9b689 Luiz Capitulino
        .params     = "value",
1046 d7f9b689 Luiz Capitulino
        .help       = "set maximum speed (in bytes) for migrations",
1047 5fd9083c Markus Armbruster
        .user_print = monitor_user_noop,
1048 261394db Luiz Capitulino
        .mhandler.cmd_new = do_migrate_set_speed,
1049 d7f9b689 Luiz Capitulino
    },
1050 d7f9b689 Luiz Capitulino
1051 2313086a Blue Swirl
STEXI
1052 2313086a Blue Swirl
@item migrate_set_speed @var{value}
1053 70fcbbe7 Stefan Weil
@findex migrate_set_speed
1054 2313086a Blue Swirl
Set maximum speed to @var{value} (in bytes) for migrations.
1055 2313086a Blue Swirl
ETEXI
1056 b40292e7 Jan Kiszka
SQMP
1057 b40292e7 Jan Kiszka
migrate_set_speed
1058 b40292e7 Jan Kiszka
-----------------
1059 b40292e7 Jan Kiszka
1060 b40292e7 Jan Kiszka
Set maximum speed for migrations.
1061 b40292e7 Jan Kiszka
1062 b40292e7 Jan Kiszka
Arguments:
1063 b40292e7 Jan Kiszka
1064 b40292e7 Jan Kiszka
- "value": maximum speed, in bytes per second (json-number)
1065 b40292e7 Jan Kiszka
1066 b40292e7 Jan Kiszka
Example:
1067 b40292e7 Jan Kiszka
1068 b40292e7 Jan Kiszka
-> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1069 b40292e7 Jan Kiszka
<- { "return": {} }
1070 b40292e7 Jan Kiszka
1071 b40292e7 Jan Kiszka
EQMP
1072 2313086a Blue Swirl
1073 d7f9b689 Luiz Capitulino
    {
1074 d7f9b689 Luiz Capitulino
        .name       = "migrate_set_downtime",
1075 b0fbf7d3 Markus Armbruster
        .args_type  = "value:T",
1076 d7f9b689 Luiz Capitulino
        .params     = "value",
1077 d7f9b689 Luiz Capitulino
        .help       = "set maximum tolerated downtime (in seconds) for migrations",
1078 c6027f56 Markus Armbruster
        .user_print = monitor_user_noop,
1079 261394db Luiz Capitulino
        .mhandler.cmd_new = do_migrate_set_downtime,
1080 d7f9b689 Luiz Capitulino
    },
1081 2ea42952 Glauber Costa
1082 2ea42952 Glauber Costa
STEXI
1083 2ea42952 Glauber Costa
@item migrate_set_downtime @var{second}
1084 70fcbbe7 Stefan Weil
@findex migrate_set_downtime
1085 2ea42952 Glauber Costa
Set maximum tolerated downtime (in seconds) for migration.
1086 2ea42952 Glauber Costa
ETEXI
1087 b40292e7 Jan Kiszka
SQMP
1088 b40292e7 Jan Kiszka
migrate_set_downtime
1089 b40292e7 Jan Kiszka
--------------------
1090 b40292e7 Jan Kiszka
1091 b40292e7 Jan Kiszka
Set maximum tolerated downtime (in seconds) for migrations.
1092 b40292e7 Jan Kiszka
1093 b40292e7 Jan Kiszka
Arguments:
1094 b40292e7 Jan Kiszka
1095 b40292e7 Jan Kiszka
- "value": maximum downtime (json-number)
1096 b40292e7 Jan Kiszka
1097 b40292e7 Jan Kiszka
Example:
1098 b40292e7 Jan Kiszka
1099 b40292e7 Jan Kiszka
-> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1100 b40292e7 Jan Kiszka
<- { "return": {} }
1101 b40292e7 Jan Kiszka
1102 b40292e7 Jan Kiszka
EQMP
1103 2ea42952 Glauber Costa
1104 2313086a Blue Swirl
#if defined(TARGET_I386)
1105 d7f9b689 Luiz Capitulino
    {
1106 d7f9b689 Luiz Capitulino
        .name       = "drive_add",
1107 d7f9b689 Luiz Capitulino
        .args_type  = "pci_addr:s,opts:s",
1108 d7f9b689 Luiz Capitulino
        .params     = "[[<domain>:]<bus>:]<slot>\n"
1109 d7f9b689 Luiz Capitulino
                      "[file=file][,if=type][,bus=n]\n"
1110 d7f9b689 Luiz Capitulino
                      "[,unit=m][,media=d][index=i]\n"
1111 d7f9b689 Luiz Capitulino
                      "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
1112 d7f9b689 Luiz Capitulino
                      "[snapshot=on|off][,cache=on|off]",
1113 d7f9b689 Luiz Capitulino
        .help       = "add drive to PCI storage controller",
1114 af4ce882 Luiz Capitulino
        .mhandler.cmd = drive_hot_add,
1115 d7f9b689 Luiz Capitulino
    },
1116 2313086a Blue Swirl
#endif
1117 d7f9b689 Luiz Capitulino
1118 2313086a Blue Swirl
STEXI
1119 2313086a Blue Swirl
@item drive_add
1120 70fcbbe7 Stefan Weil
@findex drive_add
1121 2313086a Blue Swirl
Add drive to PCI storage controller.
1122 2313086a Blue Swirl
ETEXI
1123 2313086a Blue Swirl
1124 2313086a Blue Swirl
#if defined(TARGET_I386)
1125 d7f9b689 Luiz Capitulino
    {
1126 d7f9b689 Luiz Capitulino
        .name       = "pci_add",
1127 d7f9b689 Luiz Capitulino
        .args_type  = "pci_addr:s,type:s,opts:s?",
1128 d7f9b689 Luiz Capitulino
        .params     = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
1129 d7f9b689 Luiz Capitulino
        .help       = "hot-add PCI device",
1130 6c6a58ae Markus Armbruster
        .mhandler.cmd = pci_device_hot_add,
1131 d7f9b689 Luiz Capitulino
    },
1132 2313086a Blue Swirl
#endif
1133 d7f9b689 Luiz Capitulino
1134 2313086a Blue Swirl
STEXI
1135 2313086a Blue Swirl
@item pci_add
1136 70fcbbe7 Stefan Weil
@findex pci_add
1137 2313086a Blue Swirl
Hot-add PCI device.
1138 2313086a Blue Swirl
ETEXI
1139 2313086a Blue Swirl
1140 2313086a Blue Swirl
#if defined(TARGET_I386)
1141 d7f9b689 Luiz Capitulino
    {
1142 d7f9b689 Luiz Capitulino
        .name       = "pci_del",
1143 d7f9b689 Luiz Capitulino
        .args_type  = "pci_addr:s",
1144 d7f9b689 Luiz Capitulino
        .params     = "[[<domain>:]<bus>:]<slot>",
1145 d7f9b689 Luiz Capitulino
        .help       = "hot remove PCI device",
1146 b752daf0 Markus Armbruster
        .mhandler.cmd = do_pci_device_hot_remove,
1147 d7f9b689 Luiz Capitulino
    },
1148 2313086a Blue Swirl
#endif
1149 d7f9b689 Luiz Capitulino
1150 2313086a Blue Swirl
STEXI
1151 2313086a Blue Swirl
@item pci_del
1152 70fcbbe7 Stefan Weil
@findex pci_del
1153 2313086a Blue Swirl
Hot remove PCI device.
1154 2313086a Blue Swirl
ETEXI
1155 2313086a Blue Swirl
1156 d7f9b689 Luiz Capitulino
    {
1157 d7f9b689 Luiz Capitulino
        .name       = "host_net_add",
1158 d7f9b689 Luiz Capitulino
        .args_type  = "device:s,opts:s?",
1159 d7f9b689 Luiz Capitulino
        .params     = "tap|user|socket|vde|dump [options]",
1160 d7f9b689 Luiz Capitulino
        .help       = "add host VLAN client",
1161 af4ce882 Luiz Capitulino
        .mhandler.cmd = net_host_device_add,
1162 d7f9b689 Luiz Capitulino
    },
1163 d7f9b689 Luiz Capitulino
1164 2313086a Blue Swirl
STEXI
1165 2313086a Blue Swirl
@item host_net_add
1166 70fcbbe7 Stefan Weil
@findex host_net_add
1167 2313086a Blue Swirl
Add host VLAN client.
1168 2313086a Blue Swirl
ETEXI
1169 2313086a Blue Swirl
1170 d7f9b689 Luiz Capitulino
    {
1171 d7f9b689 Luiz Capitulino
        .name       = "host_net_remove",
1172 d7f9b689 Luiz Capitulino
        .args_type  = "vlan_id:i,device:s",
1173 d7f9b689 Luiz Capitulino
        .params     = "vlan_id name",
1174 d7f9b689 Luiz Capitulino
        .help       = "remove host VLAN client",
1175 af4ce882 Luiz Capitulino
        .mhandler.cmd = net_host_device_remove,
1176 d7f9b689 Luiz Capitulino
    },
1177 d7f9b689 Luiz Capitulino
1178 2313086a Blue Swirl
STEXI
1179 2313086a Blue Swirl
@item host_net_remove
1180 70fcbbe7 Stefan Weil
@findex host_net_remove
1181 2313086a Blue Swirl
Remove host VLAN client.
1182 2313086a Blue Swirl
ETEXI
1183 2313086a Blue Swirl
1184 ae82d324 Markus Armbruster
    {
1185 ae82d324 Markus Armbruster
        .name       = "netdev_add",
1186 ae82d324 Markus Armbruster
        .args_type  = "netdev:O",
1187 ae82d324 Markus Armbruster
        .params     = "[user|tap|socket],id=str[,prop=value][,...]",
1188 ae82d324 Markus Armbruster
        .help       = "add host network device",
1189 ae82d324 Markus Armbruster
        .user_print = monitor_user_noop,
1190 ae82d324 Markus Armbruster
        .mhandler.cmd_new = do_netdev_add,
1191 ae82d324 Markus Armbruster
    },
1192 ae82d324 Markus Armbruster
1193 ae82d324 Markus Armbruster
STEXI
1194 ae82d324 Markus Armbruster
@item netdev_add
1195 ae82d324 Markus Armbruster
@findex netdev_add
1196 ae82d324 Markus Armbruster
Add host network device.
1197 ae82d324 Markus Armbruster
ETEXI
1198 b40292e7 Jan Kiszka
SQMP
1199 b40292e7 Jan Kiszka
netdev_add
1200 b40292e7 Jan Kiszka
----------
1201 b40292e7 Jan Kiszka
1202 b40292e7 Jan Kiszka
Add host network device.
1203 b40292e7 Jan Kiszka
1204 b40292e7 Jan Kiszka
Arguments:
1205 b40292e7 Jan Kiszka
1206 b40292e7 Jan Kiszka
- "type": the device type, "tap", "user", ... (json-string)
1207 b40292e7 Jan Kiszka
- "id": the device's ID, must be unique (json-string)
1208 b40292e7 Jan Kiszka
- device options
1209 b40292e7 Jan Kiszka
1210 b40292e7 Jan Kiszka
Example:
1211 b40292e7 Jan Kiszka
1212 b40292e7 Jan Kiszka
-> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
1213 b40292e7 Jan Kiszka
<- { "return": {} }
1214 b40292e7 Jan Kiszka
1215 b40292e7 Jan Kiszka
Note: The supported device options are the same ones supported by the '-net'
1216 b40292e7 Jan Kiszka
      command-line argument, which are listed in the '-help' output or QEMU's
1217 b40292e7 Jan Kiszka
      manual
1218 b40292e7 Jan Kiszka
1219 b40292e7 Jan Kiszka
EQMP
1220 ae82d324 Markus Armbruster
1221 ae82d324 Markus Armbruster
    {
1222 ae82d324 Markus Armbruster
        .name       = "netdev_del",
1223 ae82d324 Markus Armbruster
        .args_type  = "id:s",
1224 ae82d324 Markus Armbruster
        .params     = "id",
1225 ae82d324 Markus Armbruster
        .help       = "remove host network device",
1226 ae82d324 Markus Armbruster
        .user_print = monitor_user_noop,
1227 ae82d324 Markus Armbruster
        .mhandler.cmd_new = do_netdev_del,
1228 ae82d324 Markus Armbruster
    },
1229 ae82d324 Markus Armbruster
1230 ae82d324 Markus Armbruster
STEXI
1231 ae82d324 Markus Armbruster
@item netdev_del
1232 ae82d324 Markus Armbruster
@findex netdev_del
1233 ae82d324 Markus Armbruster
Remove host network device.
1234 ae82d324 Markus Armbruster
ETEXI
1235 b40292e7 Jan Kiszka
SQMP
1236 b40292e7 Jan Kiszka
netdev_del
1237 b40292e7 Jan Kiszka
----------
1238 b40292e7 Jan Kiszka
1239 b40292e7 Jan Kiszka
Remove host network device.
1240 b40292e7 Jan Kiszka
1241 b40292e7 Jan Kiszka
Arguments:
1242 b40292e7 Jan Kiszka
1243 b40292e7 Jan Kiszka
- "id": the device's ID, must be unique (json-string)
1244 b40292e7 Jan Kiszka
1245 b40292e7 Jan Kiszka
Example:
1246 b40292e7 Jan Kiszka
1247 b40292e7 Jan Kiszka
-> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
1248 b40292e7 Jan Kiszka
<- { "return": {} }
1249 b40292e7 Jan Kiszka
1250 b40292e7 Jan Kiszka
EQMP
1251 ae82d324 Markus Armbruster
1252 2313086a Blue Swirl
#ifdef CONFIG_SLIRP
1253 d7f9b689 Luiz Capitulino
    {
1254 d7f9b689 Luiz Capitulino
        .name       = "hostfwd_add",
1255 d7f9b689 Luiz Capitulino
        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1256 d7f9b689 Luiz Capitulino
        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1257 d7f9b689 Luiz Capitulino
        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
1258 af4ce882 Luiz Capitulino
        .mhandler.cmd = net_slirp_hostfwd_add,
1259 d7f9b689 Luiz Capitulino
    },
1260 21413d68 Markus Armbruster
#endif
1261 21413d68 Markus Armbruster
STEXI
1262 21413d68 Markus Armbruster
@item hostfwd_add
1263 21413d68 Markus Armbruster
@findex hostfwd_add
1264 21413d68 Markus Armbruster
Redirect TCP or UDP connections from host to guest (requires -net user).
1265 21413d68 Markus Armbruster
ETEXI
1266 d7f9b689 Luiz Capitulino
1267 21413d68 Markus Armbruster
#ifdef CONFIG_SLIRP
1268 d7f9b689 Luiz Capitulino
    {
1269 d7f9b689 Luiz Capitulino
        .name       = "hostfwd_remove",
1270 d7f9b689 Luiz Capitulino
        .args_type  = "arg1:s,arg2:s?,arg3:s?",
1271 d7f9b689 Luiz Capitulino
        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1272 d7f9b689 Luiz Capitulino
        .help       = "remove host-to-guest TCP or UDP redirection",
1273 af4ce882 Luiz Capitulino
        .mhandler.cmd = net_slirp_hostfwd_remove,
1274 d7f9b689 Luiz Capitulino
    },
1275 d7f9b689 Luiz Capitulino
1276 2313086a Blue Swirl
#endif
1277 2313086a Blue Swirl
STEXI
1278 21413d68 Markus Armbruster
@item hostfwd_remove
1279 21413d68 Markus Armbruster
@findex hostfwd_remove
1280 21413d68 Markus Armbruster
Remove host-to-guest TCP or UDP redirection.
1281 2313086a Blue Swirl
ETEXI
1282 2313086a Blue Swirl
1283 d7f9b689 Luiz Capitulino
    {
1284 d7f9b689 Luiz Capitulino
        .name       = "balloon",
1285 3b0bd6ec Luiz Capitulino
        .args_type  = "value:M",
1286 d7f9b689 Luiz Capitulino
        .params     = "target",
1287 3c05613a Riccardo Magliocchetti
        .help       = "request VM to change its memory allocation (in MB)",
1288 83fb1de2 Luiz Capitulino
        .user_print = monitor_user_noop,
1289 625a5bef Adam Litke
        .mhandler.cmd_async = do_balloon,
1290 8ac470c1 Jan Kiszka
        .flags      = MONITOR_CMD_ASYNC,
1291 d7f9b689 Luiz Capitulino
    },
1292 d7f9b689 Luiz Capitulino
1293 2313086a Blue Swirl
STEXI
1294 2313086a Blue Swirl
@item balloon @var{value}
1295 70fcbbe7 Stefan Weil
@findex balloon
1296 2313086a Blue Swirl
Request VM to change its memory allocation to @var{value} (in MB).
1297 2313086a Blue Swirl
ETEXI
1298 b40292e7 Jan Kiszka
SQMP
1299 b40292e7 Jan Kiszka
balloon
1300 b40292e7 Jan Kiszka
-------
1301 b40292e7 Jan Kiszka
1302 b40292e7 Jan Kiszka
Request VM to change its memory allocation (in bytes).
1303 b40292e7 Jan Kiszka
1304 b40292e7 Jan Kiszka
Arguments:
1305 b40292e7 Jan Kiszka
1306 b40292e7 Jan Kiszka
- "value": New memory allocation (json-int)
1307 b40292e7 Jan Kiszka
1308 b40292e7 Jan Kiszka
Example:
1309 b40292e7 Jan Kiszka
1310 b40292e7 Jan Kiszka
-> { "execute": "balloon", "arguments": { "value": 536870912 } }
1311 b40292e7 Jan Kiszka
<- { "return": {} }
1312 b40292e7 Jan Kiszka
1313 b40292e7 Jan Kiszka
EQMP
1314 2313086a Blue Swirl
1315 d7f9b689 Luiz Capitulino
    {
1316 d7f9b689 Luiz Capitulino
        .name       = "set_link",
1317 c9b26a4c Markus Armbruster
        .args_type  = "name:s,up:b",
1318 c9b26a4c Markus Armbruster
        .params     = "name on|off",
1319 d7f9b689 Luiz Capitulino
        .help       = "change the link status of a network adapter",
1320 5369e3c0 Markus Armbruster
        .user_print = monitor_user_noop,
1321 5369e3c0 Markus Armbruster
        .mhandler.cmd_new = do_set_link,
1322 d7f9b689 Luiz Capitulino
    },
1323 d7f9b689 Luiz Capitulino
1324 2313086a Blue Swirl
STEXI
1325 c9b26a4c Markus Armbruster
@item set_link @var{name} [on|off]
1326 70fcbbe7 Stefan Weil
@findex set_link
1327 c9b26a4c Markus Armbruster
Switch link @var{name} on (i.e. up) or off (i.e. down).
1328 2313086a Blue Swirl
ETEXI
1329 b40292e7 Jan Kiszka
SQMP
1330 b40292e7 Jan Kiszka
set_link
1331 b40292e7 Jan Kiszka
--------
1332 b40292e7 Jan Kiszka
1333 b40292e7 Jan Kiszka
Change the link status of a network adapter.
1334 b40292e7 Jan Kiszka
1335 b40292e7 Jan Kiszka
Arguments:
1336 b40292e7 Jan Kiszka
1337 b40292e7 Jan Kiszka
- "name": network device name (json-string)
1338 b40292e7 Jan Kiszka
- "up": status is up (json-bool)
1339 b40292e7 Jan Kiszka
1340 b40292e7 Jan Kiszka
Example:
1341 b40292e7 Jan Kiszka
1342 b40292e7 Jan Kiszka
-> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1343 b40292e7 Jan Kiszka
<- { "return": {} }
1344 b40292e7 Jan Kiszka
1345 b40292e7 Jan Kiszka
EQMP
1346 2313086a Blue Swirl
1347 d7f9b689 Luiz Capitulino
    {
1348 d7f9b689 Luiz Capitulino
        .name       = "watchdog_action",
1349 d7f9b689 Luiz Capitulino
        .args_type  = "action:s",
1350 d7f9b689 Luiz Capitulino
        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
1351 d7f9b689 Luiz Capitulino
        .help       = "change watchdog action",
1352 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_watchdog_action,
1353 d7f9b689 Luiz Capitulino
    },
1354 d7f9b689 Luiz Capitulino
1355 2313086a Blue Swirl
STEXI
1356 2313086a Blue Swirl
@item watchdog_action
1357 70fcbbe7 Stefan Weil
@findex watchdog_action
1358 2313086a Blue Swirl
Change watchdog action.
1359 2313086a Blue Swirl
ETEXI
1360 2313086a Blue Swirl
1361 d7f9b689 Luiz Capitulino
    {
1362 d7f9b689 Luiz Capitulino
        .name       = "acl_show",
1363 d7f9b689 Luiz Capitulino
        .args_type  = "aclname:s",
1364 d7f9b689 Luiz Capitulino
        .params     = "aclname",
1365 d7f9b689 Luiz Capitulino
        .help       = "list rules in the access control list",
1366 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_acl_show,
1367 d7f9b689 Luiz Capitulino
    },
1368 d7f9b689 Luiz Capitulino
1369 2313086a Blue Swirl
STEXI
1370 15dfcd45 Jan Kiszka
@item acl_show @var{aclname}
1371 70fcbbe7 Stefan Weil
@findex acl_show
1372 15dfcd45 Jan Kiszka
List all the matching rules in the access control list, and the default
1373 15dfcd45 Jan Kiszka
policy. There are currently two named access control lists,
1374 15dfcd45 Jan Kiszka
@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1375 15dfcd45 Jan Kiszka
certificate distinguished name, and SASL username respectively.
1376 15dfcd45 Jan Kiszka
ETEXI
1377 2313086a Blue Swirl
1378 d7f9b689 Luiz Capitulino
    {
1379 d7f9b689 Luiz Capitulino
        .name       = "acl_policy",
1380 d7f9b689 Luiz Capitulino
        .args_type  = "aclname:s,policy:s",
1381 d7f9b689 Luiz Capitulino
        .params     = "aclname allow|deny",
1382 d7f9b689 Luiz Capitulino
        .help       = "set default access control list policy",
1383 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_acl_policy,
1384 d7f9b689 Luiz Capitulino
    },
1385 d7f9b689 Luiz Capitulino
1386 15dfcd45 Jan Kiszka
STEXI
1387 cbbfacc6 Jan Kiszka
@item acl_policy @var{aclname} @code{allow|deny}
1388 70fcbbe7 Stefan Weil
@findex acl_policy
1389 15dfcd45 Jan Kiszka
Set the default access control list policy, used in the event that
1390 2313086a Blue Swirl
none of the explicit rules match. The default policy at startup is
1391 15dfcd45 Jan Kiszka
always @code{deny}.
1392 15dfcd45 Jan Kiszka
ETEXI
1393 15dfcd45 Jan Kiszka
1394 d7f9b689 Luiz Capitulino
    {
1395 d7f9b689 Luiz Capitulino
        .name       = "acl_add",
1396 d7f9b689 Luiz Capitulino
        .args_type  = "aclname:s,match:s,policy:s,index:i?",
1397 d7f9b689 Luiz Capitulino
        .params     = "aclname match allow|deny [index]",
1398 d7f9b689 Luiz Capitulino
        .help       = "add a match rule to the access control list",
1399 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_acl_add,
1400 d7f9b689 Luiz Capitulino
    },
1401 d7f9b689 Luiz Capitulino
1402 15dfcd45 Jan Kiszka
STEXI
1403 0e4aec98 Markus Armbruster
@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1404 0e4aec98 Markus Armbruster
@findex acl_add
1405 15dfcd45 Jan Kiszka
Add a match rule to the access control list, allowing or denying access.
1406 15dfcd45 Jan Kiszka
The match will normally be an exact username or x509 distinguished name,
1407 15dfcd45 Jan Kiszka
but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1408 15dfcd45 Jan Kiszka
allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1409 2313086a Blue Swirl
normally be appended to the end of the ACL, but can be inserted
1410 15dfcd45 Jan Kiszka
earlier in the list if the optional @var{index} parameter is supplied.
1411 15dfcd45 Jan Kiszka
ETEXI
1412 15dfcd45 Jan Kiszka
1413 d7f9b689 Luiz Capitulino
    {
1414 d7f9b689 Luiz Capitulino
        .name       = "acl_remove",
1415 d7f9b689 Luiz Capitulino
        .args_type  = "aclname:s,match:s",
1416 d7f9b689 Luiz Capitulino
        .params     = "aclname match",
1417 d7f9b689 Luiz Capitulino
        .help       = "remove a match rule from the access control list",
1418 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_acl_remove,
1419 d7f9b689 Luiz Capitulino
    },
1420 d7f9b689 Luiz Capitulino
1421 15dfcd45 Jan Kiszka
STEXI
1422 15dfcd45 Jan Kiszka
@item acl_remove @var{aclname} @var{match}
1423 70fcbbe7 Stefan Weil
@findex acl_remove
1424 15dfcd45 Jan Kiszka
Remove the specified match rule from the access control list.
1425 15dfcd45 Jan Kiszka
ETEXI
1426 15dfcd45 Jan Kiszka
1427 d7f9b689 Luiz Capitulino
    {
1428 d7f9b689 Luiz Capitulino
        .name       = "acl_reset",
1429 d7f9b689 Luiz Capitulino
        .args_type  = "aclname:s",
1430 d7f9b689 Luiz Capitulino
        .params     = "aclname",
1431 d7f9b689 Luiz Capitulino
        .help       = "reset the access control list",
1432 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_acl_reset,
1433 d7f9b689 Luiz Capitulino
    },
1434 d7f9b689 Luiz Capitulino
1435 15dfcd45 Jan Kiszka
STEXI
1436 0e4aec98 Markus Armbruster
@item acl_reset @var{aclname}
1437 0e4aec98 Markus Armbruster
@findex acl_reset
1438 15dfcd45 Jan Kiszka
Remove all matches from the access control list, and set the default
1439 2313086a Blue Swirl
policy back to @code{deny}.
1440 2313086a Blue Swirl
ETEXI
1441 2313086a Blue Swirl
1442 79c4f6b0 Huang Ying
#if defined(TARGET_I386)
1443 d7f9b689 Luiz Capitulino
1444 d7f9b689 Luiz Capitulino
    {
1445 d7f9b689 Luiz Capitulino
        .name       = "mce",
1446 d7f9b689 Luiz Capitulino
        .args_type  = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1447 d7f9b689 Luiz Capitulino
        .params     = "cpu bank status mcgstatus addr misc",
1448 d7f9b689 Luiz Capitulino
        .help       = "inject a MCE on the given CPU",
1449 af4ce882 Luiz Capitulino
        .mhandler.cmd = do_inject_mce,
1450 d7f9b689 Luiz Capitulino
    },
1451 d7f9b689 Luiz Capitulino
1452 79c4f6b0 Huang Ying
#endif
1453 79c4f6b0 Huang Ying
STEXI
1454 79c4f6b0 Huang Ying
@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1455 70fcbbe7 Stefan Weil
@findex mce (x86)
1456 79c4f6b0 Huang Ying
Inject an MCE on the given CPU (x86 only).
1457 79c4f6b0 Huang Ying
ETEXI
1458 79c4f6b0 Huang Ying
1459 d7f9b689 Luiz Capitulino
    {
1460 d7f9b689 Luiz Capitulino
        .name       = "getfd",
1461 d7f9b689 Luiz Capitulino
        .args_type  = "fdname:s",
1462 d7f9b689 Luiz Capitulino
        .params     = "getfd name",
1463 d7f9b689 Luiz Capitulino
        .help       = "receive a file descriptor via SCM rights and assign it a name",
1464 f0d6000a Luiz Capitulino
        .user_print = monitor_user_noop,
1465 261394db Luiz Capitulino
        .mhandler.cmd_new = do_getfd,
1466 d7f9b689 Luiz Capitulino
    },
1467 d7f9b689 Luiz Capitulino
1468 f07918fd Mark McLoughlin
STEXI
1469 f07918fd Mark McLoughlin
@item getfd @var{fdname}
1470 70fcbbe7 Stefan Weil
@findex getfd
1471 f07918fd Mark McLoughlin
If a file descriptor is passed alongside this command using the SCM_RIGHTS
1472 f07918fd Mark McLoughlin
mechanism on unix sockets, it is stored using the name @var{fdname} for
1473 f07918fd Mark McLoughlin
later use by other monitor commands.
1474 f07918fd Mark McLoughlin
ETEXI
1475 b40292e7 Jan Kiszka
SQMP
1476 b40292e7 Jan Kiszka
getfd
1477 b40292e7 Jan Kiszka
-----
1478 b40292e7 Jan Kiszka
1479 b40292e7 Jan Kiszka
Receive a file descriptor via SCM rights and assign it a name.
1480 b40292e7 Jan Kiszka
1481 b40292e7 Jan Kiszka
Arguments:
1482 b40292e7 Jan Kiszka
1483 b40292e7 Jan Kiszka
- "fdname": file descriptor name (json-string)
1484 b40292e7 Jan Kiszka
1485 b40292e7 Jan Kiszka
Example:
1486 b40292e7 Jan Kiszka
1487 b40292e7 Jan Kiszka
-> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1488 b40292e7 Jan Kiszka
<- { "return": {} }
1489 b40292e7 Jan Kiszka
1490 b40292e7 Jan Kiszka
EQMP
1491 f07918fd Mark McLoughlin
1492 d7f9b689 Luiz Capitulino
    {
1493 d7f9b689 Luiz Capitulino
        .name       = "closefd",
1494 d7f9b689 Luiz Capitulino
        .args_type  = "fdname:s",
1495 d7f9b689 Luiz Capitulino
        .params     = "closefd name",
1496 d7f9b689 Luiz Capitulino
        .help       = "close a file descriptor previously passed via SCM rights",
1497 18f3a515 Luiz Capitulino
        .user_print = monitor_user_noop,
1498 261394db Luiz Capitulino
        .mhandler.cmd_new = do_closefd,
1499 d7f9b689 Luiz Capitulino
    },
1500 d7f9b689 Luiz Capitulino
1501 f07918fd Mark McLoughlin
STEXI
1502 f07918fd Mark McLoughlin
@item closefd @var{fdname}
1503 70fcbbe7 Stefan Weil
@findex closefd
1504 f07918fd Mark McLoughlin
Close the file descriptor previously assigned to @var{fdname} using the
1505 f07918fd Mark McLoughlin
@code{getfd} command. This is only needed if the file descriptor was never
1506 f07918fd Mark McLoughlin
used by another monitor command.
1507 f07918fd Mark McLoughlin
ETEXI
1508 b40292e7 Jan Kiszka
SQMP
1509 b40292e7 Jan Kiszka
closefd
1510 b40292e7 Jan Kiszka
-------
1511 b40292e7 Jan Kiszka
1512 b40292e7 Jan Kiszka
Close a file descriptor previously passed via SCM rights.
1513 b40292e7 Jan Kiszka
1514 b40292e7 Jan Kiszka
Arguments:
1515 b40292e7 Jan Kiszka
1516 b40292e7 Jan Kiszka
- "fdname": file descriptor name (json-string)
1517 b40292e7 Jan Kiszka
1518 b40292e7 Jan Kiszka
Example:
1519 b40292e7 Jan Kiszka
1520 b40292e7 Jan Kiszka
-> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1521 b40292e7 Jan Kiszka
<- { "return": {} }
1522 b40292e7 Jan Kiszka
1523 b40292e7 Jan Kiszka
EQMP
1524 f07918fd Mark McLoughlin
1525 a3a55a2e Luiz Capitulino
    {
1526 a3a55a2e Luiz Capitulino
        .name       = "block_passwd",
1527 a3a55a2e Luiz Capitulino
        .args_type  = "device:B,password:s",
1528 a3a55a2e Luiz Capitulino
        .params     = "block_passwd device password",
1529 a3a55a2e Luiz Capitulino
        .help       = "set the password of encrypted block devices",
1530 a3a55a2e Luiz Capitulino
        .user_print = monitor_user_noop,
1531 261394db Luiz Capitulino
        .mhandler.cmd_new = do_block_set_passwd,
1532 a3a55a2e Luiz Capitulino
    },
1533 a3a55a2e Luiz Capitulino
1534 a3a55a2e Luiz Capitulino
STEXI
1535 a3a55a2e Luiz Capitulino
@item block_passwd @var{device} @var{password}
1536 70fcbbe7 Stefan Weil
@findex block_passwd
1537 a3a55a2e Luiz Capitulino
Set the encrypted device @var{device} password to @var{password}
1538 a3a55a2e Luiz Capitulino
ETEXI
1539 b40292e7 Jan Kiszka
SQMP
1540 b40292e7 Jan Kiszka
block_passwd
1541 b40292e7 Jan Kiszka
------------
1542 b40292e7 Jan Kiszka
1543 b40292e7 Jan Kiszka
Set the password of encrypted block devices.
1544 b40292e7 Jan Kiszka
1545 b40292e7 Jan Kiszka
Arguments:
1546 b40292e7 Jan Kiszka
1547 b40292e7 Jan Kiszka
- "device": device name (json-string)
1548 b40292e7 Jan Kiszka
- "password": password (json-string)
1549 b40292e7 Jan Kiszka
1550 b40292e7 Jan Kiszka
Example:
1551 b40292e7 Jan Kiszka
1552 b40292e7 Jan Kiszka
-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1553 b40292e7 Jan Kiszka
                                               "password": "12345" } }
1554 b40292e7 Jan Kiszka
<- { "return": {} }
1555 b40292e7 Jan Kiszka
1556 b40292e7 Jan Kiszka
EQMP
1557 a3a55a2e Luiz Capitulino
1558 4a7e1190 Luiz Capitulino
    {
1559 4a7e1190 Luiz Capitulino
        .name       = "qmp_capabilities",
1560 4a7e1190 Luiz Capitulino
        .args_type  = "",
1561 4a7e1190 Luiz Capitulino
        .params     = "",
1562 4a7e1190 Luiz Capitulino
        .help       = "enable QMP capabilities",
1563 4a7e1190 Luiz Capitulino
        .user_print = monitor_user_noop,
1564 261394db Luiz Capitulino
        .mhandler.cmd_new = do_qmp_capabilities,
1565 4a7e1190 Luiz Capitulino
    },
1566 4a7e1190 Luiz Capitulino
1567 4a7e1190 Luiz Capitulino
STEXI
1568 4a7e1190 Luiz Capitulino
@item qmp_capabilities
1569 54d7cf13 Markus Armbruster
@findex qmp_capabilities
1570 4a7e1190 Luiz Capitulino
Enable the specified QMP capabilities
1571 4a7e1190 Luiz Capitulino
ETEXI
1572 b40292e7 Jan Kiszka
SQMP
1573 b40292e7 Jan Kiszka
qmp_capabilities
1574 b40292e7 Jan Kiszka
----------------
1575 b40292e7 Jan Kiszka
1576 b40292e7 Jan Kiszka
Enable QMP capabilities.
1577 b40292e7 Jan Kiszka
1578 b40292e7 Jan Kiszka
Arguments: None.
1579 b40292e7 Jan Kiszka
1580 b40292e7 Jan Kiszka
Example:
1581 b40292e7 Jan Kiszka
1582 b40292e7 Jan Kiszka
-> { "execute": "qmp_capabilities" }
1583 b40292e7 Jan Kiszka
<- { "return": {} }
1584 b40292e7 Jan Kiszka
1585 b40292e7 Jan Kiszka
Note: This command must be issued before issuing any other command.
1586 b40292e7 Jan Kiszka
1587 b40292e7 Jan Kiszka
EQMP
1588 4a7e1190 Luiz Capitulino
1589 33572ece Jan Kiszka
1590 33572ece Jan Kiszka
HXCOMM Keep the 'info' command at the end!
1591 33572ece Jan Kiszka
HXCOMM This is required for the QMP documentation layout.
1592 33572ece Jan Kiszka
1593 b40292e7 Jan Kiszka
SQMP
1594 b40292e7 Jan Kiszka
1595 b40292e7 Jan Kiszka
2. Query Commands
1596 b40292e7 Jan Kiszka
=================
1597 b40292e7 Jan Kiszka
1598 b40292e7 Jan Kiszka
EQMP
1599 b40292e7 Jan Kiszka
1600 33572ece Jan Kiszka
    {
1601 33572ece Jan Kiszka
        .name       = "info",
1602 33572ece Jan Kiszka
        .args_type  = "item:s?",
1603 33572ece Jan Kiszka
        .params     = "[subcommand]",
1604 33572ece Jan Kiszka
        .help       = "show various information about the system state",
1605 33572ece Jan Kiszka
        .user_print = monitor_user_noop,
1606 33572ece Jan Kiszka
        .mhandler.cmd_new = do_info,
1607 33572ece Jan Kiszka
    },
1608 33572ece Jan Kiszka
1609 33572ece Jan Kiszka
STEXI
1610 33572ece Jan Kiszka
@item info @var{subcommand}
1611 33572ece Jan Kiszka
@findex info
1612 33572ece Jan Kiszka
Show various information about the system state.
1613 33572ece Jan Kiszka
1614 33572ece Jan Kiszka
@table @option
1615 33572ece Jan Kiszka
@item info version
1616 33572ece Jan Kiszka
show the version of QEMU
1617 b40292e7 Jan Kiszka
ETEXI
1618 b40292e7 Jan Kiszka
SQMP
1619 b40292e7 Jan Kiszka
query-version
1620 b40292e7 Jan Kiszka
-------------
1621 b40292e7 Jan Kiszka
1622 b40292e7 Jan Kiszka
Show QEMU version.
1623 b40292e7 Jan Kiszka
1624 b40292e7 Jan Kiszka
Return a json-object with the following information:
1625 b40292e7 Jan Kiszka
1626 b40292e7 Jan Kiszka
- "qemu": QEMU's version (json-string)
1627 b40292e7 Jan Kiszka
- "package": package's version (json-string)
1628 b40292e7 Jan Kiszka
1629 b40292e7 Jan Kiszka
Example:
1630 b40292e7 Jan Kiszka
1631 b40292e7 Jan Kiszka
-> { "execute": "query-version" }
1632 b40292e7 Jan Kiszka
<- { "return": { "qemu": "0.11.50", "package": "" } }
1633 b40292e7 Jan Kiszka
1634 b40292e7 Jan Kiszka
EQMP
1635 b40292e7 Jan Kiszka
1636 b40292e7 Jan Kiszka
STEXI
1637 33572ece Jan Kiszka
@item info commands
1638 33572ece Jan Kiszka
list QMP available commands
1639 b40292e7 Jan Kiszka
ETEXI
1640 b40292e7 Jan Kiszka
SQMP
1641 b40292e7 Jan Kiszka
query-commands
1642 b40292e7 Jan Kiszka
--------------
1643 b40292e7 Jan Kiszka
1644 b40292e7 Jan Kiszka
List QMP available commands.
1645 b40292e7 Jan Kiszka
1646 b40292e7 Jan Kiszka
Each command is represented by a json-object, the returned value is a json-array
1647 b40292e7 Jan Kiszka
of all commands.
1648 b40292e7 Jan Kiszka
1649 b40292e7 Jan Kiszka
Each json-object contain:
1650 b40292e7 Jan Kiszka
1651 b40292e7 Jan Kiszka
- "name": command's name (json-string)
1652 b40292e7 Jan Kiszka
1653 b40292e7 Jan Kiszka
Example:
1654 b40292e7 Jan Kiszka
1655 b40292e7 Jan Kiszka
-> { "execute": "query-commands" }
1656 b40292e7 Jan Kiszka
<- {
1657 b40292e7 Jan Kiszka
      "return":[
1658 b40292e7 Jan Kiszka
         {
1659 b40292e7 Jan Kiszka
            "name":"query-balloon"
1660 b40292e7 Jan Kiszka
         },
1661 b40292e7 Jan Kiszka
         {
1662 b40292e7 Jan Kiszka
            "name":"system_powerdown"
1663 b40292e7 Jan Kiszka
         }
1664 b40292e7 Jan Kiszka
      ]
1665 b40292e7 Jan Kiszka
   }
1666 b40292e7 Jan Kiszka
1667 b40292e7 Jan Kiszka
Note: This example has been shortened as the real response is too long.
1668 b40292e7 Jan Kiszka
1669 b40292e7 Jan Kiszka
EQMP
1670 b40292e7 Jan Kiszka
1671 b40292e7 Jan Kiszka
STEXI
1672 33572ece Jan Kiszka
@item info network
1673 33572ece Jan Kiszka
show the various VLANs and the associated devices
1674 b40292e7 Jan Kiszka
ETEXI
1675 b40292e7 Jan Kiszka
1676 b40292e7 Jan Kiszka
STEXI
1677 33572ece Jan Kiszka
@item info chardev
1678 33572ece Jan Kiszka
show the character devices
1679 b40292e7 Jan Kiszka
ETEXI
1680 b40292e7 Jan Kiszka
SQMP
1681 b40292e7 Jan Kiszka
query-chardev
1682 b40292e7 Jan Kiszka
-------------
1683 b40292e7 Jan Kiszka
1684 b40292e7 Jan Kiszka
Each device is represented by a json-object. The returned value is a json-array
1685 b40292e7 Jan Kiszka
of all devices.
1686 b40292e7 Jan Kiszka
1687 b40292e7 Jan Kiszka
Each json-object contain the following:
1688 b40292e7 Jan Kiszka
1689 b40292e7 Jan Kiszka
- "label": device's label (json-string)
1690 b40292e7 Jan Kiszka
- "filename": device's file (json-string)
1691 b40292e7 Jan Kiszka
1692 b40292e7 Jan Kiszka
Example:
1693 b40292e7 Jan Kiszka
1694 b40292e7 Jan Kiszka
-> { "execute": "query-chardev" }
1695 b40292e7 Jan Kiszka
<- {
1696 b40292e7 Jan Kiszka
      "return":[
1697 b40292e7 Jan Kiszka
         {
1698 b40292e7 Jan Kiszka
            "label":"monitor",
1699 b40292e7 Jan Kiszka
            "filename":"stdio"
1700 b40292e7 Jan Kiszka
         },
1701 b40292e7 Jan Kiszka
         {
1702 b40292e7 Jan Kiszka
            "label":"serial0",
1703 b40292e7 Jan Kiszka
            "filename":"vc"
1704 b40292e7 Jan Kiszka
         }
1705 b40292e7 Jan Kiszka
      ]
1706 b40292e7 Jan Kiszka
   }
1707 b40292e7 Jan Kiszka
1708 b40292e7 Jan Kiszka
EQMP
1709 b40292e7 Jan Kiszka
1710 b40292e7 Jan Kiszka
STEXI
1711 33572ece Jan Kiszka
@item info block
1712 33572ece Jan Kiszka
show the block devices
1713 b40292e7 Jan Kiszka
ETEXI
1714 b40292e7 Jan Kiszka
SQMP
1715 b40292e7 Jan Kiszka
query-block
1716 b40292e7 Jan Kiszka
-----------
1717 b40292e7 Jan Kiszka
1718 b40292e7 Jan Kiszka
Show the block devices.
1719 b40292e7 Jan Kiszka
1720 b40292e7 Jan Kiszka
Each block device information is stored in a json-object and the returned value
1721 b40292e7 Jan Kiszka
is a json-array of all devices.
1722 b40292e7 Jan Kiszka
1723 b40292e7 Jan Kiszka
Each json-object contain the following:
1724 b40292e7 Jan Kiszka
1725 b40292e7 Jan Kiszka
- "device": device name (json-string)
1726 b40292e7 Jan Kiszka
- "type": device type (json-string)
1727 b40292e7 Jan Kiszka
         - Possible values: "hd", "cdrom", "floppy", "unknown"
1728 b40292e7 Jan Kiszka
- "removable": true if the device is removable, false otherwise (json-bool)
1729 b40292e7 Jan Kiszka
- "locked": true if the device is locked, false otherwise (json-bool)
1730 b40292e7 Jan Kiszka
- "inserted": only present if the device is inserted, it is a json-object
1731 b40292e7 Jan Kiszka
   containing the following:
1732 b40292e7 Jan Kiszka
         - "file": device file name (json-string)
1733 b40292e7 Jan Kiszka
         - "ro": true if read-only, false otherwise (json-bool)
1734 b40292e7 Jan Kiszka
         - "drv": driver format name (json-string)
1735 b40292e7 Jan Kiszka
             - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1736 b40292e7 Jan Kiszka
                                "file", "file", "ftp", "ftps", "host_cdrom",
1737 b40292e7 Jan Kiszka
                                "host_device", "host_floppy", "http", "https",
1738 b40292e7 Jan Kiszka
                                "nbd", "parallels", "qcow", "qcow2", "raw",
1739 b40292e7 Jan Kiszka
                                "tftp", "vdi", "vmdk", "vpc", "vvfat"
1740 b40292e7 Jan Kiszka
         - "backing_file": backing file name (json-string, optional)
1741 b40292e7 Jan Kiszka
         - "encrypted": true if encrypted, false otherwise (json-bool)
1742 b40292e7 Jan Kiszka
1743 b40292e7 Jan Kiszka
Example:
1744 b40292e7 Jan Kiszka
1745 b40292e7 Jan Kiszka
-> { "execute": "query-block" }
1746 b40292e7 Jan Kiszka
<- {
1747 b40292e7 Jan Kiszka
      "return":[
1748 b40292e7 Jan Kiszka
         {
1749 b40292e7 Jan Kiszka
            "device":"ide0-hd0",
1750 b40292e7 Jan Kiszka
            "locked":false,
1751 b40292e7 Jan Kiszka
            "removable":false,
1752 b40292e7 Jan Kiszka
            "inserted":{
1753 b40292e7 Jan Kiszka
               "ro":false,
1754 b40292e7 Jan Kiszka
               "drv":"qcow2",
1755 b40292e7 Jan Kiszka
               "encrypted":false,
1756 b40292e7 Jan Kiszka
               "file":"disks/test.img"
1757 b40292e7 Jan Kiszka
            },
1758 b40292e7 Jan Kiszka
            "type":"hd"
1759 b40292e7 Jan Kiszka
         },
1760 b40292e7 Jan Kiszka
         {
1761 b40292e7 Jan Kiszka
            "device":"ide1-cd0",
1762 b40292e7 Jan Kiszka
            "locked":false,
1763 b40292e7 Jan Kiszka
            "removable":true,
1764 b40292e7 Jan Kiszka
            "type":"cdrom"
1765 b40292e7 Jan Kiszka
         },
1766 b40292e7 Jan Kiszka
         {
1767 b40292e7 Jan Kiszka
            "device":"floppy0",
1768 b40292e7 Jan Kiszka
            "locked":false,
1769 b40292e7 Jan Kiszka
            "removable":true,
1770 b40292e7 Jan Kiszka
            "type": "floppy"
1771 b40292e7 Jan Kiszka
         },
1772 b40292e7 Jan Kiszka
         {
1773 b40292e7 Jan Kiszka
            "device":"sd0",
1774 b40292e7 Jan Kiszka
            "locked":false,
1775 b40292e7 Jan Kiszka
            "removable":true,
1776 b40292e7 Jan Kiszka
            "type":"floppy"
1777 b40292e7 Jan Kiszka
         }
1778 b40292e7 Jan Kiszka
      ]
1779 b40292e7 Jan Kiszka
   }
1780 b40292e7 Jan Kiszka
1781 b40292e7 Jan Kiszka
EQMP
1782 b40292e7 Jan Kiszka
1783 b40292e7 Jan Kiszka
STEXI
1784 33572ece Jan Kiszka
@item info blockstats
1785 33572ece Jan Kiszka
show block device statistics
1786 b40292e7 Jan Kiszka
ETEXI
1787 b40292e7 Jan Kiszka
SQMP
1788 b40292e7 Jan Kiszka
query-blockstats
1789 b40292e7 Jan Kiszka
----------------
1790 b40292e7 Jan Kiszka
1791 b40292e7 Jan Kiszka
Show block device statistics.
1792 b40292e7 Jan Kiszka
1793 b40292e7 Jan Kiszka
Each device statistic information is stored in a json-object and the returned
1794 b40292e7 Jan Kiszka
value is a json-array of all devices.
1795 b40292e7 Jan Kiszka
1796 b40292e7 Jan Kiszka
Each json-object contain the following:
1797 b40292e7 Jan Kiszka
1798 b40292e7 Jan Kiszka
- "device": device name (json-string)
1799 b40292e7 Jan Kiszka
- "stats": A json-object with the statistics information, it contains:
1800 b40292e7 Jan Kiszka
    - "rd_bytes": bytes read (json-int)
1801 b40292e7 Jan Kiszka
    - "wr_bytes": bytes written (json-int)
1802 b40292e7 Jan Kiszka
    - "rd_operations": read operations (json-int)
1803 b40292e7 Jan Kiszka
    - "wr_operations": write operations (json-int)
1804 b40292e7 Jan Kiszka
    - "wr_highest_offset": Highest offset of a sector written since the
1805 b40292e7 Jan Kiszka
                           BlockDriverState has been opened (json-int)
1806 b40292e7 Jan Kiszka
- "parent": Contains recursively the statistics of the underlying
1807 b40292e7 Jan Kiszka
            protocol (e.g. the host file for a qcow2 image). If there is
1808 b40292e7 Jan Kiszka
            no underlying protocol, this field is omitted
1809 b40292e7 Jan Kiszka
            (json-object, optional)
1810 b40292e7 Jan Kiszka
1811 b40292e7 Jan Kiszka
Example:
1812 b40292e7 Jan Kiszka
1813 b40292e7 Jan Kiszka
-> { "execute": "query-blockstats" }
1814 b40292e7 Jan Kiszka
<- {
1815 b40292e7 Jan Kiszka
      "return":[
1816 b40292e7 Jan Kiszka
         {
1817 b40292e7 Jan Kiszka
            "device":"ide0-hd0",
1818 b40292e7 Jan Kiszka
            "parent":{
1819 b40292e7 Jan Kiszka
               "stats":{
1820 b40292e7 Jan Kiszka
                  "wr_highest_offset":3686448128,
1821 b40292e7 Jan Kiszka
                  "wr_bytes":9786368,
1822 b40292e7 Jan Kiszka
                  "wr_operations":751,
1823 b40292e7 Jan Kiszka
                  "rd_bytes":122567168,
1824 b40292e7 Jan Kiszka
                  "rd_operations":36772
1825 b40292e7 Jan Kiszka
               }
1826 b40292e7 Jan Kiszka
            },
1827 b40292e7 Jan Kiszka
            "stats":{
1828 b40292e7 Jan Kiszka
               "wr_highest_offset":2821110784,
1829 b40292e7 Jan Kiszka
               "wr_bytes":9786368,
1830 b40292e7 Jan Kiszka
               "wr_operations":692,
1831 b40292e7 Jan Kiszka
               "rd_bytes":122739200,
1832 b40292e7 Jan Kiszka
               "rd_operations":36604
1833 b40292e7 Jan Kiszka
            }
1834 b40292e7 Jan Kiszka
         },
1835 b40292e7 Jan Kiszka
         {
1836 b40292e7 Jan Kiszka
            "device":"ide1-cd0",
1837 b40292e7 Jan Kiszka
            "stats":{
1838 b40292e7 Jan Kiszka
               "wr_highest_offset":0,
1839 b40292e7 Jan Kiszka
               "wr_bytes":0,
1840 b40292e7 Jan Kiszka
               "wr_operations":0,
1841 b40292e7 Jan Kiszka
               "rd_bytes":0,
1842 b40292e7 Jan Kiszka
               "rd_operations":0
1843 b40292e7 Jan Kiszka
            }
1844 b40292e7 Jan Kiszka
         },
1845 b40292e7 Jan Kiszka
         {
1846 b40292e7 Jan Kiszka
            "device":"floppy0",
1847 b40292e7 Jan Kiszka
            "stats":{
1848 b40292e7 Jan Kiszka
               "wr_highest_offset":0,
1849 b40292e7 Jan Kiszka
               "wr_bytes":0,
1850 b40292e7 Jan Kiszka
               "wr_operations":0,
1851 b40292e7 Jan Kiszka
               "rd_bytes":0,
1852 b40292e7 Jan Kiszka
               "rd_operations":0
1853 b40292e7 Jan Kiszka
            }
1854 b40292e7 Jan Kiszka
         },
1855 b40292e7 Jan Kiszka
         {
1856 b40292e7 Jan Kiszka
            "device":"sd0",
1857 b40292e7 Jan Kiszka
            "stats":{
1858 b40292e7 Jan Kiszka
               "wr_highest_offset":0,
1859 b40292e7 Jan Kiszka
               "wr_bytes":0,
1860 b40292e7 Jan Kiszka
               "wr_operations":0,
1861 b40292e7 Jan Kiszka
               "rd_bytes":0,
1862 b40292e7 Jan Kiszka
               "rd_operations":0
1863 b40292e7 Jan Kiszka
            }
1864 b40292e7 Jan Kiszka
         }
1865 b40292e7 Jan Kiszka
      ]
1866 b40292e7 Jan Kiszka
   }
1867 b40292e7 Jan Kiszka
1868 b40292e7 Jan Kiszka
EQMP
1869 b40292e7 Jan Kiszka
1870 b40292e7 Jan Kiszka
STEXI
1871 33572ece Jan Kiszka
@item info registers
1872 33572ece Jan Kiszka
show the cpu registers
1873 33572ece Jan Kiszka
@item info cpus
1874 33572ece Jan Kiszka
show infos for each CPU
1875 b40292e7 Jan Kiszka
ETEXI
1876 b40292e7 Jan Kiszka
SQMP
1877 b40292e7 Jan Kiszka
query-cpus
1878 b40292e7 Jan Kiszka
----------
1879 b40292e7 Jan Kiszka
1880 b40292e7 Jan Kiszka
Show CPU information.
1881 b40292e7 Jan Kiszka
1882 b40292e7 Jan Kiszka
Return a json-array. Each CPU is represented by a json-object, which contains:
1883 b40292e7 Jan Kiszka
1884 b40292e7 Jan Kiszka
- "CPU": CPU index (json-int)
1885 b40292e7 Jan Kiszka
- "current": true if this is the current CPU, false otherwise (json-bool)
1886 b40292e7 Jan Kiszka
- "halted": true if the cpu is halted, false otherwise (json-bool)
1887 b40292e7 Jan Kiszka
- Current program counter. The key's name depends on the architecture:
1888 b40292e7 Jan Kiszka
     "pc": i386/x86_64 (json-int)
1889 b40292e7 Jan Kiszka
     "nip": PPC (json-int)
1890 b40292e7 Jan Kiszka
     "pc" and "npc": sparc (json-int)
1891 b40292e7 Jan Kiszka
     "PC": mips (json-int)
1892 b40292e7 Jan Kiszka
1893 b40292e7 Jan Kiszka
Example:
1894 b40292e7 Jan Kiszka
1895 b40292e7 Jan Kiszka
-> { "execute": "query-cpus" }
1896 b40292e7 Jan Kiszka
<- {
1897 b40292e7 Jan Kiszka
      "return":[
1898 b40292e7 Jan Kiszka
         {
1899 b40292e7 Jan Kiszka
            "CPU":0,
1900 b40292e7 Jan Kiszka
            "current":true,
1901 b40292e7 Jan Kiszka
            "halted":false,
1902 b40292e7 Jan Kiszka
            "pc":3227107138
1903 b40292e7 Jan Kiszka
         },
1904 b40292e7 Jan Kiszka
         {
1905 b40292e7 Jan Kiszka
            "CPU":1,
1906 b40292e7 Jan Kiszka
            "current":false,
1907 b40292e7 Jan Kiszka
            "halted":true,
1908 b40292e7 Jan Kiszka
            "pc":7108165
1909 b40292e7 Jan Kiszka
         }
1910 b40292e7 Jan Kiszka
      ]
1911 b40292e7 Jan Kiszka
   }
1912 b40292e7 Jan Kiszka
1913 b40292e7 Jan Kiszka
EQMP
1914 b40292e7 Jan Kiszka
1915 b40292e7 Jan Kiszka
STEXI
1916 33572ece Jan Kiszka
@item info history
1917 33572ece Jan Kiszka
show the command line history
1918 33572ece Jan Kiszka
@item info irq
1919 33572ece Jan Kiszka
show the interrupts statistics (if available)
1920 33572ece Jan Kiszka
@item info pic
1921 33572ece Jan Kiszka
show i8259 (PIC) state
1922 b40292e7 Jan Kiszka
ETEXI
1923 b40292e7 Jan Kiszka
1924 b40292e7 Jan Kiszka
STEXI
1925 33572ece Jan Kiszka
@item info pci
1926 33572ece Jan Kiszka
show emulated PCI device info
1927 b40292e7 Jan Kiszka
ETEXI
1928 b40292e7 Jan Kiszka
SQMP
1929 b40292e7 Jan Kiszka
query-pci
1930 b40292e7 Jan Kiszka
---------
1931 b40292e7 Jan Kiszka
1932 b40292e7 Jan Kiszka
PCI buses and devices information.
1933 b40292e7 Jan Kiszka
1934 b40292e7 Jan Kiszka
The returned value is a json-array of all buses. Each bus is represented by
1935 b40292e7 Jan Kiszka
a json-object, which has a key with a json-array of all PCI devices attached
1936 b40292e7 Jan Kiszka
to it. Each device is represented by a json-object.
1937 b40292e7 Jan Kiszka
1938 b40292e7 Jan Kiszka
The bus json-object contains the following:
1939 b40292e7 Jan Kiszka
1940 b40292e7 Jan Kiszka
- "bus": bus number (json-int)
1941 b40292e7 Jan Kiszka
- "devices": a json-array of json-objects, each json-object represents a
1942 b40292e7 Jan Kiszka
             PCI device
1943 b40292e7 Jan Kiszka
1944 b40292e7 Jan Kiszka
The PCI device json-object contains the following:
1945 b40292e7 Jan Kiszka
1946 b40292e7 Jan Kiszka
- "bus": identical to the parent's bus number (json-int)
1947 b40292e7 Jan Kiszka
- "slot": slot number (json-int)
1948 b40292e7 Jan Kiszka
- "function": function number (json-int)
1949 b40292e7 Jan Kiszka
- "class_info": a json-object containing:
1950 b40292e7 Jan Kiszka
     - "desc": device class description (json-string, optional)
1951 b40292e7 Jan Kiszka
     - "class": device class number (json-int)
1952 b40292e7 Jan Kiszka
- "id": a json-object containing:
1953 b40292e7 Jan Kiszka
     - "device": device ID (json-int)
1954 b40292e7 Jan Kiszka
     - "vendor": vendor ID (json-int)
1955 b40292e7 Jan Kiszka
- "irq": device's IRQ if assigned (json-int, optional)
1956 b40292e7 Jan Kiszka
- "qdev_id": qdev id string (json-string)
1957 b40292e7 Jan Kiszka
- "pci_bridge": It's a json-object, only present if this device is a
1958 b40292e7 Jan Kiszka
                PCI bridge, contains:
1959 b40292e7 Jan Kiszka
     - "bus": bus number (json-int)
1960 b40292e7 Jan Kiszka
     - "secondary": secondary bus number (json-int)
1961 b40292e7 Jan Kiszka
     - "subordinate": subordinate bus number (json-int)
1962 b40292e7 Jan Kiszka
     - "io_range": I/O memory range information, a json-object with the
1963 b40292e7 Jan Kiszka
                   following members:
1964 b40292e7 Jan Kiszka
                 - "base": base address, in bytes (json-int)
1965 b40292e7 Jan Kiszka
                 - "limit": limit address, in bytes (json-int)
1966 b40292e7 Jan Kiszka
     - "memory_range": memory range information, a json-object with the
1967 b40292e7 Jan Kiszka
                       following members:
1968 b40292e7 Jan Kiszka
                 - "base": base address, in bytes (json-int)
1969 b40292e7 Jan Kiszka
                 - "limit": limit address, in bytes (json-int)
1970 b40292e7 Jan Kiszka
     - "prefetchable_range": Prefetchable memory range information, a
1971 b40292e7 Jan Kiszka
                             json-object with the following members:
1972 b40292e7 Jan Kiszka
                 - "base": base address, in bytes (json-int)
1973 b40292e7 Jan Kiszka
                 - "limit": limit address, in bytes (json-int)
1974 b40292e7 Jan Kiszka
     - "devices": a json-array of PCI devices if there's any attached, each
1975 b40292e7 Jan Kiszka
                  each element is represented by a json-object, which contains
1976 b40292e7 Jan Kiszka
                  the same members of the 'PCI device json-object' described
1977 b40292e7 Jan Kiszka
                  above (optional)
1978 b40292e7 Jan Kiszka
- "regions": a json-array of json-objects, each json-object represents a
1979 b40292e7 Jan Kiszka
             memory region of this device
1980 b40292e7 Jan Kiszka
1981 b40292e7 Jan Kiszka
The memory range json-object contains the following:
1982 b40292e7 Jan Kiszka
1983 b40292e7 Jan Kiszka
- "base": base memory address (json-int)
1984 b40292e7 Jan Kiszka
- "limit": limit value (json-int)
1985 b40292e7 Jan Kiszka
1986 b40292e7 Jan Kiszka
The region json-object can be an I/O region or a memory region, an I/O region
1987 b40292e7 Jan Kiszka
json-object contains the following:
1988 b40292e7 Jan Kiszka
1989 b40292e7 Jan Kiszka
- "type": "io" (json-string, fixed)
1990 b40292e7 Jan Kiszka
- "bar": BAR number (json-int)
1991 b40292e7 Jan Kiszka
- "address": memory address (json-int)
1992 b40292e7 Jan Kiszka
- "size": memory size (json-int)
1993 b40292e7 Jan Kiszka
1994 b40292e7 Jan Kiszka
A memory region json-object contains the following:
1995 b40292e7 Jan Kiszka
1996 b40292e7 Jan Kiszka
- "type": "memory" (json-string, fixed)
1997 b40292e7 Jan Kiszka
- "bar": BAR number (json-int)
1998 b40292e7 Jan Kiszka
- "address": memory address (json-int)
1999 b40292e7 Jan Kiszka
- "size": memory size (json-int)
2000 b40292e7 Jan Kiszka
- "mem_type_64": true or false (json-bool)
2001 b40292e7 Jan Kiszka
- "prefetch": true or false (json-bool)
2002 b40292e7 Jan Kiszka
2003 b40292e7 Jan Kiszka
Example:
2004 b40292e7 Jan Kiszka
2005 b40292e7 Jan Kiszka
-> { "execute": "query-pci" }
2006 b40292e7 Jan Kiszka
<- {
2007 b40292e7 Jan Kiszka
      "return":[
2008 b40292e7 Jan Kiszka
         {
2009 b40292e7 Jan Kiszka
            "bus":0,
2010 b40292e7 Jan Kiszka
            "devices":[
2011 b40292e7 Jan Kiszka
               {
2012 b40292e7 Jan Kiszka
                  "bus":0,
2013 b40292e7 Jan Kiszka
                  "qdev_id":"",
2014 b40292e7 Jan Kiszka
                  "slot":0,
2015 b40292e7 Jan Kiszka
                  "class_info":{
2016 b40292e7 Jan Kiszka
                     "class":1536,
2017 b40292e7 Jan Kiszka
                     "desc":"Host bridge"
2018 b40292e7 Jan Kiszka
                  },
2019 b40292e7 Jan Kiszka
                  "id":{
2020 b40292e7 Jan Kiszka
                     "device":32902,
2021 b40292e7 Jan Kiszka
                     "vendor":4663
2022 b40292e7 Jan Kiszka
                  },
2023 b40292e7 Jan Kiszka
                  "function":0,
2024 b40292e7 Jan Kiszka
                  "regions":[
2025 b40292e7 Jan Kiszka
   
2026 b40292e7 Jan Kiszka
                  ]
2027 b40292e7 Jan Kiszka
               },
2028 b40292e7 Jan Kiszka
               {
2029 b40292e7 Jan Kiszka
                  "bus":0,
2030 b40292e7 Jan Kiszka
                  "qdev_id":"",
2031 b40292e7 Jan Kiszka
                  "slot":1,
2032 b40292e7 Jan Kiszka
                  "class_info":{
2033 b40292e7 Jan Kiszka
                     "class":1537,
2034 b40292e7 Jan Kiszka
                     "desc":"ISA bridge"
2035 b40292e7 Jan Kiszka
                  },
2036 b40292e7 Jan Kiszka
                  "id":{
2037 b40292e7 Jan Kiszka
                     "device":32902,
2038 b40292e7 Jan Kiszka
                     "vendor":28672
2039 b40292e7 Jan Kiszka
                  },
2040 b40292e7 Jan Kiszka
                  "function":0,
2041 b40292e7 Jan Kiszka
                  "regions":[
2042 b40292e7 Jan Kiszka
   
2043 b40292e7 Jan Kiszka
                  ]
2044 b40292e7 Jan Kiszka
               },
2045 b40292e7 Jan Kiszka
               {
2046 b40292e7 Jan Kiszka
                  "bus":0,
2047 b40292e7 Jan Kiszka
                  "qdev_id":"",
2048 b40292e7 Jan Kiszka
                  "slot":1,
2049 b40292e7 Jan Kiszka
                  "class_info":{
2050 b40292e7 Jan Kiszka
                     "class":257,
2051 b40292e7 Jan Kiszka
                     "desc":"IDE controller"
2052 b40292e7 Jan Kiszka
                  },
2053 b40292e7 Jan Kiszka
                  "id":{
2054 b40292e7 Jan Kiszka
                     "device":32902,
2055 b40292e7 Jan Kiszka
                     "vendor":28688
2056 b40292e7 Jan Kiszka
                  },
2057 b40292e7 Jan Kiszka
                  "function":1,
2058 b40292e7 Jan Kiszka
                  "regions":[
2059 b40292e7 Jan Kiszka
                     {
2060 b40292e7 Jan Kiszka
                        "bar":4,
2061 b40292e7 Jan Kiszka
                        "size":16,
2062 b40292e7 Jan Kiszka
                        "address":49152,
2063 b40292e7 Jan Kiszka
                        "type":"io"
2064 b40292e7 Jan Kiszka
                     }
2065 b40292e7 Jan Kiszka
                  ]
2066 b40292e7 Jan Kiszka
               },
2067 b40292e7 Jan Kiszka
               {
2068 b40292e7 Jan Kiszka
                  "bus":0,
2069 b40292e7 Jan Kiszka
                  "qdev_id":"",
2070 b40292e7 Jan Kiszka
                  "slot":2,
2071 b40292e7 Jan Kiszka
                  "class_info":{
2072 b40292e7 Jan Kiszka
                     "class":768,
2073 b40292e7 Jan Kiszka
                     "desc":"VGA controller"
2074 b40292e7 Jan Kiszka
                  },
2075 b40292e7 Jan Kiszka
                  "id":{
2076 b40292e7 Jan Kiszka
                     "device":4115,
2077 b40292e7 Jan Kiszka
                     "vendor":184
2078 b40292e7 Jan Kiszka
                  },
2079 b40292e7 Jan Kiszka
                  "function":0,
2080 b40292e7 Jan Kiszka
                  "regions":[
2081 b40292e7 Jan Kiszka
                     {
2082 b40292e7 Jan Kiszka
                        "prefetch":true,
2083 b40292e7 Jan Kiszka
                        "mem_type_64":false,
2084 b40292e7 Jan Kiszka
                        "bar":0,
2085 b40292e7 Jan Kiszka
                        "size":33554432,
2086 b40292e7 Jan Kiszka
                        "address":4026531840,
2087 b40292e7 Jan Kiszka
                        "type":"memory"
2088 b40292e7 Jan Kiszka
                     },
2089 b40292e7 Jan Kiszka
                     {
2090 b40292e7 Jan Kiszka
                        "prefetch":false,
2091 b40292e7 Jan Kiszka
                        "mem_type_64":false,
2092 b40292e7 Jan Kiszka
                        "bar":1,
2093 b40292e7 Jan Kiszka
                        "size":4096,
2094 b40292e7 Jan Kiszka
                        "address":4060086272,
2095 b40292e7 Jan Kiszka
                        "type":"memory"
2096 b40292e7 Jan Kiszka
                     },
2097 b40292e7 Jan Kiszka
                     {
2098 b40292e7 Jan Kiszka
                        "prefetch":false,
2099 b40292e7 Jan Kiszka
                        "mem_type_64":false,
2100 b40292e7 Jan Kiszka
                        "bar":6,
2101 b40292e7 Jan Kiszka
                        "size":65536,
2102 b40292e7 Jan Kiszka
                        "address":-1,
2103 b40292e7 Jan Kiszka
                        "type":"memory"
2104 b40292e7 Jan Kiszka
                     }
2105 b40292e7 Jan Kiszka
                  ]
2106 b40292e7 Jan Kiszka
               },
2107 b40292e7 Jan Kiszka
               {
2108 b40292e7 Jan Kiszka
                  "bus":0,
2109 b40292e7 Jan Kiszka
                  "qdev_id":"",
2110 b40292e7 Jan Kiszka
                  "irq":11,
2111 b40292e7 Jan Kiszka
                  "slot":4,
2112 b40292e7 Jan Kiszka
                  "class_info":{
2113 b40292e7 Jan Kiszka
                     "class":1280,
2114 b40292e7 Jan Kiszka
                     "desc":"RAM controller"
2115 b40292e7 Jan Kiszka
                  },
2116 b40292e7 Jan Kiszka
                  "id":{
2117 b40292e7 Jan Kiszka
                     "device":6900,
2118 b40292e7 Jan Kiszka
                     "vendor":4098
2119 b40292e7 Jan Kiszka
                  },
2120 b40292e7 Jan Kiszka
                  "function":0,
2121 b40292e7 Jan Kiszka
                  "regions":[
2122 b40292e7 Jan Kiszka
                     {
2123 b40292e7 Jan Kiszka
                        "bar":0,
2124 b40292e7 Jan Kiszka
                        "size":32,
2125 b40292e7 Jan Kiszka
                        "address":49280,
2126 b40292e7 Jan Kiszka
                        "type":"io"
2127 b40292e7 Jan Kiszka
                     }
2128 b40292e7 Jan Kiszka
                  ]
2129 b40292e7 Jan Kiszka
               }
2130 b40292e7 Jan Kiszka
            ]
2131 b40292e7 Jan Kiszka
         }
2132 b40292e7 Jan Kiszka
      ]
2133 b40292e7 Jan Kiszka
   }
2134 b40292e7 Jan Kiszka
2135 b40292e7 Jan Kiszka
Note: This example has been shortened as the real response is too long.
2136 b40292e7 Jan Kiszka
2137 b40292e7 Jan Kiszka
EQMP
2138 b40292e7 Jan Kiszka
2139 b40292e7 Jan Kiszka
STEXI
2140 33572ece Jan Kiszka
@item info tlb
2141 33572ece Jan Kiszka
show virtual to physical memory mappings (i386 only)
2142 33572ece Jan Kiszka
@item info mem
2143 33572ece Jan Kiszka
show the active virtual memory mappings (i386 only)
2144 b40292e7 Jan Kiszka
ETEXI
2145 b40292e7 Jan Kiszka
2146 b40292e7 Jan Kiszka
STEXI
2147 33572ece Jan Kiszka
@item info jit
2148 33572ece Jan Kiszka
show dynamic compiler info
2149 33572ece Jan Kiszka
@item info kvm
2150 33572ece Jan Kiszka
show KVM information
2151 33572ece Jan Kiszka
@item info numa
2152 33572ece Jan Kiszka
show NUMA information
2153 b40292e7 Jan Kiszka
ETEXI
2154 b40292e7 Jan Kiszka
2155 b40292e7 Jan Kiszka
STEXI
2156 b40292e7 Jan Kiszka
@item info kvm
2157 b40292e7 Jan Kiszka
show KVM information
2158 b40292e7 Jan Kiszka
ETEXI
2159 b40292e7 Jan Kiszka
SQMP
2160 b40292e7 Jan Kiszka
query-kvm
2161 b40292e7 Jan Kiszka
---------
2162 b40292e7 Jan Kiszka
2163 b40292e7 Jan Kiszka
Show KVM information.
2164 b40292e7 Jan Kiszka
2165 b40292e7 Jan Kiszka
Return a json-object with the following information:
2166 b40292e7 Jan Kiszka
2167 b40292e7 Jan Kiszka
- "enabled": true if KVM support is enabled, false otherwise (json-bool)
2168 b40292e7 Jan Kiszka
- "present": true if QEMU has KVM support, false otherwise (json-bool)
2169 b40292e7 Jan Kiszka
2170 b40292e7 Jan Kiszka
Example:
2171 b40292e7 Jan Kiszka
2172 b40292e7 Jan Kiszka
-> { "execute": "query-kvm" }
2173 b40292e7 Jan Kiszka
<- { "return": { "enabled": true, "present": true } }
2174 b40292e7 Jan Kiszka
2175 b40292e7 Jan Kiszka
EQMP
2176 b40292e7 Jan Kiszka
2177 b40292e7 Jan Kiszka
STEXI
2178 33572ece Jan Kiszka
@item info usb
2179 33572ece Jan Kiszka
show USB devices plugged on the virtual USB hub
2180 33572ece Jan Kiszka
@item info usbhost
2181 33572ece Jan Kiszka
show all USB host devices
2182 33572ece Jan Kiszka
@item info profile
2183 33572ece Jan Kiszka
show profiling information
2184 33572ece Jan Kiszka
@item info capture
2185 33572ece Jan Kiszka
show information about active capturing
2186 33572ece Jan Kiszka
@item info snapshots
2187 33572ece Jan Kiszka
show list of VM snapshots
2188 b40292e7 Jan Kiszka
ETEXI
2189 b40292e7 Jan Kiszka
2190 b40292e7 Jan Kiszka
STEXI
2191 33572ece Jan Kiszka
@item info status
2192 33572ece Jan Kiszka
show the current VM status (running|paused)
2193 b40292e7 Jan Kiszka
ETEXI
2194 b40292e7 Jan Kiszka
SQMP
2195 b40292e7 Jan Kiszka
query-status
2196 b40292e7 Jan Kiszka
------------
2197 b40292e7 Jan Kiszka
2198 b40292e7 Jan Kiszka
Return a json-object with the following information:
2199 b40292e7 Jan Kiszka
2200 b40292e7 Jan Kiszka
- "running": true if the VM is running, or false if it is paused (json-bool)
2201 b40292e7 Jan Kiszka
- "singlestep": true if the VM is in single step mode,
2202 b40292e7 Jan Kiszka
                false otherwise (json-bool)
2203 b40292e7 Jan Kiszka
2204 b40292e7 Jan Kiszka
Example:
2205 b40292e7 Jan Kiszka
2206 b40292e7 Jan Kiszka
-> { "execute": "query-status" }
2207 b40292e7 Jan Kiszka
<- { "return": { "running": true, "singlestep": false } }
2208 b40292e7 Jan Kiszka
2209 b40292e7 Jan Kiszka
EQMP
2210 b40292e7 Jan Kiszka
2211 b40292e7 Jan Kiszka
STEXI
2212 33572ece Jan Kiszka
@item info pcmcia
2213 33572ece Jan Kiszka
show guest PCMCIA status
2214 b40292e7 Jan Kiszka
ETEXI
2215 b40292e7 Jan Kiszka
2216 b40292e7 Jan Kiszka
STEXI
2217 33572ece Jan Kiszka
@item info mice
2218 33572ece Jan Kiszka
show which guest mouse is receiving events
2219 b40292e7 Jan Kiszka
ETEXI
2220 b40292e7 Jan Kiszka
SQMP
2221 b40292e7 Jan Kiszka
query-mice
2222 b40292e7 Jan Kiszka
----------
2223 b40292e7 Jan Kiszka
2224 b40292e7 Jan Kiszka
Show VM mice information.
2225 b40292e7 Jan Kiszka
2226 b40292e7 Jan Kiszka
Each mouse is represented by a json-object, the returned value is a json-array
2227 b40292e7 Jan Kiszka
of all mice.
2228 b40292e7 Jan Kiszka
2229 b40292e7 Jan Kiszka
The mouse json-object contains the following:
2230 b40292e7 Jan Kiszka
2231 b40292e7 Jan Kiszka
- "name": mouse's name (json-string)
2232 b40292e7 Jan Kiszka
- "index": mouse's index (json-int)
2233 b40292e7 Jan Kiszka
- "current": true if this mouse is receiving events, false otherwise (json-bool)
2234 b40292e7 Jan Kiszka
- "absolute": true if the mouse generates absolute input events (json-bool)
2235 b40292e7 Jan Kiszka
2236 b40292e7 Jan Kiszka
Example:
2237 b40292e7 Jan Kiszka
2238 b40292e7 Jan Kiszka
-> { "execute": "query-mice" }
2239 b40292e7 Jan Kiszka
<- {
2240 b40292e7 Jan Kiszka
      "return":[
2241 b40292e7 Jan Kiszka
         {
2242 b40292e7 Jan Kiszka
            "name":"QEMU Microsoft Mouse",
2243 b40292e7 Jan Kiszka
            "index":0,
2244 b40292e7 Jan Kiszka
            "current":false,
2245 b40292e7 Jan Kiszka
            "absolute":false
2246 b40292e7 Jan Kiszka
         },
2247 b40292e7 Jan Kiszka
         {
2248 b40292e7 Jan Kiszka
            "name":"QEMU PS/2 Mouse",
2249 b40292e7 Jan Kiszka
            "index":1,
2250 b40292e7 Jan Kiszka
            "current":true,
2251 b40292e7 Jan Kiszka
            "absolute":true
2252 b40292e7 Jan Kiszka
         }
2253 b40292e7 Jan Kiszka
      ]
2254 b40292e7 Jan Kiszka
   }
2255 b40292e7 Jan Kiszka
2256 b40292e7 Jan Kiszka
EQMP
2257 b40292e7 Jan Kiszka
2258 b40292e7 Jan Kiszka
STEXI
2259 33572ece Jan Kiszka
@item info vnc
2260 33572ece Jan Kiszka
show the vnc server status
2261 b40292e7 Jan Kiszka
ETEXI
2262 b40292e7 Jan Kiszka
SQMP
2263 b40292e7 Jan Kiszka
query-vnc
2264 b40292e7 Jan Kiszka
---------
2265 b40292e7 Jan Kiszka
2266 b40292e7 Jan Kiszka
Show VNC server information.
2267 b40292e7 Jan Kiszka
2268 b40292e7 Jan Kiszka
Return a json-object with server information. Connected clients are returned
2269 b40292e7 Jan Kiszka
as a json-array of json-objects.
2270 b40292e7 Jan Kiszka
2271 b40292e7 Jan Kiszka
The main json-object contains the following:
2272 b40292e7 Jan Kiszka
2273 b40292e7 Jan Kiszka
- "enabled": true or false (json-bool)
2274 b40292e7 Jan Kiszka
- "host": server's IP address (json-string)
2275 b40292e7 Jan Kiszka
- "family": address family (json-string)
2276 b40292e7 Jan Kiszka
         - Possible values: "ipv4", "ipv6", "unix", "unknown"
2277 b40292e7 Jan Kiszka
- "service": server's port number (json-string)
2278 b40292e7 Jan Kiszka
- "auth": authentication method (json-string)
2279 b40292e7 Jan Kiszka
         - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2280 b40292e7 Jan Kiszka
                            "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2281 b40292e7 Jan Kiszka
                            "vencrypt+plain", "vencrypt+tls+none",
2282 b40292e7 Jan Kiszka
                            "vencrypt+tls+plain", "vencrypt+tls+sasl",
2283 b40292e7 Jan Kiszka
                            "vencrypt+tls+vnc", "vencrypt+x509+none",
2284 b40292e7 Jan Kiszka
                            "vencrypt+x509+plain", "vencrypt+x509+sasl",
2285 b40292e7 Jan Kiszka
                            "vencrypt+x509+vnc", "vnc"
2286 b40292e7 Jan Kiszka
- "clients": a json-array of all connected clients
2287 b40292e7 Jan Kiszka
2288 b40292e7 Jan Kiszka
Clients are described by a json-object, each one contain the following:
2289 b40292e7 Jan Kiszka
2290 b40292e7 Jan Kiszka
- "host": client's IP address (json-string)
2291 b40292e7 Jan Kiszka
- "family": address family (json-string)
2292 b40292e7 Jan Kiszka
         - Possible values: "ipv4", "ipv6", "unix", "unknown"
2293 b40292e7 Jan Kiszka
- "service": client's port number (json-string)
2294 b40292e7 Jan Kiszka
- "x509_dname": TLS dname (json-string, optional)
2295 b40292e7 Jan Kiszka
- "sasl_username": SASL username (json-string, optional)
2296 b40292e7 Jan Kiszka
2297 b40292e7 Jan Kiszka
Example:
2298 b40292e7 Jan Kiszka
2299 b40292e7 Jan Kiszka
-> { "execute": "query-vnc" }
2300 b40292e7 Jan Kiszka
<- {
2301 b40292e7 Jan Kiszka
      "return":{
2302 b40292e7 Jan Kiszka
         "enabled":true,
2303 b40292e7 Jan Kiszka
         "host":"0.0.0.0",
2304 b40292e7 Jan Kiszka
         "service":"50402",
2305 b40292e7 Jan Kiszka
         "auth":"vnc",
2306 b40292e7 Jan Kiszka
         "family":"ipv4",
2307 b40292e7 Jan Kiszka
         "clients":[
2308 b40292e7 Jan Kiszka
            {
2309 b40292e7 Jan Kiszka
               "host":"127.0.0.1",
2310 b40292e7 Jan Kiszka
               "service":"50401",
2311 b40292e7 Jan Kiszka
               "family":"ipv4"
2312 b40292e7 Jan Kiszka
            }
2313 b40292e7 Jan Kiszka
         ]
2314 b40292e7 Jan Kiszka
      }
2315 b40292e7 Jan Kiszka
   }
2316 b40292e7 Jan Kiszka
2317 b40292e7 Jan Kiszka
EQMP
2318 b40292e7 Jan Kiszka
2319 b40292e7 Jan Kiszka
STEXI
2320 33572ece Jan Kiszka
@item info name
2321 33572ece Jan Kiszka
show the current VM name
2322 b40292e7 Jan Kiszka
ETEXI
2323 b40292e7 Jan Kiszka
SQMP
2324 b40292e7 Jan Kiszka
query-name
2325 b40292e7 Jan Kiszka
----------
2326 b40292e7 Jan Kiszka
2327 b40292e7 Jan Kiszka
Show VM name.
2328 b40292e7 Jan Kiszka
2329 b40292e7 Jan Kiszka
Return a json-object with the following information:
2330 b40292e7 Jan Kiszka
2331 b40292e7 Jan Kiszka
- "name": VM's name (json-string, optional)
2332 b40292e7 Jan Kiszka
2333 b40292e7 Jan Kiszka
Example:
2334 b40292e7 Jan Kiszka
2335 b40292e7 Jan Kiszka
-> { "execute": "query-name" }
2336 b40292e7 Jan Kiszka
<- { "return": { "name": "qemu-name" } }
2337 b40292e7 Jan Kiszka
2338 b40292e7 Jan Kiszka
EQMP
2339 b40292e7 Jan Kiszka
2340 b40292e7 Jan Kiszka
STEXI
2341 33572ece Jan Kiszka
@item info uuid
2342 33572ece Jan Kiszka
show the current VM UUID
2343 b40292e7 Jan Kiszka
ETEXI
2344 b40292e7 Jan Kiszka
SQMP
2345 b40292e7 Jan Kiszka
query-uuid
2346 b40292e7 Jan Kiszka
----------
2347 b40292e7 Jan Kiszka
2348 b40292e7 Jan Kiszka
Show VM UUID.
2349 b40292e7 Jan Kiszka
2350 b40292e7 Jan Kiszka
Return a json-object with the following information:
2351 b40292e7 Jan Kiszka
2352 b40292e7 Jan Kiszka
- "UUID": Universally Unique Identifier (json-string)
2353 b40292e7 Jan Kiszka
2354 b40292e7 Jan Kiszka
Example:
2355 b40292e7 Jan Kiszka
2356 b40292e7 Jan Kiszka
-> { "execute": "query-uuid" }
2357 b40292e7 Jan Kiszka
<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2358 b40292e7 Jan Kiszka
2359 b40292e7 Jan Kiszka
EQMP
2360 b40292e7 Jan Kiszka
2361 b40292e7 Jan Kiszka
STEXI
2362 33572ece Jan Kiszka
@item info cpustats
2363 33572ece Jan Kiszka
show CPU statistics
2364 33572ece Jan Kiszka
@item info usernet
2365 33572ece Jan Kiszka
show user network stack connection states
2366 b40292e7 Jan Kiszka
ETEXI
2367 b40292e7 Jan Kiszka
2368 b40292e7 Jan Kiszka
STEXI
2369 33572ece Jan Kiszka
@item info migrate
2370 33572ece Jan Kiszka
show migration status
2371 b40292e7 Jan Kiszka
ETEXI
2372 b40292e7 Jan Kiszka
SQMP
2373 b40292e7 Jan Kiszka
query-migrate
2374 b40292e7 Jan Kiszka
-------------
2375 b40292e7 Jan Kiszka
2376 b40292e7 Jan Kiszka
Migration status.
2377 b40292e7 Jan Kiszka
2378 b40292e7 Jan Kiszka
Return a json-object. If migration is active there will be another json-object
2379 b40292e7 Jan Kiszka
with RAM migration status and if block migration is active another one with
2380 b40292e7 Jan Kiszka
block migration status.
2381 b40292e7 Jan Kiszka
2382 b40292e7 Jan Kiszka
The main json-object contains the following:
2383 b40292e7 Jan Kiszka
2384 b40292e7 Jan Kiszka
- "status": migration status (json-string)
2385 b40292e7 Jan Kiszka
     - Possible values: "active", "completed", "failed", "cancelled"
2386 b40292e7 Jan Kiszka
- "ram": only present if "status" is "active", it is a json-object with the
2387 b40292e7 Jan Kiszka
  following RAM information (in bytes):
2388 b40292e7 Jan Kiszka
         - "transferred": amount transferred (json-int)
2389 b40292e7 Jan Kiszka
         - "remaining": amount remaining (json-int)
2390 b40292e7 Jan Kiszka
         - "total": total (json-int)
2391 b40292e7 Jan Kiszka
- "disk": only present if "status" is "active" and it is a block migration,
2392 b40292e7 Jan Kiszka
  it is a json-object with the following disk information (in bytes):
2393 b40292e7 Jan Kiszka
         - "transferred": amount transferred (json-int)
2394 b40292e7 Jan Kiszka
         - "remaining": amount remaining (json-int)
2395 b40292e7 Jan Kiszka
         - "total": total (json-int)
2396 b40292e7 Jan Kiszka
2397 b40292e7 Jan Kiszka
Examples:
2398 b40292e7 Jan Kiszka
2399 b40292e7 Jan Kiszka
1. Before the first migration
2400 b40292e7 Jan Kiszka
2401 b40292e7 Jan Kiszka
-> { "execute": "query-migrate" }
2402 b40292e7 Jan Kiszka
<- { "return": {} }
2403 b40292e7 Jan Kiszka
2404 b40292e7 Jan Kiszka
2. Migration is done and has succeeded
2405 b40292e7 Jan Kiszka
2406 b40292e7 Jan Kiszka
-> { "execute": "query-migrate" }
2407 b40292e7 Jan Kiszka
<- { "return": { "status": "completed" } }
2408 b40292e7 Jan Kiszka
2409 b40292e7 Jan Kiszka
3. Migration is done and has failed
2410 b40292e7 Jan Kiszka
2411 b40292e7 Jan Kiszka
-> { "execute": "query-migrate" }
2412 b40292e7 Jan Kiszka
<- { "return": { "status": "failed" } }
2413 b40292e7 Jan Kiszka
2414 b40292e7 Jan Kiszka
4. Migration is being performed and is not a block migration:
2415 b40292e7 Jan Kiszka
2416 b40292e7 Jan Kiszka
-> { "execute": "query-migrate" }
2417 b40292e7 Jan Kiszka
<- {
2418 b40292e7 Jan Kiszka
      "return":{
2419 b40292e7 Jan Kiszka
         "status":"active",
2420 b40292e7 Jan Kiszka
         "ram":{
2421 b40292e7 Jan Kiszka
            "transferred":123,
2422 b40292e7 Jan Kiszka
            "remaining":123,
2423 b40292e7 Jan Kiszka
            "total":246
2424 b40292e7 Jan Kiszka
         }
2425 b40292e7 Jan Kiszka
      }
2426 b40292e7 Jan Kiszka
   }
2427 b40292e7 Jan Kiszka
2428 b40292e7 Jan Kiszka
5. Migration is being performed and is a block migration:
2429 b40292e7 Jan Kiszka
2430 b40292e7 Jan Kiszka
-> { "execute": "query-migrate" }
2431 b40292e7 Jan Kiszka
<- {
2432 b40292e7 Jan Kiszka
      "return":{
2433 b40292e7 Jan Kiszka
         "status":"active",
2434 b40292e7 Jan Kiszka
         "ram":{
2435 b40292e7 Jan Kiszka
            "total":1057024,
2436 b40292e7 Jan Kiszka
            "remaining":1053304,
2437 b40292e7 Jan Kiszka
            "transferred":3720
2438 b40292e7 Jan Kiszka
         },
2439 b40292e7 Jan Kiszka
         "disk":{
2440 b40292e7 Jan Kiszka
            "total":20971520,
2441 b40292e7 Jan Kiszka
            "remaining":20880384,
2442 b40292e7 Jan Kiszka
            "transferred":91136
2443 b40292e7 Jan Kiszka
         }
2444 b40292e7 Jan Kiszka
      }
2445 b40292e7 Jan Kiszka
   }
2446 b40292e7 Jan Kiszka
2447 b40292e7 Jan Kiszka
EQMP
2448 b40292e7 Jan Kiszka
2449 b40292e7 Jan Kiszka
STEXI
2450 33572ece Jan Kiszka
@item info balloon
2451 33572ece Jan Kiszka
show balloon information
2452 b40292e7 Jan Kiszka
ETEXI
2453 b40292e7 Jan Kiszka
SQMP
2454 b40292e7 Jan Kiszka
query-balloon
2455 b40292e7 Jan Kiszka
-------------
2456 b40292e7 Jan Kiszka
2457 b40292e7 Jan Kiszka
Show balloon information.
2458 b40292e7 Jan Kiszka
2459 b40292e7 Jan Kiszka
Make an asynchronous request for balloon info. When the request completes a
2460 b40292e7 Jan Kiszka
json-object will be returned containing the following data:
2461 b40292e7 Jan Kiszka
2462 b40292e7 Jan Kiszka
- "actual": current balloon value in bytes (json-int)
2463 b40292e7 Jan Kiszka
- "mem_swapped_in": Amount of memory swapped in bytes (json-int, optional)
2464 b40292e7 Jan Kiszka
- "mem_swapped_out": Amount of memory swapped out in bytes (json-int, optional)
2465 b40292e7 Jan Kiszka
- "major_page_faults": Number of major faults (json-int, optional)
2466 b40292e7 Jan Kiszka
- "minor_page_faults": Number of minor faults (json-int, optional)
2467 b40292e7 Jan Kiszka
- "free_mem": Total amount of free and unused memory in
2468 b40292e7 Jan Kiszka
              bytes (json-int, optional)
2469 b40292e7 Jan Kiszka
- "total_mem": Total amount of available memory in bytes (json-int, optional)
2470 b40292e7 Jan Kiszka
2471 b40292e7 Jan Kiszka
Example:
2472 b40292e7 Jan Kiszka
2473 b40292e7 Jan Kiszka
-> { "execute": "query-balloon" }
2474 b40292e7 Jan Kiszka
<- {
2475 b40292e7 Jan Kiszka
      "return":{
2476 b40292e7 Jan Kiszka
         "actual":1073741824,
2477 b40292e7 Jan Kiszka
         "mem_swapped_in":0,
2478 b40292e7 Jan Kiszka
         "mem_swapped_out":0,
2479 b40292e7 Jan Kiszka
         "major_page_faults":142,
2480 b40292e7 Jan Kiszka
         "minor_page_faults":239245,
2481 b40292e7 Jan Kiszka
         "free_mem":1014185984,
2482 b40292e7 Jan Kiszka
         "total_mem":1044668416
2483 b40292e7 Jan Kiszka
      }
2484 b40292e7 Jan Kiszka
   }
2485 b40292e7 Jan Kiszka
2486 b40292e7 Jan Kiszka
EQMP
2487 b40292e7 Jan Kiszka
2488 b40292e7 Jan Kiszka
STEXI
2489 33572ece Jan Kiszka
@item info qtree
2490 33572ece Jan Kiszka
show device tree
2491 33572ece Jan Kiszka
@item info qdm
2492 33572ece Jan Kiszka
show qdev device model list
2493 33572ece Jan Kiszka
@item info roms
2494 33572ece Jan Kiszka
show roms
2495 33572ece Jan Kiszka
@end table
2496 33572ece Jan Kiszka
ETEXI
2497 33572ece Jan Kiszka
2498 33572ece Jan Kiszka
HXCOMM DO NOT add new commands after 'info', move your addition before it!
2499 33572ece Jan Kiszka
2500 2313086a Blue Swirl
STEXI
2501 2313086a Blue Swirl
@end table
2502 2313086a Blue Swirl
ETEXI