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