Statistics
| Branch: | Revision:

root / qemu-monitor.hx @ 3329f07b

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