Statistics
| Branch: | Revision:

root / qemu-monitor.hx @ 030db6e8

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