blob: 220ed9c976f90371dfa2b854480aea55554f5a1d [file] [log] [blame]
Blue Swirl23130862009-06-06 08:22:04 +00001HXCOMM 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
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030012 {
13 .name = "help|?",
14 .args_type = "name:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030015 .params = "[cmd]",
16 .help = "show the help",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -030017 .mhandler.cmd = do_help_cmd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030018 },
19
Blue Swirl23130862009-06-06 08:22:04 +000020STEXI
21@item help or ? [@var{cmd}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +010022@findex help
Blue Swirl23130862009-06-06 08:22:04 +000023Show the help for all commands or just for command @var{cmd}.
24ETEXI
25
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030026 {
27 .name = "commit",
28 .args_type = "device:B",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030029 .params = "device|all",
30 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -030031 .mhandler.cmd = do_commit,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030032 },
33
Blue Swirl23130862009-06-06 08:22:04 +000034STEXI
35@item commit
Stefan Weil70fcbbe2010-02-05 23:52:04 +010036@findex commit
Blue Swirl23130862009-06-06 08:22:04 +000037Commit changes to the disk images (if -snapshot is used) or backing files.
38ETEXI
39
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030040 {
41 .name = "info",
42 .args_type = "item:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030043 .params = "[subcommand]",
44 .help = "show various information about the system state",
Luiz Capitulino13c74252009-10-07 13:41:55 -030045 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -020046 .mhandler.cmd_new = do_info,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -030047 },
48
Blue Swirl23130862009-06-06 08:22:04 +000049STEXI
50@item info @var{subcommand}
Stefan Weil70fcbbe2010-02-05 23:52:04 +010051@findex info
Blue Swirl23130862009-06-06 08:22:04 +000052Show 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)
Blue Swirl23130862009-06-06 08:22:04 +000083@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
Jan Kiszka6dbe5532009-06-24 14:42:29 +0200109@item info usernet
110show user network stack connection states
Blue Swirl23130862009-06-06 08:22:04 +0000111@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
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300120 {
121 .name = "q|quit",
122 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300123 .params = "",
124 .help = "quit the emulator",
Luiz Capitulinob223f352009-10-07 13:41:56 -0300125 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200126 .mhandler.cmd_new = do_quit,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300127 },
128
Blue Swirl23130862009-06-06 08:22:04 +0000129STEXI
130@item q or quit
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100131@findex quit
Blue Swirl23130862009-06-06 08:22:04 +0000132Quit the emulator.
133ETEXI
134
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300135 {
136 .name = "eject",
Luiz Capitulino78d714e2009-12-14 18:53:21 -0200137 .args_type = "force:-f,device:B",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300138 .params = "[-f] device",
139 .help = "eject a removable medium (use -f to force it)",
Luiz Capitulinoe1c923a2009-10-16 12:23:49 -0300140 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200141 .mhandler.cmd_new = do_eject,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300142 },
143
Blue Swirl23130862009-06-06 08:22:04 +0000144STEXI
145@item eject [-f] @var{device}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100146@findex eject
Blue Swirl23130862009-06-06 08:22:04 +0000147Eject a removable medium (use -f to force it).
148ETEXI
149
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300150 {
151 .name = "change",
152 .args_type = "device:B,target:F,arg:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300153 .params = "device filename [format]",
154 .help = "change a removable medium, optional format",
Markus Armbrusterec3b82a2009-12-07 21:37:09 +0100155 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200156 .mhandler.cmd_new = do_change,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300157 },
158
Blue Swirl23130862009-06-06 08:22:04 +0000159STEXI
160@item change @var{device} @var{setting}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100161@findex change
Blue Swirl23130862009-06-06 08:22:04 +0000162
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
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300197 {
198 .name = "screendump",
199 .args_type = "filename:F",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300200 .params = "filename",
201 .help = "save screen into PPM image 'filename'",
Luiz Capitulinof1dc58e2010-03-31 15:21:49 -0300202 .user_print = monitor_user_noop,
203 .mhandler.cmd_new = do_screen_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300204 },
205
Blue Swirl23130862009-06-06 08:22:04 +0000206STEXI
207@item screendump @var{filename}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100208@findex screendump
Blue Swirl23130862009-06-06 08:22:04 +0000209Save screen into PPM image @var{filename}.
210ETEXI
211
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300212 {
213 .name = "logfile",
214 .args_type = "filename:F",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300215 .params = "filename",
216 .help = "output logs to 'filename'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300217 .mhandler.cmd = do_logfile,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300218 },
219
Blue Swirl23130862009-06-06 08:22:04 +0000220STEXI
221@item logfile @var{filename}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100222@findex logfile
Blue Swirl23130862009-06-06 08:22:04 +0000223Output logs to @var{filename}.
224ETEXI
225
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300226 {
227 .name = "log",
228 .args_type = "items:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300229 .params = "item1[,...]",
230 .help = "activate logging of the specified items to '/tmp/qemu.log'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300231 .mhandler.cmd = do_log,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300232 },
233
Blue Swirl23130862009-06-06 08:22:04 +0000234STEXI
235@item log @var{item1}[,...]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100236@findex log
Blue Swirl23130862009-06-06 08:22:04 +0000237Activate logging of the specified items to @file{/tmp/qemu.log}.
238ETEXI
239
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300240 {
241 .name = "savevm",
242 .args_type = "name:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300243 .params = "[tag|id]",
244 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300245 .mhandler.cmd = do_savevm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300246 },
247
Blue Swirl23130862009-06-06 08:22:04 +0000248STEXI
249@item savevm [@var{tag}|@var{id}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100250@findex savevm
Blue Swirl23130862009-06-06 08:22:04 +0000251Create 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
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300257 {
258 .name = "loadvm",
259 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300260 .params = "tag|id",
261 .help = "restore a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300262 .mhandler.cmd = do_loadvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300263 },
264
Blue Swirl23130862009-06-06 08:22:04 +0000265STEXI
266@item loadvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100267@findex loadvm
Blue Swirl23130862009-06-06 08:22:04 +0000268Set the whole virtual machine to the snapshot identified by the tag
269@var{tag} or the unique snapshot ID @var{id}.
270ETEXI
271
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300272 {
273 .name = "delvm",
274 .args_type = "name:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300275 .params = "tag|id",
276 .help = "delete a VM snapshot from its tag or id",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300277 .mhandler.cmd = do_delvm,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300278 },
279
Blue Swirl23130862009-06-06 08:22:04 +0000280STEXI
281@item delvm @var{tag}|@var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100282@findex delvm
Blue Swirl23130862009-06-06 08:22:04 +0000283Delete the snapshot identified by @var{tag} or @var{id}.
284ETEXI
285
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300286 {
287 .name = "singlestep",
288 .args_type = "option:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300289 .params = "[on|off]",
290 .help = "run emulation in singlestep mode or switch to normal mode",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300291 .mhandler.cmd = do_singlestep,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300292 },
293
Blue Swirl23130862009-06-06 08:22:04 +0000294STEXI
295@item singlestep [off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100296@findex singlestep
Blue Swirl23130862009-06-06 08:22:04 +0000297Run the emulation in single step mode.
298If called with option off, the emulation returns to normal mode.
299ETEXI
300
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300301 {
302 .name = "stop",
303 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300304 .params = "",
305 .help = "stop emulation",
Luiz Capitulinoe0c97bd2009-10-07 13:41:57 -0300306 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200307 .mhandler.cmd_new = do_stop,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300308 },
309
Blue Swirl23130862009-06-06 08:22:04 +0000310STEXI
311@item stop
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100312@findex stop
Blue Swirl23130862009-06-06 08:22:04 +0000313Stop emulation.
314ETEXI
315
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300316 {
317 .name = "c|cont",
318 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300319 .params = "",
320 .help = "resume emulation",
Luiz Capitulinoa1f896a2009-10-07 13:42:00 -0300321 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200322 .mhandler.cmd_new = do_cont,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300323 },
324
Blue Swirl23130862009-06-06 08:22:04 +0000325STEXI
326@item c or cont
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100327@findex cont
Blue Swirl23130862009-06-06 08:22:04 +0000328Resume emulation.
329ETEXI
330
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300331 {
332 .name = "gdbserver",
333 .args_type = "device:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300334 .params = "[device]",
335 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300336 .mhandler.cmd = do_gdbserver,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300337 },
338
Blue Swirl23130862009-06-06 08:22:04 +0000339STEXI
340@item gdbserver [@var{port}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100341@findex gdbserver
Blue Swirl23130862009-06-06 08:22:04 +0000342Start gdbserver session (default @var{port}=1234)
343ETEXI
344
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300345 {
346 .name = "x",
347 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300348 .params = "/fmt addr",
349 .help = "virtual memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300350 .mhandler.cmd = do_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300351 },
352
Blue Swirl23130862009-06-06 08:22:04 +0000353STEXI
354@item x/fmt @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100355@findex x
Blue Swirl23130862009-06-06 08:22:04 +0000356Virtual memory dump starting at @var{addr}.
357ETEXI
358
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300359 {
360 .name = "xp",
361 .args_type = "fmt:/,addr:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300362 .params = "/fmt addr",
363 .help = "physical memory dump starting at 'addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300364 .mhandler.cmd = do_physical_memory_dump,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300365 },
366
Blue Swirl23130862009-06-06 08:22:04 +0000367STEXI
368@item xp /@var{fmt} @var{addr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100369@findex xp
Blue Swirl23130862009-06-06 08:22:04 +0000370Physical 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
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100377@findex count
Blue Swirl23130862009-06-06 08:22:04 +0000378is the number of items to be dumped.
379
380@item format
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100381@findex format
Blue Swirl23130862009-06-06 08:22:04 +0000382can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
383c (char) or i (asm instruction).
384
385@item size
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100386@findex size
Blue Swirl23130862009-06-06 08:22:04 +0000387can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
388@code{h} or @code{w} can be specified with the @code{i} format to
389respectively select 16 or 32 bit code instruction size.
390
391@end table
392
393Examples:
394@itemize
395@item
396Dump 10 instructions at the current instruction pointer:
397@example
398(qemu) x/10i $eip
3990x90107063: ret
4000x90107064: sti
4010x90107065: lea 0x0(%esi,1),%esi
4020x90107069: lea 0x0(%edi,1),%edi
4030x90107070: ret
4040x90107071: jmp 0x90107080
4050x90107073: nop
4060x90107074: nop
4070x90107075: nop
4080x90107076: nop
409@end example
410
411@item
412Dump 80 16 bit values at the start of the video memory.
413@smallexample
414(qemu) xp/80hx 0xb8000
4150x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
4160x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
4170x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
4180x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
4190x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
4200x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
4210x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4220x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4230x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4240x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
425@end smallexample
426@end itemize
427ETEXI
428
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300429 {
430 .name = "p|print",
431 .args_type = "fmt:/,val:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300432 .params = "/fmt expr",
433 .help = "print expression value (use $reg for CPU register access)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300434 .mhandler.cmd = do_print,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300435 },
436
Blue Swirl23130862009-06-06 08:22:04 +0000437STEXI
438@item p or print/@var{fmt} @var{expr}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100439@findex print
Blue Swirl23130862009-06-06 08:22:04 +0000440
441Print expression value. Only the @var{format} part of @var{fmt} is
442used.
443ETEXI
444
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300445 {
446 .name = "i",
447 .args_type = "fmt:/,addr:i,index:i.",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300448 .params = "/fmt addr",
449 .help = "I/O port read",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300450 .mhandler.cmd = do_ioport_read,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300451 },
452
Blue Swirl23130862009-06-06 08:22:04 +0000453STEXI
454Read I/O port.
455ETEXI
456
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300457 {
458 .name = "o",
459 .args_type = "fmt:/,addr:i,val:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300460 .params = "/fmt addr value",
461 .help = "I/O port write",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300462 .mhandler.cmd = do_ioport_write,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300463 },
464
Jan Kiszkaf1147842009-07-14 10:20:11 +0200465STEXI
466Write to I/O port.
467ETEXI
Blue Swirl23130862009-06-06 08:22:04 +0000468
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300469 {
470 .name = "sendkey",
471 .args_type = "string:s,hold_time:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300472 .params = "keys [hold_ms]",
473 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300474 .mhandler.cmd = do_sendkey,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300475 },
476
Blue Swirl23130862009-06-06 08:22:04 +0000477STEXI
478@item sendkey @var{keys}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100479@findex sendkey
Blue Swirl23130862009-06-06 08:22:04 +0000480
481Send @var{keys} to the emulator. @var{keys} could be the name of the
482key or @code{#} followed by the raw value in either decimal or hexadecimal
483format. Use @code{-} to press several keys simultaneously. Example:
484@example
485sendkey ctrl-alt-f1
486@end example
487
488This command is useful to send keys that your graphical user interface
489intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
490ETEXI
491
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300492 {
493 .name = "system_reset",
494 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300495 .params = "",
496 .help = "reset the system",
Luiz Capitulinoc80d2592009-10-07 13:41:58 -0300497 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200498 .mhandler.cmd_new = do_system_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300499 },
500
Blue Swirl23130862009-06-06 08:22:04 +0000501STEXI
502@item system_reset
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100503@findex system_reset
Blue Swirl23130862009-06-06 08:22:04 +0000504
505Reset the system.
506ETEXI
507
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300508 {
509 .name = "system_powerdown",
510 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300511 .params = "",
512 .help = "send system power down event",
Luiz Capitulino43076662009-10-07 13:41:59 -0300513 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200514 .mhandler.cmd_new = do_system_powerdown,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300515 },
516
Blue Swirl23130862009-06-06 08:22:04 +0000517STEXI
518@item system_powerdown
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100519@findex system_powerdown
Blue Swirl23130862009-06-06 08:22:04 +0000520
521Power down the system (if supported).
522ETEXI
523
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300524 {
525 .name = "sum",
526 .args_type = "start:i,size:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300527 .params = "addr size",
528 .help = "compute the checksum of a memory region",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300529 .mhandler.cmd = do_sum,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300530 },
531
Blue Swirl23130862009-06-06 08:22:04 +0000532STEXI
533@item sum @var{addr} @var{size}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100534@findex sum
Blue Swirl23130862009-06-06 08:22:04 +0000535
536Compute the checksum of a memory region.
537ETEXI
538
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300539 {
540 .name = "usb_add",
541 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300542 .params = "device",
543 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300544 .mhandler.cmd = do_usb_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300545 },
546
Blue Swirl23130862009-06-06 08:22:04 +0000547STEXI
548@item usb_add @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100549@findex usb_add
Blue Swirl23130862009-06-06 08:22:04 +0000550
551Add the USB device @var{devname}. For details of available devices see
552@ref{usb_devices}
553ETEXI
554
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300555 {
556 .name = "usb_del",
557 .args_type = "devname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300558 .params = "device",
559 .help = "remove USB device 'bus.addr'",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300560 .mhandler.cmd = do_usb_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300561 },
562
Blue Swirl23130862009-06-06 08:22:04 +0000563STEXI
564@item usb_del @var{devname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100565@findex usb_del
Blue Swirl23130862009-06-06 08:22:04 +0000566
567Remove the USB device @var{devname} from the QEMU virtual USB
568hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
569command @code{info usb} to see the devices you can remove.
570ETEXI
571
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300572 {
573 .name = "device_add",
Markus Armbrusterc7e4e8c2010-02-10 20:47:28 +0100574 .args_type = "device:O",
575 .params = "driver[,prop=value][,...]",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300576 .help = "add device, like -device on the command line",
Markus Armbruster8bc27242010-02-10 20:52:01 +0100577 .user_print = monitor_user_noop,
578 .mhandler.cmd_new = do_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300579 },
580
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200581STEXI
582@item device_add @var{config}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100583@findex device_add
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200584
585Add device.
586ETEXI
587
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300588 {
589 .name = "device_del",
590 .args_type = "id:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300591 .params = "device",
592 .help = "remove device",
Markus Armbruster17a38ea2010-03-22 11:38:14 +0100593 .user_print = monitor_user_noop,
594 .mhandler.cmd_new = do_device_del,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300595 },
596
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200597STEXI
598@item device_del @var{id}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100599@findex device_del
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200600
601Remove device @var{id}.
602ETEXI
603
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300604 {
605 .name = "cpu",
606 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300607 .params = "index",
608 .help = "set the default CPU",
Markus Armbruster81a1b452010-01-20 13:07:35 +0100609 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200610 .mhandler.cmd_new = do_cpu_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300611 },
Gerd Hoffmann3418bd22009-09-25 21:42:41 +0200612
Blue Swirl23130862009-06-06 08:22:04 +0000613STEXI
Markus Armbrusterc427ea92010-05-04 13:20:32 +0200614@item cpu @var{index}
615@findex cpu
Blue Swirl23130862009-06-06 08:22:04 +0000616Set the default CPU.
617ETEXI
618
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300619 {
620 .name = "mouse_move",
621 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300622 .params = "dx dy [dz]",
623 .help = "send mouse move events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300624 .mhandler.cmd = do_mouse_move,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300625 },
626
Blue Swirl23130862009-06-06 08:22:04 +0000627STEXI
628@item mouse_move @var{dx} @var{dy} [@var{dz}]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100629@findex mouse_move
Blue Swirl23130862009-06-06 08:22:04 +0000630Move the active mouse to the specified coordinates @var{dx} @var{dy}
631with optional scroll axis @var{dz}.
632ETEXI
633
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300634 {
635 .name = "mouse_button",
636 .args_type = "button_state:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300637 .params = "state",
638 .help = "change mouse button state (1=L, 2=M, 4=R)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300639 .mhandler.cmd = do_mouse_button,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300640 },
641
Blue Swirl23130862009-06-06 08:22:04 +0000642STEXI
643@item mouse_button @var{val}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100644@findex mouse_button
Blue Swirl23130862009-06-06 08:22:04 +0000645Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
646ETEXI
647
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300648 {
649 .name = "mouse_set",
650 .args_type = "index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300651 .params = "index",
652 .help = "set which mouse device receives events",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300653 .mhandler.cmd = do_mouse_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300654 },
655
Blue Swirl23130862009-06-06 08:22:04 +0000656STEXI
657@item mouse_set @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100658@findex mouse_set
Blue Swirl23130862009-06-06 08:22:04 +0000659Set which mouse device receives events at given @var{index}, index
660can be obtained with
661@example
662info mice
663@end example
664ETEXI
665
666#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300667 {
668 .name = "wavcapture",
669 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300670 .params = "path [frequency [bits [channels]]]",
671 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300672 .mhandler.cmd = do_wav_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300673 },
Blue Swirl23130862009-06-06 08:22:04 +0000674#endif
675STEXI
676@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100677@findex wavcapture
Blue Swirl23130862009-06-06 08:22:04 +0000678Capture audio into @var{filename}. Using sample rate @var{frequency}
679bits per sample @var{bits} and number of channels @var{channels}.
680
681Defaults:
682@itemize @minus
683@item Sample rate = 44100 Hz - CD quality
684@item Bits = 16
685@item Number of channels = 2 - Stereo
686@end itemize
687ETEXI
688
689#ifdef HAS_AUDIO
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300690 {
691 .name = "stopcapture",
692 .args_type = "n:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300693 .params = "capture index",
694 .help = "stop capture",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300695 .mhandler.cmd = do_stop_capture,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300696 },
Blue Swirl23130862009-06-06 08:22:04 +0000697#endif
698STEXI
699@item stopcapture @var{index}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100700@findex stopcapture
Blue Swirl23130862009-06-06 08:22:04 +0000701Stop capture with a given @var{index}, index can be obtained with
702@example
703info capture
704@end example
705ETEXI
706
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300707 {
708 .name = "memsave",
709 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300710 .params = "addr size file",
711 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
Luiz Capitulino57e09452009-10-16 12:23:43 -0300712 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200713 .mhandler.cmd_new = do_memory_save,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300714 },
715
Blue Swirl23130862009-06-06 08:22:04 +0000716STEXI
717@item memsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100718@findex memsave
Blue Swirl23130862009-06-06 08:22:04 +0000719save to disk virtual memory dump starting at @var{addr} of size @var{size}.
720ETEXI
721
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300722 {
723 .name = "pmemsave",
724 .args_type = "val:l,size:i,filename:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300725 .params = "addr size file",
726 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
Luiz Capitulino18f5a8b2009-10-16 12:23:44 -0300727 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200728 .mhandler.cmd_new = do_physical_memory_save,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300729 },
730
Blue Swirl23130862009-06-06 08:22:04 +0000731STEXI
732@item pmemsave @var{addr} @var{size} @var{file}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100733@findex pmemsave
Blue Swirl23130862009-06-06 08:22:04 +0000734save to disk physical memory dump starting at @var{addr} of size @var{size}.
735ETEXI
736
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300737 {
738 .name = "boot_set",
739 .args_type = "bootdevice:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300740 .params = "bootdevice",
741 .help = "define new values for the boot device list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300742 .mhandler.cmd = do_boot_set,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300743 },
744
Blue Swirl23130862009-06-06 08:22:04 +0000745STEXI
746@item boot_set @var{bootdevicelist}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100747@findex boot_set
Blue Swirl23130862009-06-06 08:22:04 +0000748
749Define new values for the boot device list. Those values will override
750the values specified on the command line through the @code{-boot} option.
751
752The values that can be specified here depend on the machine type, but are
753the same that can be specified in the @code{-boot} command line option.
754ETEXI
755
756#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300757 {
758 .name = "nmi",
759 .args_type = "cpu_index:i",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300760 .params = "cpu",
761 .help = "inject an NMI on the given CPU",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300762 .mhandler.cmd = do_inject_nmi,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300763 },
Blue Swirl23130862009-06-06 08:22:04 +0000764#endif
765STEXI
766@item nmi @var{cpu}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100767@findex nmi
Blue Swirl23130862009-06-06 08:22:04 +0000768Inject an NMI on the given CPU (x86 only).
769ETEXI
770
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300771 {
772 .name = "migrate",
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200773 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
774 .params = "[-d] [-b] [-i] uri",
775 .help = "migrate to URI (using -d to not wait for completion)"
776 "\n\t\t\t -b for migration without shared storage with"
777 " full copy of disk\n\t\t\t -i for migration without "
778 "shared storage with incremental copy of disk "
779 "(base image shared between src and destination)",
780 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200781 .mhandler.cmd_new = do_migrate,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300782 },
783
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200784
Blue Swirl23130862009-06-06 08:22:04 +0000785STEXI
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200786@item migrate [-d] [-b] [-i] @var{uri}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100787@findex migrate
Blue Swirl23130862009-06-06 08:22:04 +0000788Migrate to @var{uri} (using -d to not wait for completion).
lirans@il.ibm.comfbc3d962009-11-02 15:41:13 +0200789 -b for migration with full copy of disk
790 -i for migration with incremental copy of disk (base image is shared)
Blue Swirl23130862009-06-06 08:22:04 +0000791ETEXI
792
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300793 {
794 .name = "migrate_cancel",
795 .args_type = "",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300796 .params = "",
797 .help = "cancel the current VM migration",
Luiz Capitulino911d2962009-10-16 12:23:47 -0300798 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200799 .mhandler.cmd_new = do_migrate_cancel,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300800 },
801
Blue Swirl23130862009-06-06 08:22:04 +0000802STEXI
803@item migrate_cancel
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100804@findex migrate_cancel
Blue Swirl23130862009-06-06 08:22:04 +0000805Cancel the current VM migration.
806ETEXI
807
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300808 {
809 .name = "migrate_set_speed",
Markus Armbrusteree9545d2010-03-26 09:07:08 +0100810 .args_type = "value:f",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300811 .params = "value",
812 .help = "set maximum speed (in bytes) for migrations",
Markus Armbruster5fd90832010-01-25 14:23:05 +0100813 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200814 .mhandler.cmd_new = do_migrate_set_speed,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300815 },
816
Blue Swirl23130862009-06-06 08:22:04 +0000817STEXI
818@item migrate_set_speed @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100819@findex migrate_set_speed
Blue Swirl23130862009-06-06 08:22:04 +0000820Set maximum speed to @var{value} (in bytes) for migrations.
821ETEXI
822
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300823 {
824 .name = "migrate_set_downtime",
Markus Armbrusterb0fbf7d2010-01-25 14:23:07 +0100825 .args_type = "value:T",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300826 .params = "value",
827 .help = "set maximum tolerated downtime (in seconds) for migrations",
Markus Armbrusterc6027f52010-01-25 14:23:08 +0100828 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200829 .mhandler.cmd_new = do_migrate_set_downtime,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300830 },
Glauber Costa2ea42952009-05-28 15:22:58 -0400831
832STEXI
833@item migrate_set_downtime @var{second}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100834@findex migrate_set_downtime
Glauber Costa2ea42952009-05-28 15:22:58 -0400835Set maximum tolerated downtime (in seconds) for migration.
836ETEXI
837
Blue Swirl23130862009-06-06 08:22:04 +0000838#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300839 {
840 .name = "drive_add",
841 .args_type = "pci_addr:s,opts:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300842 .params = "[[<domain>:]<bus>:]<slot>\n"
843 "[file=file][,if=type][,bus=n]\n"
844 "[,unit=m][,media=d][index=i]\n"
845 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
846 "[snapshot=on|off][,cache=on|off]",
847 .help = "add drive to PCI storage controller",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300848 .mhandler.cmd = drive_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300849 },
Blue Swirl23130862009-06-06 08:22:04 +0000850#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300851
Blue Swirl23130862009-06-06 08:22:04 +0000852STEXI
853@item drive_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100854@findex drive_add
Blue Swirl23130862009-06-06 08:22:04 +0000855Add drive to PCI storage controller.
856ETEXI
857
858#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300859 {
860 .name = "pci_add",
861 .args_type = "pci_addr:s,type:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300862 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
863 .help = "hot-add PCI device",
Luiz Capitulino7a344f72009-12-10 17:16:09 -0200864 .user_print = pci_device_hot_add_print,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200865 .mhandler.cmd_new = pci_device_hot_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300866 },
Blue Swirl23130862009-06-06 08:22:04 +0000867#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300868
Blue Swirl23130862009-06-06 08:22:04 +0000869STEXI
870@item pci_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100871@findex pci_add
Blue Swirl23130862009-06-06 08:22:04 +0000872Hot-add PCI device.
873ETEXI
874
875#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300876 {
877 .name = "pci_del",
878 .args_type = "pci_addr:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300879 .params = "[[<domain>:]<bus>:]<slot>",
880 .help = "hot remove PCI device",
Luiz Capitulino6848d822009-10-16 12:23:48 -0300881 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -0200882 .mhandler.cmd_new = do_pci_device_hot_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300883 },
Blue Swirl23130862009-06-06 08:22:04 +0000884#endif
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300885
Blue Swirl23130862009-06-06 08:22:04 +0000886STEXI
887@item pci_del
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100888@findex pci_del
Blue Swirl23130862009-06-06 08:22:04 +0000889Hot remove PCI device.
890ETEXI
891
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300892 {
893 .name = "host_net_add",
894 .args_type = "device:s,opts:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300895 .params = "tap|user|socket|vde|dump [options]",
896 .help = "add host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300897 .mhandler.cmd = net_host_device_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300898 },
899
Blue Swirl23130862009-06-06 08:22:04 +0000900STEXI
901@item host_net_add
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100902@findex host_net_add
Blue Swirl23130862009-06-06 08:22:04 +0000903Add host VLAN client.
904ETEXI
905
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300906 {
907 .name = "host_net_remove",
908 .args_type = "vlan_id:i,device:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300909 .params = "vlan_id name",
910 .help = "remove host VLAN client",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300911 .mhandler.cmd = net_host_device_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300912 },
913
Blue Swirl23130862009-06-06 08:22:04 +0000914STEXI
915@item host_net_remove
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100916@findex host_net_remove
Blue Swirl23130862009-06-06 08:22:04 +0000917Remove host VLAN client.
918ETEXI
919
Markus Armbrusterae82d322010-03-25 17:22:40 +0100920 {
921 .name = "netdev_add",
922 .args_type = "netdev:O",
923 .params = "[user|tap|socket],id=str[,prop=value][,...]",
924 .help = "add host network device",
925 .user_print = monitor_user_noop,
926 .mhandler.cmd_new = do_netdev_add,
927 },
928
929STEXI
930@item netdev_add
931@findex netdev_add
932Add host network device.
933ETEXI
934
935 {
936 .name = "netdev_del",
937 .args_type = "id:s",
938 .params = "id",
939 .help = "remove host network device",
940 .user_print = monitor_user_noop,
941 .mhandler.cmd_new = do_netdev_del,
942 },
943
944STEXI
945@item netdev_del
946@findex netdev_del
947Remove host network device.
948ETEXI
949
Blue Swirl23130862009-06-06 08:22:04 +0000950#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300951 {
952 .name = "hostfwd_add",
953 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300954 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
955 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300956 .mhandler.cmd = net_slirp_hostfwd_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300957 },
Markus Armbruster21413d62010-05-04 13:20:30 +0200958#endif
959STEXI
960@item hostfwd_add
961@findex hostfwd_add
962Redirect TCP or UDP connections from host to guest (requires -net user).
963ETEXI
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300964
Markus Armbruster21413d62010-05-04 13:20:30 +0200965#ifdef CONFIG_SLIRP
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300966 {
967 .name = "hostfwd_remove",
968 .args_type = "arg1:s,arg2:s?,arg3:s?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300969 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
970 .help = "remove host-to-guest TCP or UDP redirection",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -0300971 .mhandler.cmd = net_slirp_hostfwd_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300972 },
973
Blue Swirl23130862009-06-06 08:22:04 +0000974#endif
975STEXI
Markus Armbruster21413d62010-05-04 13:20:30 +0200976@item hostfwd_remove
977@findex hostfwd_remove
978Remove host-to-guest TCP or UDP redirection.
Blue Swirl23130862009-06-06 08:22:04 +0000979ETEXI
980
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300981 {
982 .name = "balloon",
Luiz Capitulino3b0bd6e2009-12-18 13:25:05 -0200983 .args_type = "value:M",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300984 .params = "target",
985 .help = "request VM to change it's memory allocation (in MB)",
Luiz Capitulino83fb1de2009-10-07 13:42:01 -0300986 .user_print = monitor_user_noop,
Adam Litke625a5be2010-01-26 14:17:35 -0600987 .mhandler.cmd_async = do_balloon,
988 .async = 1,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300989 },
990
Blue Swirl23130862009-06-06 08:22:04 +0000991STEXI
992@item balloon @var{value}
Stefan Weil70fcbbe2010-02-05 23:52:04 +0100993@findex balloon
Blue Swirl23130862009-06-06 08:22:04 +0000994Request VM to change its memory allocation to @var{value} (in MB).
995ETEXI
996
Luiz Capitulinod7f9b682009-10-07 13:41:50 -0300997 {
998 .name = "set_link",
Markus Armbrusterc9b26a42010-03-26 09:07:10 +0100999 .args_type = "name:s,up:b",
1000 .params = "name on|off",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001001 .help = "change the link status of a network adapter",
Markus Armbruster5369e3c2010-03-26 09:07:11 +01001002 .user_print = monitor_user_noop,
1003 .mhandler.cmd_new = do_set_link,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001004 },
1005
Blue Swirl23130862009-06-06 08:22:04 +00001006STEXI
Markus Armbrusterc9b26a42010-03-26 09:07:10 +01001007@item set_link @var{name} [on|off]
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001008@findex set_link
Markus Armbrusterc9b26a42010-03-26 09:07:10 +01001009Switch link @var{name} on (i.e. up) or off (i.e. down).
Blue Swirl23130862009-06-06 08:22:04 +00001010ETEXI
1011
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001012 {
1013 .name = "watchdog_action",
1014 .args_type = "action:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001015 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1016 .help = "change watchdog action",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001017 .mhandler.cmd = do_watchdog_action,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001018 },
1019
Blue Swirl23130862009-06-06 08:22:04 +00001020STEXI
1021@item watchdog_action
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001022@findex watchdog_action
Blue Swirl23130862009-06-06 08:22:04 +00001023Change watchdog action.
1024ETEXI
1025
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001026 {
1027 .name = "acl_show",
1028 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001029 .params = "aclname",
1030 .help = "list rules in the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001031 .mhandler.cmd = do_acl_show,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001032 },
1033
Blue Swirl23130862009-06-06 08:22:04 +00001034STEXI
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001035@item acl_show @var{aclname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001036@findex acl_show
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001037List all the matching rules in the access control list, and the default
1038policy. There are currently two named access control lists,
1039@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1040certificate distinguished name, and SASL username respectively.
1041ETEXI
Blue Swirl23130862009-06-06 08:22:04 +00001042
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001043 {
1044 .name = "acl_policy",
1045 .args_type = "aclname:s,policy:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001046 .params = "aclname allow|deny",
1047 .help = "set default access control list policy",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001048 .mhandler.cmd = do_acl_policy,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001049 },
1050
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001051STEXI
Jan Kiszkacbbfacc2009-07-03 08:46:05 +02001052@item acl_policy @var{aclname} @code{allow|deny}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001053@findex acl_policy
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001054Set the default access control list policy, used in the event that
Blue Swirl23130862009-06-06 08:22:04 +00001055none of the explicit rules match. The default policy at startup is
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001056always @code{deny}.
1057ETEXI
1058
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001059 {
1060 .name = "acl_add",
1061 .args_type = "aclname:s,match:s,policy:s,index:i?",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001062 .params = "aclname match allow|deny [index]",
1063 .help = "add a match rule to the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001064 .mhandler.cmd = do_acl_add,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001065 },
1066
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001067STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001068@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1069@findex acl_add
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001070Add a match rule to the access control list, allowing or denying access.
1071The match will normally be an exact username or x509 distinguished name,
1072but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1073allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
Blue Swirl23130862009-06-06 08:22:04 +00001074normally be appended to the end of the ACL, but can be inserted
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001075earlier in the list if the optional @var{index} parameter is supplied.
1076ETEXI
1077
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001078 {
1079 .name = "acl_remove",
1080 .args_type = "aclname:s,match:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001081 .params = "aclname match",
1082 .help = "remove a match rule from the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001083 .mhandler.cmd = do_acl_remove,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001084 },
1085
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001086STEXI
1087@item acl_remove @var{aclname} @var{match}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001088@findex acl_remove
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001089Remove the specified match rule from the access control list.
1090ETEXI
1091
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001092 {
1093 .name = "acl_reset",
1094 .args_type = "aclname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001095 .params = "aclname",
1096 .help = "reset the access control list",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001097 .mhandler.cmd = do_acl_reset,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001098 },
1099
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001100STEXI
Markus Armbruster0e4aec92010-05-04 13:20:31 +02001101@item acl_reset @var{aclname}
1102@findex acl_reset
Jan Kiszka15dfcd42009-06-25 08:22:08 +02001103Remove all matches from the access control list, and set the default
Blue Swirl23130862009-06-06 08:22:04 +00001104policy back to @code{deny}.
Blue Swirl23130862009-06-06 08:22:04 +00001105ETEXI
1106
Huang Ying79c4f6b2009-06-23 10:05:14 +08001107#if defined(TARGET_I386)
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001108
1109 {
1110 .name = "mce",
1111 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001112 .params = "cpu bank status mcgstatus addr misc",
1113 .help = "inject a MCE on the given CPU",
Luiz Capitulinoaf4ce882009-10-07 13:41:52 -03001114 .mhandler.cmd = do_inject_mce,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001115 },
1116
Huang Ying79c4f6b2009-06-23 10:05:14 +08001117#endif
1118STEXI
1119@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001120@findex mce (x86)
Huang Ying79c4f6b2009-06-23 10:05:14 +08001121Inject an MCE on the given CPU (x86 only).
1122ETEXI
1123
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001124 {
1125 .name = "getfd",
1126 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001127 .params = "getfd name",
1128 .help = "receive a file descriptor via SCM rights and assign it a name",
Luiz Capitulinof0d60002009-10-16 12:23:50 -03001129 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001130 .mhandler.cmd_new = do_getfd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001131 },
1132
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001133STEXI
1134@item getfd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001135@findex getfd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001136If a file descriptor is passed alongside this command using the SCM_RIGHTS
1137mechanism on unix sockets, it is stored using the name @var{fdname} for
1138later use by other monitor commands.
1139ETEXI
1140
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001141 {
1142 .name = "closefd",
1143 .args_type = "fdname:s",
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001144 .params = "closefd name",
1145 .help = "close a file descriptor previously passed via SCM rights",
Luiz Capitulino18f3a512009-10-16 12:23:51 -03001146 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001147 .mhandler.cmd_new = do_closefd,
Luiz Capitulinod7f9b682009-10-07 13:41:50 -03001148 },
1149
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001150STEXI
1151@item closefd @var{fdname}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001152@findex closefd
Mark McLoughlinf07918f2009-07-22 09:11:40 +01001153Close the file descriptor previously assigned to @var{fdname} using the
1154@code{getfd} command. This is only needed if the file descriptor was never
1155used by another monitor command.
1156ETEXI
1157
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001158 {
1159 .name = "block_passwd",
1160 .args_type = "device:B,password:s",
1161 .params = "block_passwd device password",
1162 .help = "set the password of encrypted block devices",
1163 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001164 .mhandler.cmd_new = do_block_set_passwd,
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001165 },
1166
1167STEXI
1168@item block_passwd @var{device} @var{password}
Stefan Weil70fcbbe2010-02-05 23:52:04 +01001169@findex block_passwd
Luiz Capitulinoa3a55a22009-12-04 15:24:09 -02001170Set the encrypted device @var{device} password to @var{password}
1171ETEXI
1172
Luiz Capitulino4a7e1192010-02-04 18:10:05 -02001173 {
1174 .name = "qmp_capabilities",
1175 .args_type = "",
1176 .params = "",
1177 .help = "enable QMP capabilities",
1178 .user_print = monitor_user_noop,
Luiz Capitulino261394d2010-02-10 23:50:02 -02001179 .mhandler.cmd_new = do_qmp_capabilities,
Luiz Capitulino4a7e1192010-02-04 18:10:05 -02001180 },
1181
1182STEXI
1183@item qmp_capabilities
1184Enable the specified QMP capabilities
1185ETEXI
1186
Blue Swirl23130862009-06-06 08:22:04 +00001187STEXI
1188@end table
1189ETEXI