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