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