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