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