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