]> git.proxmox.com Git - qemu.git/blame - qemu-monitor.hx
QMP: Add "Downstream extension of QMP" to spec
[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
4HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5HXCOMM monitor commands
6HXCOMM HXCOMM can be used for comments, discarded from both texi and C
7
8STEXI
9@table @option
10ETEXI
11
d7f9b689
LC
12 {
13 .name = "help|?",
14 .args_type = "name:s?",
d7f9b689
LC
15 .params = "[cmd]",
16 .help = "show the help",
af4ce882 17 .mhandler.cmd = do_help_cmd,
d7f9b689
LC
18 },
19
2313086a
BS
20STEXI
21@item help or ? [@var{cmd}]
70fcbbe7 22@findex help
2313086a
BS
23Show the help for all commands or just for command @var{cmd}.
24ETEXI
25
d7f9b689
LC
26 {
27 .name = "commit",
28 .args_type = "device:B",
d7f9b689
LC
29 .params = "device|all",
30 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
af4ce882 31 .mhandler.cmd = do_commit,
d7f9b689
LC
32 },
33
2313086a
BS
34STEXI
35@item commit
70fcbbe7 36@findex commit
2313086a
BS
37Commit changes to the disk images (if -snapshot is used) or backing files.
38ETEXI
39
d7f9b689
LC
40 {
41 .name = "info",
42 .args_type = "item:s?",
d7f9b689
LC
43 .params = "[subcommand]",
44 .help = "show various information about the system state",
13c7425e 45 .user_print = monitor_user_noop,
261394db 46 .mhandler.cmd_new = do_info,
d7f9b689
LC
47 },
48
2313086a
BS
49STEXI
50@item info @var{subcommand}
70fcbbe7 51@findex info
2313086a
BS
52Show various information about the system state.
53
54@table @option
55@item info version
56show the version of QEMU
57@item info network
58show the various VLANs and the associated devices
59@item info chardev
60show the character devices
61@item info block
62show the block devices
63@item info block
64show block device statistics
65@item info registers
66show the cpu registers
67@item info cpus
68show infos for each CPU
69@item info history
70show the command line history
71@item info irq
72show the interrupts statistics (if available)
73@item info pic
74show i8259 (PIC) state
75@item info pci
76show emulated PCI device info
77@item info tlb
78show virtual to physical memory mappings (i386 only)
79@item info mem
80show the active virtual memory mappings (i386 only)
81@item info hpet
82show state of HPET (i386 only)
2313086a
BS
83@item info kvm
84show KVM information
85@item info usb
86show USB devices plugged on the virtual USB hub
87@item info usbhost
88show all USB host devices
89@item info profile
90show profiling information
91@item info capture
92show information about active capturing
93@item info snapshots
94show list of VM snapshots
95@item info status
96show the current VM status (running|paused)
97@item info pcmcia
98show guest PCMCIA status
99@item info mice
100show which guest mouse is receiving events
101@item info vnc
102show the vnc server status
103@item info name
104show the current VM name
105@item info uuid
106show the current VM UUID
107@item info cpustats
108show CPU statistics
6dbe553f
JK
109@item info usernet
110show user network stack connection states
2313086a
BS
111@item info migrate
112show migration status
113@item info balloon
114show balloon information
115@item info qtree
116show device tree
117@end table
118ETEXI
119
d7f9b689
LC
120 {
121 .name = "q|quit",
122 .args_type = "",
d7f9b689
LC
123 .params = "",
124 .help = "quit the emulator",
b223f35f 125 .user_print = monitor_user_noop,
261394db 126 .mhandler.cmd_new = do_quit,
d7f9b689
LC
127 },
128
2313086a
BS
129STEXI
130@item q or quit
70fcbbe7 131@findex quit
2313086a
BS
132Quit the emulator.
133ETEXI
134
d7f9b689
LC
135 {
136 .name = "eject",
78d714e0 137 .args_type = "force:-f,device:B",
d7f9b689
LC
138 .params = "[-f] device",
139 .help = "eject a removable medium (use -f to force it)",
e1c923a6 140 .user_print = monitor_user_noop,
261394db 141 .mhandler.cmd_new = do_eject,
d7f9b689
LC
142 },
143
2313086a
BS
144STEXI
145@item eject [-f] @var{device}
70fcbbe7 146@findex eject
2313086a
BS
147Eject a removable medium (use -f to force it).
148ETEXI
149
d7f9b689
LC
150 {
151 .name = "change",
152 .args_type = "device:B,target:F,arg:s?",
d7f9b689
LC
153 .params = "device filename [format]",
154 .help = "change a removable medium, optional format",
ec3b82af 155 .user_print = monitor_user_noop,
261394db 156 .mhandler.cmd_new = do_change,
d7f9b689
LC
157 },
158
2313086a
BS
159STEXI
160@item change @var{device} @var{setting}
70fcbbe7 161@findex change
2313086a
BS
162
163Change the configuration of a device.
164
165@table @option
166@item change @var{diskdevice} @var{filename} [@var{format}]
167Change the medium for a removable disk device to point to @var{filename}. eg
168
169@example
170(qemu) change ide1-cd0 /path/to/some.iso
171@end example
172
173@var{format} is optional.
174
175@item change vnc @var{display},@var{options}
176Change the configuration of the VNC server. The valid syntax for @var{display}
177and @var{options} are described at @ref{sec_invocation}. eg
178
179@example
180(qemu) change vnc localhost:1
181@end example
182
183@item change vnc password [@var{password}]
184
185Change the password associated with the VNC server. If the new password is not
186supplied, the monitor will prompt for it to be entered. VNC passwords are only
187significant up to 8 letters. eg
188
189@example
190(qemu) change vnc password
191Password: ********
192@end example
193
194@end table
195ETEXI
196
d7f9b689
LC
197 {
198 .name = "screendump",
199 .args_type = "filename:F",
d7f9b689
LC
200 .params = "filename",
201 .help = "save screen into PPM image 'filename'",
f1dc58e0
LC
202 .user_print = monitor_user_noop,
203 .mhandler.cmd_new = do_screen_dump,
d7f9b689
LC
204 },
205
2313086a
BS
206STEXI
207@item screendump @var{filename}
70fcbbe7 208@findex screendump
2313086a
BS
209Save screen into PPM image @var{filename}.
210ETEXI
211
d7f9b689
LC
212 {
213 .name = "logfile",
214 .args_type = "filename:F",
d7f9b689
LC
215 .params = "filename",
216 .help = "output logs to 'filename'",
af4ce882 217 .mhandler.cmd = do_logfile,
d7f9b689
LC
218 },
219
2313086a
BS
220STEXI
221@item logfile @var{filename}
70fcbbe7 222@findex logfile
2313086a
BS
223Output logs to @var{filename}.
224ETEXI
225
d7f9b689
LC
226 {
227 .name = "log",
228 .args_type = "items:s",
d7f9b689
LC
229 .params = "item1[,...]",
230 .help = "activate logging of the specified items to '/tmp/qemu.log'",
af4ce882 231 .mhandler.cmd = do_log,
d7f9b689
LC
232 },
233
2313086a
BS
234STEXI
235@item log @var{item1}[,...]
70fcbbe7 236@findex log
2313086a
BS
237Activate logging of the specified items to @file{/tmp/qemu.log}.
238ETEXI
239
d7f9b689
LC
240 {
241 .name = "savevm",
242 .args_type = "name:s?",
d7f9b689
LC
243 .params = "[tag|id]",
244 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
af4ce882 245 .mhandler.cmd = do_savevm,
d7f9b689
LC
246 },
247
2313086a
BS
248STEXI
249@item savevm [@var{tag}|@var{id}]
70fcbbe7 250@findex savevm
2313086a
BS
251Create a snapshot of the whole virtual machine. If @var{tag} is
252provided, it is used as human readable identifier. If there is already
253a snapshot with the same tag or ID, it is replaced. More info at
254@ref{vm_snapshots}.
255ETEXI
256
d7f9b689
LC
257 {
258 .name = "loadvm",
259 .args_type = "name:s",
d7f9b689
LC
260 .params = "tag|id",
261 .help = "restore a VM snapshot from its tag or id",
af4ce882 262 .mhandler.cmd = do_loadvm,
d7f9b689
LC
263 },
264
2313086a
BS
265STEXI
266@item loadvm @var{tag}|@var{id}
70fcbbe7 267@findex loadvm
2313086a
BS
268Set the whole virtual machine to the snapshot identified by the tag
269@var{tag} or the unique snapshot ID @var{id}.
270ETEXI
271
d7f9b689
LC
272 {
273 .name = "delvm",
274 .args_type = "name:s",
d7f9b689
LC
275 .params = "tag|id",
276 .help = "delete a VM snapshot from its tag or id",
af4ce882 277 .mhandler.cmd = do_delvm,
d7f9b689
LC
278 },
279
2313086a
BS
280STEXI
281@item delvm @var{tag}|@var{id}
70fcbbe7 282@findex delvm
2313086a
BS
283Delete the snapshot identified by @var{tag} or @var{id}.
284ETEXI
285
d7f9b689
LC
286 {
287 .name = "singlestep",
288 .args_type = "option:s?",
d7f9b689
LC
289 .params = "[on|off]",
290 .help = "run emulation in singlestep mode or switch to normal mode",
af4ce882 291 .mhandler.cmd = do_singlestep,
d7f9b689
LC
292 },
293
2313086a
BS
294STEXI
295@item singlestep [off]
70fcbbe7 296@findex singlestep
2313086a
BS
297Run the emulation in single step mode.
298If called with option off, the emulation returns to normal mode.
299ETEXI
300
d7f9b689
LC
301 {
302 .name = "stop",
303 .args_type = "",
d7f9b689
LC
304 .params = "",
305 .help = "stop emulation",
e0c97bde 306 .user_print = monitor_user_noop,
261394db 307 .mhandler.cmd_new = do_stop,
d7f9b689
LC
308 },
309
2313086a
BS
310STEXI
311@item stop
70fcbbe7 312@findex stop
2313086a
BS
313Stop emulation.
314ETEXI
315
d7f9b689
LC
316 {
317 .name = "c|cont",
318 .args_type = "",
d7f9b689
LC
319 .params = "",
320 .help = "resume emulation",
a1f896a0 321 .user_print = monitor_user_noop,
261394db 322 .mhandler.cmd_new = do_cont,
d7f9b689
LC
323 },
324
2313086a
BS
325STEXI
326@item c or cont
70fcbbe7 327@findex cont
2313086a
BS
328Resume emulation.
329ETEXI
330
d7f9b689
LC
331 {
332 .name = "gdbserver",
333 .args_type = "device:s?",
d7f9b689
LC
334 .params = "[device]",
335 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
af4ce882 336 .mhandler.cmd = do_gdbserver,
d7f9b689
LC
337 },
338
2313086a
BS
339STEXI
340@item gdbserver [@var{port}]
70fcbbe7 341@findex gdbserver
2313086a
BS
342Start gdbserver session (default @var{port}=1234)
343ETEXI
344
d7f9b689
LC
345 {
346 .name = "x",
347 .args_type = "fmt:/,addr:l",
d7f9b689
LC
348 .params = "/fmt addr",
349 .help = "virtual memory dump starting at 'addr'",
af4ce882 350 .mhandler.cmd = do_memory_dump,
d7f9b689
LC
351 },
352
2313086a
BS
353STEXI
354@item x/fmt @var{addr}
70fcbbe7 355@findex x
2313086a
BS
356Virtual memory dump starting at @var{addr}.
357ETEXI
358
d7f9b689
LC
359 {
360 .name = "xp",
361 .args_type = "fmt:/,addr:l",
d7f9b689
LC
362 .params = "/fmt addr",
363 .help = "physical memory dump starting at 'addr'",
af4ce882 364 .mhandler.cmd = do_physical_memory_dump,
d7f9b689
LC
365 },
366
2313086a
BS
367STEXI
368@item xp /@var{fmt} @var{addr}
70fcbbe7 369@findex xp
2313086a
BS
370Physical memory dump starting at @var{addr}.
371
372@var{fmt} is a format which tells the command how to format the
373data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
374
375@table @var
376@item count
377is the number of items to be dumped.
378
379@item format
380can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
381c (char) or i (asm instruction).
382
383@item size
384can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
385@code{h} or @code{w} can be specified with the @code{i} format to
386respectively select 16 or 32 bit code instruction size.
387
388@end table
389
390Examples:
391@itemize
392@item
393Dump 10 instructions at the current instruction pointer:
394@example
395(qemu) x/10i $eip
3960x90107063: ret
3970x90107064: sti
3980x90107065: lea 0x0(%esi,1),%esi
3990x90107069: lea 0x0(%edi,1),%edi
4000x90107070: ret
4010x90107071: jmp 0x90107080
4020x90107073: nop
4030x90107074: nop
4040x90107075: nop
4050x90107076: nop
406@end example
407
408@item
409Dump 80 16 bit values at the start of the video memory.
410@smallexample
411(qemu) xp/80hx 0xb8000
4120x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
4130x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
4140x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
4150x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
4160x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
4170x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
4180x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4190x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4200x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4210x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
422@end smallexample
423@end itemize
424ETEXI
425
d7f9b689
LC
426 {
427 .name = "p|print",
428 .args_type = "fmt:/,val:l",
d7f9b689
LC
429 .params = "/fmt expr",
430 .help = "print expression value (use $reg for CPU register access)",
af4ce882 431 .mhandler.cmd = do_print,
d7f9b689
LC
432 },
433
2313086a
BS
434STEXI
435@item p or print/@var{fmt} @var{expr}
70fcbbe7 436@findex print
2313086a
BS
437
438Print expression value. Only the @var{format} part of @var{fmt} is
439used.
440ETEXI
441
d7f9b689
LC
442 {
443 .name = "i",
444 .args_type = "fmt:/,addr:i,index:i.",
d7f9b689
LC
445 .params = "/fmt addr",
446 .help = "I/O port read",
af4ce882 447 .mhandler.cmd = do_ioport_read,
d7f9b689
LC
448 },
449
2313086a
BS
450STEXI
451Read I/O port.
452ETEXI
453
d7f9b689
LC
454 {
455 .name = "o",
456 .args_type = "fmt:/,addr:i,val:i",
d7f9b689
LC
457 .params = "/fmt addr value",
458 .help = "I/O port write",
af4ce882 459 .mhandler.cmd = do_ioport_write,
d7f9b689
LC
460 },
461
f114784f
JK
462STEXI
463Write to I/O port.
464ETEXI
2313086a 465
d7f9b689
LC
466 {
467 .name = "sendkey",
468 .args_type = "string:s,hold_time:i?",
d7f9b689
LC
469 .params = "keys [hold_ms]",
470 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
af4ce882 471 .mhandler.cmd = do_sendkey,
d7f9b689
LC
472 },
473
2313086a
BS
474STEXI
475@item sendkey @var{keys}
70fcbbe7 476@findex sendkey
2313086a
BS
477
478Send @var{keys} to the emulator. @var{keys} could be the name of the
479key or @code{#} followed by the raw value in either decimal or hexadecimal
480format. Use @code{-} to press several keys simultaneously. Example:
481@example
482sendkey ctrl-alt-f1
483@end example
484
485This command is useful to send keys that your graphical user interface
486intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
487ETEXI
488
d7f9b689
LC
489 {
490 .name = "system_reset",
491 .args_type = "",
d7f9b689
LC
492 .params = "",
493 .help = "reset the system",
c80d259e 494 .user_print = monitor_user_noop,
261394db 495 .mhandler.cmd_new = do_system_reset,
d7f9b689
LC
496 },
497
2313086a
BS
498STEXI
499@item system_reset
70fcbbe7 500@findex system_reset
2313086a
BS
501
502Reset the system.
503ETEXI
504
d7f9b689
LC
505 {
506 .name = "system_powerdown",
507 .args_type = "",
d7f9b689
LC
508 .params = "",
509 .help = "send system power down event",
43076664 510 .user_print = monitor_user_noop,
261394db 511 .mhandler.cmd_new = do_system_powerdown,
d7f9b689
LC
512 },
513
2313086a
BS
514STEXI
515@item system_powerdown
70fcbbe7 516@findex system_powerdown
2313086a
BS
517
518Power down the system (if supported).
519ETEXI
520
d7f9b689
LC
521 {
522 .name = "sum",
523 .args_type = "start:i,size:i",
d7f9b689
LC
524 .params = "addr size",
525 .help = "compute the checksum of a memory region",
af4ce882 526 .mhandler.cmd = do_sum,
d7f9b689
LC
527 },
528
2313086a
BS
529STEXI
530@item sum @var{addr} @var{size}
70fcbbe7 531@findex sum
2313086a
BS
532
533Compute the checksum of a memory region.
534ETEXI
535
d7f9b689
LC
536 {
537 .name = "usb_add",
538 .args_type = "devname:s",
d7f9b689
LC
539 .params = "device",
540 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
af4ce882 541 .mhandler.cmd = do_usb_add,
d7f9b689
LC
542 },
543
2313086a
BS
544STEXI
545@item usb_add @var{devname}
70fcbbe7 546@findex usb_add
2313086a
BS
547
548Add the USB device @var{devname}. For details of available devices see
549@ref{usb_devices}
550ETEXI
551
d7f9b689
LC
552 {
553 .name = "usb_del",
554 .args_type = "devname:s",
d7f9b689
LC
555 .params = "device",
556 .help = "remove USB device 'bus.addr'",
af4ce882 557 .mhandler.cmd = do_usb_del,
d7f9b689
LC
558 },
559
2313086a
BS
560STEXI
561@item usb_del @var{devname}
70fcbbe7 562@findex usb_del
2313086a
BS
563
564Remove the USB device @var{devname} from the QEMU virtual USB
565hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
566command @code{info usb} to see the devices you can remove.
567ETEXI
568
d7f9b689
LC
569 {
570 .name = "device_add",
c7e4e8ce
MA
571 .args_type = "device:O",
572 .params = "driver[,prop=value][,...]",
d7f9b689 573 .help = "add device, like -device on the command line",
8bc27249
MA
574 .user_print = monitor_user_noop,
575 .mhandler.cmd_new = do_device_add,
d7f9b689
LC
576 },
577
3418bd25
GH
578STEXI
579@item device_add @var{config}
70fcbbe7 580@findex device_add
3418bd25
GH
581
582Add device.
583ETEXI
584
d7f9b689
LC
585 {
586 .name = "device_del",
587 .args_type = "id:s",
d7f9b689
LC
588 .params = "device",
589 .help = "remove device",
17a38eaa
MA
590 .user_print = monitor_user_noop,
591 .mhandler.cmd_new = do_device_del,
d7f9b689
LC
592 },
593
3418bd25
GH
594STEXI
595@item device_del @var{id}
70fcbbe7 596@findex device_del
3418bd25
GH
597
598Remove device @var{id}.
599ETEXI
600
d7f9b689
LC
601 {
602 .name = "cpu",
603 .args_type = "index:i",
d7f9b689
LC
604 .params = "index",
605 .help = "set the default CPU",
81a1b45a 606 .user_print = monitor_user_noop,
261394db 607 .mhandler.cmd_new = do_cpu_set,
d7f9b689 608 },
3418bd25 609
2313086a 610STEXI
c427ea9c
MA
611@item cpu @var{index}
612@findex cpu
2313086a
BS
613Set the default CPU.
614ETEXI
615
d7f9b689
LC
616 {
617 .name = "mouse_move",
618 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
d7f9b689
LC
619 .params = "dx dy [dz]",
620 .help = "send mouse move events",
af4ce882 621 .mhandler.cmd = do_mouse_move,
d7f9b689
LC
622 },
623
2313086a
BS
624STEXI
625@item mouse_move @var{dx} @var{dy} [@var{dz}]
70fcbbe7 626@findex mouse_move
2313086a
BS
627Move the active mouse to the specified coordinates @var{dx} @var{dy}
628with optional scroll axis @var{dz}.
629ETEXI
630
d7f9b689
LC
631 {
632 .name = "mouse_button",
633 .args_type = "button_state:i",
d7f9b689
LC
634 .params = "state",
635 .help = "change mouse button state (1=L, 2=M, 4=R)",
af4ce882 636 .mhandler.cmd = do_mouse_button,
d7f9b689
LC
637 },
638
2313086a
BS
639STEXI
640@item mouse_button @var{val}
70fcbbe7 641@findex mouse_button
2313086a
BS
642Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
643ETEXI
644
d7f9b689
LC
645 {
646 .name = "mouse_set",
647 .args_type = "index:i",
d7f9b689
LC
648 .params = "index",
649 .help = "set which mouse device receives events",
af4ce882 650 .mhandler.cmd = do_mouse_set,
d7f9b689
LC
651 },
652
2313086a
BS
653STEXI
654@item mouse_set @var{index}
70fcbbe7 655@findex mouse_set
2313086a
BS
656Set which mouse device receives events at given @var{index}, index
657can be obtained with
658@example
659info mice
660@end example
661ETEXI
662
663#ifdef HAS_AUDIO
d7f9b689
LC
664 {
665 .name = "wavcapture",
666 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
d7f9b689
LC
667 .params = "path [frequency [bits [channels]]]",
668 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
af4ce882 669 .mhandler.cmd = do_wav_capture,
d7f9b689 670 },
2313086a
BS
671#endif
672STEXI
673@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
70fcbbe7 674@findex wavcapture
2313086a
BS
675Capture audio into @var{filename}. Using sample rate @var{frequency}
676bits per sample @var{bits} and number of channels @var{channels}.
677
678Defaults:
679@itemize @minus
680@item Sample rate = 44100 Hz - CD quality
681@item Bits = 16
682@item Number of channels = 2 - Stereo
683@end itemize
684ETEXI
685
686#ifdef HAS_AUDIO
d7f9b689
LC
687 {
688 .name = "stopcapture",
689 .args_type = "n:i",
d7f9b689
LC
690 .params = "capture index",
691 .help = "stop capture",
af4ce882 692 .mhandler.cmd = do_stop_capture,
d7f9b689 693 },
2313086a
BS
694#endif
695STEXI
696@item stopcapture @var{index}
70fcbbe7 697@findex stopcapture
2313086a
BS
698Stop capture with a given @var{index}, index can be obtained with
699@example
700info capture
701@end example
702ETEXI
703
d7f9b689
LC
704 {
705 .name = "memsave",
706 .args_type = "val:l,size:i,filename:s",
d7f9b689
LC
707 .params = "addr size file",
708 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
57e09454 709 .user_print = monitor_user_noop,
261394db 710 .mhandler.cmd_new = do_memory_save,
d7f9b689
LC
711 },
712
2313086a
BS
713STEXI
714@item memsave @var{addr} @var{size} @var{file}
70fcbbe7 715@findex memsave
2313086a
BS
716save to disk virtual memory dump starting at @var{addr} of size @var{size}.
717ETEXI
718
d7f9b689
LC
719 {
720 .name = "pmemsave",
721 .args_type = "val:l,size:i,filename:s",
d7f9b689
LC
722 .params = "addr size file",
723 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
18f5a8bf 724 .user_print = monitor_user_noop,
261394db 725 .mhandler.cmd_new = do_physical_memory_save,
d7f9b689
LC
726 },
727
2313086a
BS
728STEXI
729@item pmemsave @var{addr} @var{size} @var{file}
70fcbbe7 730@findex pmemsave
2313086a
BS
731save to disk physical memory dump starting at @var{addr} of size @var{size}.
732ETEXI
733
d7f9b689
LC
734 {
735 .name = "boot_set",
736 .args_type = "bootdevice:s",
d7f9b689
LC
737 .params = "bootdevice",
738 .help = "define new values for the boot device list",
af4ce882 739 .mhandler.cmd = do_boot_set,
d7f9b689
LC
740 },
741
2313086a
BS
742STEXI
743@item boot_set @var{bootdevicelist}
70fcbbe7 744@findex boot_set
2313086a
BS
745
746Define new values for the boot device list. Those values will override
747the values specified on the command line through the @code{-boot} option.
748
749The values that can be specified here depend on the machine type, but are
750the same that can be specified in the @code{-boot} command line option.
751ETEXI
752
753#if defined(TARGET_I386)
d7f9b689
LC
754 {
755 .name = "nmi",
756 .args_type = "cpu_index:i",
d7f9b689
LC
757 .params = "cpu",
758 .help = "inject an NMI on the given CPU",
af4ce882 759 .mhandler.cmd = do_inject_nmi,
d7f9b689 760 },
2313086a
BS
761#endif
762STEXI
763@item nmi @var{cpu}
70fcbbe7 764@findex nmi
2313086a
BS
765Inject an NMI on the given CPU (x86 only).
766ETEXI
767
d7f9b689
LC
768 {
769 .name = "migrate",
fbc3d96c 770 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
771 .params = "[-d] [-b] [-i] uri",
772 .help = "migrate to URI (using -d to not wait for completion)"
773 "\n\t\t\t -b for migration without shared storage with"
774 " full copy of disk\n\t\t\t -i for migration without "
775 "shared storage with incremental copy of disk "
776 "(base image shared between src and destination)",
777 .user_print = monitor_user_noop,
261394db 778 .mhandler.cmd_new = do_migrate,
d7f9b689
LC
779 },
780
fbc3d96c 781
2313086a 782STEXI
fbc3d96c 783@item migrate [-d] [-b] [-i] @var{uri}
70fcbbe7 784@findex migrate
2313086a 785Migrate to @var{uri} (using -d to not wait for completion).
fbc3d96c 786 -b for migration with full copy of disk
787 -i for migration with incremental copy of disk (base image is shared)
2313086a
BS
788ETEXI
789
d7f9b689
LC
790 {
791 .name = "migrate_cancel",
792 .args_type = "",
d7f9b689
LC
793 .params = "",
794 .help = "cancel the current VM migration",
911d2963 795 .user_print = monitor_user_noop,
261394db 796 .mhandler.cmd_new = do_migrate_cancel,
d7f9b689
LC
797 },
798
2313086a
BS
799STEXI
800@item migrate_cancel
70fcbbe7 801@findex migrate_cancel
2313086a
BS
802Cancel the current VM migration.
803ETEXI
804
d7f9b689
LC
805 {
806 .name = "migrate_set_speed",
ee9545da 807 .args_type = "value:f",
d7f9b689
LC
808 .params = "value",
809 .help = "set maximum speed (in bytes) for migrations",
5fd9083c 810 .user_print = monitor_user_noop,
261394db 811 .mhandler.cmd_new = do_migrate_set_speed,
d7f9b689
LC
812 },
813
2313086a
BS
814STEXI
815@item migrate_set_speed @var{value}
70fcbbe7 816@findex migrate_set_speed
2313086a 817Set maximum speed to @var{value} (in bytes) for migrations.
2ea42952
GC
818ETEXI
819
d7f9b689
LC
820 {
821 .name = "migrate_set_downtime",
b0fbf7d3 822 .args_type = "value:T",
d7f9b689
LC
823 .params = "value",
824 .help = "set maximum tolerated downtime (in seconds) for migrations",
c6027f56 825 .user_print = monitor_user_noop,
261394db 826 .mhandler.cmd_new = do_migrate_set_downtime,
d7f9b689 827 },
2ea42952
GC
828
829STEXI
830@item migrate_set_downtime @var{second}
70fcbbe7 831@findex migrate_set_downtime
2ea42952 832Set maximum tolerated downtime (in seconds) for migration.
2313086a
BS
833ETEXI
834
835#if defined(TARGET_I386)
d7f9b689
LC
836 {
837 .name = "drive_add",
838 .args_type = "pci_addr:s,opts:s",
d7f9b689
LC
839 .params = "[[<domain>:]<bus>:]<slot>\n"
840 "[file=file][,if=type][,bus=n]\n"
841 "[,unit=m][,media=d][index=i]\n"
842 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
843 "[snapshot=on|off][,cache=on|off]",
844 .help = "add drive to PCI storage controller",
af4ce882 845 .mhandler.cmd = drive_hot_add,
d7f9b689 846 },
2313086a 847#endif
d7f9b689 848
2313086a
BS
849STEXI
850@item drive_add
70fcbbe7 851@findex drive_add
2313086a
BS
852Add drive to PCI storage controller.
853ETEXI
854
855#if defined(TARGET_I386)
d7f9b689
LC
856 {
857 .name = "pci_add",
858 .args_type = "pci_addr:s,type:s,opts:s?",
d7f9b689
LC
859 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
860 .help = "hot-add PCI device",
7a344f7a 861 .user_print = pci_device_hot_add_print,
261394db 862 .mhandler.cmd_new = pci_device_hot_add,
d7f9b689 863 },
2313086a 864#endif
d7f9b689 865
2313086a
BS
866STEXI
867@item pci_add
70fcbbe7 868@findex pci_add
2313086a
BS
869Hot-add PCI device.
870ETEXI
871
872#if defined(TARGET_I386)
d7f9b689
LC
873 {
874 .name = "pci_del",
875 .args_type = "pci_addr:s",
d7f9b689
LC
876 .params = "[[<domain>:]<bus>:]<slot>",
877 .help = "hot remove PCI device",
6848d827 878 .user_print = monitor_user_noop,
261394db 879 .mhandler.cmd_new = do_pci_device_hot_remove,
d7f9b689 880 },
2313086a 881#endif
d7f9b689 882
2313086a
BS
883STEXI
884@item pci_del
70fcbbe7 885@findex pci_del
2313086a
BS
886Hot remove PCI device.
887ETEXI
888
d7f9b689
LC
889 {
890 .name = "host_net_add",
891 .args_type = "device:s,opts:s?",
d7f9b689
LC
892 .params = "tap|user|socket|vde|dump [options]",
893 .help = "add host VLAN client",
af4ce882 894 .mhandler.cmd = net_host_device_add,
d7f9b689
LC
895 },
896
2313086a
BS
897STEXI
898@item host_net_add
70fcbbe7 899@findex host_net_add
2313086a
BS
900Add host VLAN client.
901ETEXI
902
d7f9b689
LC
903 {
904 .name = "host_net_remove",
905 .args_type = "vlan_id:i,device:s",
d7f9b689
LC
906 .params = "vlan_id name",
907 .help = "remove host VLAN client",
af4ce882 908 .mhandler.cmd = net_host_device_remove,
d7f9b689
LC
909 },
910
2313086a
BS
911STEXI
912@item host_net_remove
70fcbbe7 913@findex host_net_remove
2313086a 914Remove host VLAN client.
ae82d324
MA
915ETEXI
916
917 {
918 .name = "netdev_add",
919 .args_type = "netdev:O",
920 .params = "[user|tap|socket],id=str[,prop=value][,...]",
921 .help = "add host network device",
922 .user_print = monitor_user_noop,
923 .mhandler.cmd_new = do_netdev_add,
924 },
925
926STEXI
927@item netdev_add
928@findex netdev_add
929Add host network device.
930ETEXI
931
932 {
933 .name = "netdev_del",
934 .args_type = "id:s",
935 .params = "id",
936 .help = "remove host network device",
937 .user_print = monitor_user_noop,
938 .mhandler.cmd_new = do_netdev_del,
939 },
940
941STEXI
942@item netdev_del
943@findex netdev_del
944Remove host network device.
2313086a
BS
945ETEXI
946
947#ifdef CONFIG_SLIRP
d7f9b689
LC
948 {
949 .name = "hostfwd_add",
950 .args_type = "arg1:s,arg2:s?,arg3:s?",
d7f9b689
LC
951 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
952 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
af4ce882 953 .mhandler.cmd = net_slirp_hostfwd_add,
d7f9b689 954 },
21413d68
MA
955#endif
956STEXI
957@item hostfwd_add
958@findex hostfwd_add
959Redirect TCP or UDP connections from host to guest (requires -net user).
960ETEXI
d7f9b689 961
21413d68 962#ifdef CONFIG_SLIRP
d7f9b689
LC
963 {
964 .name = "hostfwd_remove",
965 .args_type = "arg1:s,arg2:s?,arg3:s?",
d7f9b689
LC
966 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
967 .help = "remove host-to-guest TCP or UDP redirection",
af4ce882 968 .mhandler.cmd = net_slirp_hostfwd_remove,
d7f9b689
LC
969 },
970
2313086a
BS
971#endif
972STEXI
21413d68
MA
973@item hostfwd_remove
974@findex hostfwd_remove
975Remove host-to-guest TCP or UDP redirection.
2313086a
BS
976ETEXI
977
d7f9b689
LC
978 {
979 .name = "balloon",
3b0bd6ec 980 .args_type = "value:M",
d7f9b689
LC
981 .params = "target",
982 .help = "request VM to change it's memory allocation (in MB)",
83fb1de2 983 .user_print = monitor_user_noop,
625a5bef
AL
984 .mhandler.cmd_async = do_balloon,
985 .async = 1,
d7f9b689
LC
986 },
987
2313086a
BS
988STEXI
989@item balloon @var{value}
70fcbbe7 990@findex balloon
2313086a
BS
991Request VM to change its memory allocation to @var{value} (in MB).
992ETEXI
993
d7f9b689
LC
994 {
995 .name = "set_link",
c9b26a4c
MA
996 .args_type = "name:s,up:b",
997 .params = "name on|off",
d7f9b689 998 .help = "change the link status of a network adapter",
5369e3c0
MA
999 .user_print = monitor_user_noop,
1000 .mhandler.cmd_new = do_set_link,
d7f9b689
LC
1001 },
1002
2313086a 1003STEXI
c9b26a4c 1004@item set_link @var{name} [on|off]
70fcbbe7 1005@findex set_link
c9b26a4c 1006Switch link @var{name} on (i.e. up) or off (i.e. down).
2313086a
BS
1007ETEXI
1008
d7f9b689
LC
1009 {
1010 .name = "watchdog_action",
1011 .args_type = "action:s",
d7f9b689
LC
1012 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1013 .help = "change watchdog action",
af4ce882 1014 .mhandler.cmd = do_watchdog_action,
d7f9b689
LC
1015 },
1016
2313086a
BS
1017STEXI
1018@item watchdog_action
70fcbbe7 1019@findex watchdog_action
2313086a
BS
1020Change watchdog action.
1021ETEXI
1022
d7f9b689
LC
1023 {
1024 .name = "acl_show",
1025 .args_type = "aclname:s",
d7f9b689
LC
1026 .params = "aclname",
1027 .help = "list rules in the access control list",
af4ce882 1028 .mhandler.cmd = do_acl_show,
d7f9b689
LC
1029 },
1030
2313086a 1031STEXI
15dfcd45 1032@item acl_show @var{aclname}
70fcbbe7 1033@findex acl_show
15dfcd45
JK
1034List all the matching rules in the access control list, and the default
1035policy. There are currently two named access control lists,
1036@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1037certificate distinguished name, and SASL username respectively.
1038ETEXI
2313086a 1039
d7f9b689
LC
1040 {
1041 .name = "acl_policy",
1042 .args_type = "aclname:s,policy:s",
d7f9b689
LC
1043 .params = "aclname allow|deny",
1044 .help = "set default access control list policy",
af4ce882 1045 .mhandler.cmd = do_acl_policy,
d7f9b689
LC
1046 },
1047
15dfcd45 1048STEXI
cbbfacc6 1049@item acl_policy @var{aclname} @code{allow|deny}
70fcbbe7 1050@findex acl_policy
15dfcd45 1051Set the default access control list policy, used in the event that
2313086a 1052none of the explicit rules match. The default policy at startup is
15dfcd45
JK
1053always @code{deny}.
1054ETEXI
1055
d7f9b689
LC
1056 {
1057 .name = "acl_add",
1058 .args_type = "aclname:s,match:s,policy:s,index:i?",
d7f9b689
LC
1059 .params = "aclname match allow|deny [index]",
1060 .help = "add a match rule to the access control list",
af4ce882 1061 .mhandler.cmd = do_acl_add,
d7f9b689
LC
1062 },
1063
15dfcd45 1064STEXI
0e4aec98
MA
1065@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1066@findex acl_add
15dfcd45
JK
1067Add a match rule to the access control list, allowing or denying access.
1068The match will normally be an exact username or x509 distinguished name,
1069but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1070allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
2313086a 1071normally be appended to the end of the ACL, but can be inserted
15dfcd45
JK
1072earlier in the list if the optional @var{index} parameter is supplied.
1073ETEXI
1074
d7f9b689
LC
1075 {
1076 .name = "acl_remove",
1077 .args_type = "aclname:s,match:s",
d7f9b689
LC
1078 .params = "aclname match",
1079 .help = "remove a match rule from the access control list",
af4ce882 1080 .mhandler.cmd = do_acl_remove,
d7f9b689
LC
1081 },
1082
15dfcd45
JK
1083STEXI
1084@item acl_remove @var{aclname} @var{match}
70fcbbe7 1085@findex acl_remove
15dfcd45
JK
1086Remove the specified match rule from the access control list.
1087ETEXI
1088
d7f9b689
LC
1089 {
1090 .name = "acl_reset",
1091 .args_type = "aclname:s",
d7f9b689
LC
1092 .params = "aclname",
1093 .help = "reset the access control list",
af4ce882 1094 .mhandler.cmd = do_acl_reset,
d7f9b689
LC
1095 },
1096
15dfcd45 1097STEXI
0e4aec98
MA
1098@item acl_reset @var{aclname}
1099@findex acl_reset
15dfcd45 1100Remove all matches from the access control list, and set the default
2313086a 1101policy back to @code{deny}.
2313086a
BS
1102ETEXI
1103
79c4f6b0 1104#if defined(TARGET_I386)
d7f9b689
LC
1105
1106 {
1107 .name = "mce",
1108 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
d7f9b689
LC
1109 .params = "cpu bank status mcgstatus addr misc",
1110 .help = "inject a MCE on the given CPU",
af4ce882 1111 .mhandler.cmd = do_inject_mce,
d7f9b689
LC
1112 },
1113
79c4f6b0
HY
1114#endif
1115STEXI
1116@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
70fcbbe7 1117@findex mce (x86)
79c4f6b0 1118Inject an MCE on the given CPU (x86 only).
f07918fd
MM
1119ETEXI
1120
d7f9b689
LC
1121 {
1122 .name = "getfd",
1123 .args_type = "fdname:s",
d7f9b689
LC
1124 .params = "getfd name",
1125 .help = "receive a file descriptor via SCM rights and assign it a name",
f0d6000a 1126 .user_print = monitor_user_noop,
261394db 1127 .mhandler.cmd_new = do_getfd,
d7f9b689
LC
1128 },
1129
f07918fd
MM
1130STEXI
1131@item getfd @var{fdname}
70fcbbe7 1132@findex getfd
f07918fd
MM
1133If a file descriptor is passed alongside this command using the SCM_RIGHTS
1134mechanism on unix sockets, it is stored using the name @var{fdname} for
1135later use by other monitor commands.
1136ETEXI
1137
d7f9b689
LC
1138 {
1139 .name = "closefd",
1140 .args_type = "fdname:s",
d7f9b689
LC
1141 .params = "closefd name",
1142 .help = "close a file descriptor previously passed via SCM rights",
18f3a515 1143 .user_print = monitor_user_noop,
261394db 1144 .mhandler.cmd_new = do_closefd,
d7f9b689
LC
1145 },
1146
f07918fd
MM
1147STEXI
1148@item closefd @var{fdname}
70fcbbe7 1149@findex closefd
f07918fd
MM
1150Close the file descriptor previously assigned to @var{fdname} using the
1151@code{getfd} command. This is only needed if the file descriptor was never
1152used by another monitor command.
a3a55a2e
LC
1153ETEXI
1154
1155 {
1156 .name = "block_passwd",
1157 .args_type = "device:B,password:s",
1158 .params = "block_passwd device password",
1159 .help = "set the password of encrypted block devices",
1160 .user_print = monitor_user_noop,
261394db 1161 .mhandler.cmd_new = do_block_set_passwd,
a3a55a2e
LC
1162 },
1163
1164STEXI
1165@item block_passwd @var{device} @var{password}
70fcbbe7 1166@findex block_passwd
a3a55a2e 1167Set the encrypted device @var{device} password to @var{password}
4a7e1190
LC
1168ETEXI
1169
1170 {
1171 .name = "qmp_capabilities",
1172 .args_type = "",
1173 .params = "",
1174 .help = "enable QMP capabilities",
1175 .user_print = monitor_user_noop,
261394db 1176 .mhandler.cmd_new = do_qmp_capabilities,
4a7e1190
LC
1177 },
1178
1179STEXI
1180@item qmp_capabilities
54d7cf13 1181@findex qmp_capabilities
4a7e1190 1182Enable the specified QMP capabilities
79c4f6b0
HY
1183ETEXI
1184
2313086a
BS
1185STEXI
1186@end table
1187ETEXI