]> git.proxmox.com Git - mirror_qemu.git/blame_incremental - hmp-commands.hx
qapi: Convert cont
[mirror_qemu.git] / hmp-commands.hx
... / ...
CommitLineData
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
12 {
13 .name = "help|?",
14 .args_type = "name:s?",
15 .params = "[cmd]",
16 .help = "show the help",
17 .mhandler.cmd = do_help_cmd,
18 },
19
20STEXI
21@item help or ? [@var{cmd}]
22@findex help
23Show the help for all commands or just for command @var{cmd}.
24ETEXI
25
26 {
27 .name = "commit",
28 .args_type = "device:B",
29 .params = "device|all",
30 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
31 .mhandler.cmd = do_commit,
32 },
33
34STEXI
35@item commit
36@findex commit
37Commit changes to the disk images (if -snapshot is used) or backing files.
38ETEXI
39
40 {
41 .name = "q|quit",
42 .args_type = "",
43 .params = "",
44 .help = "quit the emulator",
45 .user_print = monitor_user_noop,
46 .mhandler.cmd = hmp_quit,
47 },
48
49STEXI
50@item q or quit
51@findex quit
52Quit the emulator.
53ETEXI
54
55 {
56 .name = "block_resize",
57 .args_type = "device:B,size:o",
58 .params = "device size",
59 .help = "resize a block image",
60 .user_print = monitor_user_noop,
61 .mhandler.cmd_new = do_block_resize,
62 },
63
64STEXI
65@item block_resize
66@findex block_resize
67Resize a block image while a guest is running. Usually requires guest
68action to see the updated size. Resize to a lower size is supported,
69but should be used with extreme caution. Note that this command only
70resizes image files, it can not resize block devices like LVM volumes.
71ETEXI
72
73
74 {
75 .name = "eject",
76 .args_type = "force:-f,device:B",
77 .params = "[-f] device",
78 .help = "eject a removable medium (use -f to force it)",
79 .user_print = monitor_user_noop,
80 .mhandler.cmd_new = do_eject,
81 },
82
83STEXI
84@item eject [-f] @var{device}
85@findex eject
86Eject a removable medium (use -f to force it).
87ETEXI
88
89 {
90 .name = "drive_del",
91 .args_type = "id:s",
92 .params = "device",
93 .help = "remove host block device",
94 .user_print = monitor_user_noop,
95 .mhandler.cmd_new = do_drive_del,
96 },
97
98STEXI
99@item drive_del @var{device}
100@findex drive_del
101Remove host block device. The result is that guest generated IO is no longer
102submitted against the host device underlying the disk. Once a drive has
103been deleted, the QEMU Block layer returns -EIO which results in IO
104errors in the guest for applications that are reading/writing to the device.
105ETEXI
106
107 {
108 .name = "change",
109 .args_type = "device:B,target:F,arg:s?",
110 .params = "device filename [format]",
111 .help = "change a removable medium, optional format",
112 .user_print = monitor_user_noop,
113 .mhandler.cmd_new = do_change,
114 },
115
116STEXI
117@item change @var{device} @var{setting}
118@findex change
119
120Change the configuration of a device.
121
122@table @option
123@item change @var{diskdevice} @var{filename} [@var{format}]
124Change the medium for a removable disk device to point to @var{filename}. eg
125
126@example
127(qemu) change ide1-cd0 /path/to/some.iso
128@end example
129
130@var{format} is optional.
131
132@item change vnc @var{display},@var{options}
133Change the configuration of the VNC server. The valid syntax for @var{display}
134and @var{options} are described at @ref{sec_invocation}. eg
135
136@example
137(qemu) change vnc localhost:1
138@end example
139
140@item change vnc password [@var{password}]
141
142Change the password associated with the VNC server. If the new password is not
143supplied, the monitor will prompt for it to be entered. VNC passwords are only
144significant up to 8 letters. eg
145
146@example
147(qemu) change vnc password
148Password: ********
149@end example
150
151@end table
152ETEXI
153
154 {
155 .name = "screendump",
156 .args_type = "filename:F",
157 .params = "filename",
158 .help = "save screen into PPM image 'filename'",
159 .user_print = monitor_user_noop,
160 .mhandler.cmd_new = do_screen_dump,
161 },
162
163STEXI
164@item screendump @var{filename}
165@findex screendump
166Save screen into PPM image @var{filename}.
167ETEXI
168
169 {
170 .name = "logfile",
171 .args_type = "filename:F",
172 .params = "filename",
173 .help = "output logs to 'filename'",
174 .mhandler.cmd = do_logfile,
175 },
176
177STEXI
178@item logfile @var{filename}
179@findex logfile
180Output logs to @var{filename}.
181ETEXI
182
183 {
184 .name = "trace-event",
185 .args_type = "name:s,option:b",
186 .params = "name on|off",
187 .help = "changes status of a specific trace event",
188 .mhandler.cmd = do_trace_event_set_state,
189 },
190
191STEXI
192@item trace-event
193@findex trace-event
194changes status of a trace event
195ETEXI
196
197#if defined(CONFIG_TRACE_SIMPLE)
198 {
199 .name = "trace-file",
200 .args_type = "op:s?,arg:F?",
201 .params = "on|off|flush|set [arg]",
202 .help = "open, close, or flush trace file, or set a new file name",
203 .mhandler.cmd = do_trace_file,
204 },
205
206STEXI
207@item trace-file on|off|flush
208@findex trace-file
209Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
210ETEXI
211#endif
212
213 {
214 .name = "log",
215 .args_type = "items:s",
216 .params = "item1[,...]",
217 .help = "activate logging of the specified items to '/tmp/qemu.log'",
218 .mhandler.cmd = do_log,
219 },
220
221STEXI
222@item log @var{item1}[,...]
223@findex log
224Activate logging of the specified items to @file{/tmp/qemu.log}.
225ETEXI
226
227 {
228 .name = "savevm",
229 .args_type = "name:s?",
230 .params = "[tag|id]",
231 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
232 .mhandler.cmd = do_savevm,
233 },
234
235STEXI
236@item savevm [@var{tag}|@var{id}]
237@findex savevm
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
244 {
245 .name = "loadvm",
246 .args_type = "name:s",
247 .params = "tag|id",
248 .help = "restore a VM snapshot from its tag or id",
249 .mhandler.cmd = do_loadvm,
250 },
251
252STEXI
253@item loadvm @var{tag}|@var{id}
254@findex loadvm
255Set the whole virtual machine to the snapshot identified by the tag
256@var{tag} or the unique snapshot ID @var{id}.
257ETEXI
258
259 {
260 .name = "delvm",
261 .args_type = "name:s",
262 .params = "tag|id",
263 .help = "delete a VM snapshot from its tag or id",
264 .mhandler.cmd = do_delvm,
265 },
266
267STEXI
268@item delvm @var{tag}|@var{id}
269@findex delvm
270Delete the snapshot identified by @var{tag} or @var{id}.
271ETEXI
272
273 {
274 .name = "singlestep",
275 .args_type = "option:s?",
276 .params = "[on|off]",
277 .help = "run emulation in singlestep mode or switch to normal mode",
278 .mhandler.cmd = do_singlestep,
279 },
280
281STEXI
282@item singlestep [off]
283@findex singlestep
284Run the emulation in single step mode.
285If called with option off, the emulation returns to normal mode.
286ETEXI
287
288 {
289 .name = "stop",
290 .args_type = "",
291 .params = "",
292 .help = "stop emulation",
293 .mhandler.cmd = hmp_stop,
294 },
295
296STEXI
297@item stop
298@findex stop
299Stop emulation.
300ETEXI
301
302 {
303 .name = "c|cont",
304 .args_type = "",
305 .params = "",
306 .help = "resume emulation",
307 .mhandler.cmd = hmp_cont,
308 },
309
310STEXI
311@item c or cont
312@findex cont
313Resume emulation.
314ETEXI
315
316 {
317 .name = "gdbserver",
318 .args_type = "device:s?",
319 .params = "[device]",
320 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
321 .mhandler.cmd = do_gdbserver,
322 },
323
324STEXI
325@item gdbserver [@var{port}]
326@findex gdbserver
327Start gdbserver session (default @var{port}=1234)
328ETEXI
329
330 {
331 .name = "x",
332 .args_type = "fmt:/,addr:l",
333 .params = "/fmt addr",
334 .help = "virtual memory dump starting at 'addr'",
335 .mhandler.cmd = do_memory_dump,
336 },
337
338STEXI
339@item x/fmt @var{addr}
340@findex x
341Virtual memory dump starting at @var{addr}.
342ETEXI
343
344 {
345 .name = "xp",
346 .args_type = "fmt:/,addr:l",
347 .params = "/fmt addr",
348 .help = "physical memory dump starting at 'addr'",
349 .mhandler.cmd = do_physical_memory_dump,
350 },
351
352STEXI
353@item xp /@var{fmt} @var{addr}
354@findex xp
355Physical memory dump starting at @var{addr}.
356
357@var{fmt} is a format which tells the command how to format the
358data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
359
360@table @var
361@item count
362is the number of items to be dumped.
363
364@item format
365can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
366c (char) or i (asm instruction).
367
368@item size
369can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
370@code{h} or @code{w} can be specified with the @code{i} format to
371respectively select 16 or 32 bit code instruction size.
372
373@end table
374
375Examples:
376@itemize
377@item
378Dump 10 instructions at the current instruction pointer:
379@example
380(qemu) x/10i $eip
3810x90107063: ret
3820x90107064: sti
3830x90107065: lea 0x0(%esi,1),%esi
3840x90107069: lea 0x0(%edi,1),%edi
3850x90107070: ret
3860x90107071: jmp 0x90107080
3870x90107073: nop
3880x90107074: nop
3890x90107075: nop
3900x90107076: nop
391@end example
392
393@item
394Dump 80 16 bit values at the start of the video memory.
395@smallexample
396(qemu) xp/80hx 0xb8000
3970x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
3980x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
3990x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
4000x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
4010x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
4020x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
4030x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4040x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4050x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
4060x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
407@end smallexample
408@end itemize
409ETEXI
410
411 {
412 .name = "p|print",
413 .args_type = "fmt:/,val:l",
414 .params = "/fmt expr",
415 .help = "print expression value (use $reg for CPU register access)",
416 .mhandler.cmd = do_print,
417 },
418
419STEXI
420@item p or print/@var{fmt} @var{expr}
421@findex print
422
423Print expression value. Only the @var{format} part of @var{fmt} is
424used.
425ETEXI
426
427 {
428 .name = "i",
429 .args_type = "fmt:/,addr:i,index:i.",
430 .params = "/fmt addr",
431 .help = "I/O port read",
432 .mhandler.cmd = do_ioport_read,
433 },
434
435STEXI
436Read I/O port.
437ETEXI
438
439 {
440 .name = "o",
441 .args_type = "fmt:/,addr:i,val:i",
442 .params = "/fmt addr value",
443 .help = "I/O port write",
444 .mhandler.cmd = do_ioport_write,
445 },
446
447STEXI
448Write to I/O port.
449ETEXI
450
451 {
452 .name = "sendkey",
453 .args_type = "string:s,hold_time:i?",
454 .params = "keys [hold_ms]",
455 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
456 .mhandler.cmd = do_sendkey,
457 },
458
459STEXI
460@item sendkey @var{keys}
461@findex sendkey
462
463Send @var{keys} to the emulator. @var{keys} could be the name of the
464key or @code{#} followed by the raw value in either decimal or hexadecimal
465format. Use @code{-} to press several keys simultaneously. Example:
466@example
467sendkey ctrl-alt-f1
468@end example
469
470This command is useful to send keys that your graphical user interface
471intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
472ETEXI
473
474 {
475 .name = "system_reset",
476 .args_type = "",
477 .params = "",
478 .help = "reset the system",
479 .mhandler.cmd = hmp_system_reset,
480 },
481
482STEXI
483@item system_reset
484@findex system_reset
485
486Reset the system.
487ETEXI
488
489 {
490 .name = "system_powerdown",
491 .args_type = "",
492 .params = "",
493 .help = "send system power down event",
494 .mhandler.cmd = hmp_system_powerdown,
495 },
496
497STEXI
498@item system_powerdown
499@findex system_powerdown
500
501Power down the system (if supported).
502ETEXI
503
504 {
505 .name = "sum",
506 .args_type = "start:i,size:i",
507 .params = "addr size",
508 .help = "compute the checksum of a memory region",
509 .mhandler.cmd = do_sum,
510 },
511
512STEXI
513@item sum @var{addr} @var{size}
514@findex sum
515
516Compute the checksum of a memory region.
517ETEXI
518
519 {
520 .name = "usb_add",
521 .args_type = "devname:s",
522 .params = "device",
523 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
524 .mhandler.cmd = do_usb_add,
525 },
526
527STEXI
528@item usb_add @var{devname}
529@findex usb_add
530
531Add the USB device @var{devname}. For details of available devices see
532@ref{usb_devices}
533ETEXI
534
535 {
536 .name = "usb_del",
537 .args_type = "devname:s",
538 .params = "device",
539 .help = "remove USB device 'bus.addr'",
540 .mhandler.cmd = do_usb_del,
541 },
542
543STEXI
544@item usb_del @var{devname}
545@findex usb_del
546
547Remove the USB device @var{devname} from the QEMU virtual USB
548hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
549command @code{info usb} to see the devices you can remove.
550ETEXI
551
552 {
553 .name = "device_add",
554 .args_type = "device:O",
555 .params = "driver[,prop=value][,...]",
556 .help = "add device, like -device on the command line",
557 .user_print = monitor_user_noop,
558 .mhandler.cmd_new = do_device_add,
559 },
560
561STEXI
562@item device_add @var{config}
563@findex device_add
564
565Add device.
566ETEXI
567
568 {
569 .name = "device_del",
570 .args_type = "id:s",
571 .params = "device",
572 .help = "remove device",
573 .user_print = monitor_user_noop,
574 .mhandler.cmd_new = do_device_del,
575 },
576
577STEXI
578@item device_del @var{id}
579@findex device_del
580
581Remove device @var{id}.
582ETEXI
583
584 {
585 .name = "cpu",
586 .args_type = "index:i",
587 .params = "index",
588 .help = "set the default CPU",
589 .mhandler.cmd = hmp_cpu,
590 },
591
592STEXI
593@item cpu @var{index}
594@findex cpu
595Set the default CPU.
596ETEXI
597
598 {
599 .name = "mouse_move",
600 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
601 .params = "dx dy [dz]",
602 .help = "send mouse move events",
603 .mhandler.cmd = do_mouse_move,
604 },
605
606STEXI
607@item mouse_move @var{dx} @var{dy} [@var{dz}]
608@findex mouse_move
609Move the active mouse to the specified coordinates @var{dx} @var{dy}
610with optional scroll axis @var{dz}.
611ETEXI
612
613 {
614 .name = "mouse_button",
615 .args_type = "button_state:i",
616 .params = "state",
617 .help = "change mouse button state (1=L, 2=M, 4=R)",
618 .mhandler.cmd = do_mouse_button,
619 },
620
621STEXI
622@item mouse_button @var{val}
623@findex mouse_button
624Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
625ETEXI
626
627 {
628 .name = "mouse_set",
629 .args_type = "index:i",
630 .params = "index",
631 .help = "set which mouse device receives events",
632 .mhandler.cmd = do_mouse_set,
633 },
634
635STEXI
636@item mouse_set @var{index}
637@findex mouse_set
638Set which mouse device receives events at given @var{index}, index
639can be obtained with
640@example
641info mice
642@end example
643ETEXI
644
645#ifdef HAS_AUDIO
646 {
647 .name = "wavcapture",
648 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
649 .params = "path [frequency [bits [channels]]]",
650 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
651 .mhandler.cmd = do_wav_capture,
652 },
653#endif
654STEXI
655@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
656@findex wavcapture
657Capture audio into @var{filename}. Using sample rate @var{frequency}
658bits per sample @var{bits} and number of channels @var{channels}.
659
660Defaults:
661@itemize @minus
662@item Sample rate = 44100 Hz - CD quality
663@item Bits = 16
664@item Number of channels = 2 - Stereo
665@end itemize
666ETEXI
667
668#ifdef HAS_AUDIO
669 {
670 .name = "stopcapture",
671 .args_type = "n:i",
672 .params = "capture index",
673 .help = "stop capture",
674 .mhandler.cmd = do_stop_capture,
675 },
676#endif
677STEXI
678@item stopcapture @var{index}
679@findex stopcapture
680Stop capture with a given @var{index}, index can be obtained with
681@example
682info capture
683@end example
684ETEXI
685
686 {
687 .name = "memsave",
688 .args_type = "val:l,size:i,filename:s",
689 .params = "addr size file",
690 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
691 .mhandler.cmd = hmp_memsave,
692 },
693
694STEXI
695@item memsave @var{addr} @var{size} @var{file}
696@findex memsave
697save to disk virtual memory dump starting at @var{addr} of size @var{size}.
698ETEXI
699
700 {
701 .name = "pmemsave",
702 .args_type = "val:l,size:i,filename:s",
703 .params = "addr size file",
704 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
705 .mhandler.cmd = hmp_pmemsave,
706 },
707
708STEXI
709@item pmemsave @var{addr} @var{size} @var{file}
710@findex pmemsave
711save to disk physical memory dump starting at @var{addr} of size @var{size}.
712ETEXI
713
714 {
715 .name = "boot_set",
716 .args_type = "bootdevice:s",
717 .params = "bootdevice",
718 .help = "define new values for the boot device list",
719 .mhandler.cmd = do_boot_set,
720 },
721
722STEXI
723@item boot_set @var{bootdevicelist}
724@findex boot_set
725
726Define new values for the boot device list. Those values will override
727the values specified on the command line through the @code{-boot} option.
728
729The values that can be specified here depend on the machine type, but are
730the same that can be specified in the @code{-boot} command line option.
731ETEXI
732
733#if defined(TARGET_I386)
734 {
735 .name = "nmi",
736 .args_type = "",
737 .params = "",
738 .help = "inject an NMI on all guest's CPUs",
739 .user_print = monitor_user_noop,
740 .mhandler.cmd_new = do_inject_nmi,
741 },
742#endif
743STEXI
744@item nmi @var{cpu}
745@findex nmi
746Inject an NMI on the given CPU (x86 only).
747ETEXI
748
749 {
750 .name = "migrate",
751 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
752 .params = "[-d] [-b] [-i] uri",
753 .help = "migrate to URI (using -d to not wait for completion)"
754 "\n\t\t\t -b for migration without shared storage with"
755 " full copy of disk\n\t\t\t -i for migration without "
756 "shared storage with incremental copy of disk "
757 "(base image shared between src and destination)",
758 .user_print = monitor_user_noop,
759 .mhandler.cmd_new = do_migrate,
760 },
761
762
763STEXI
764@item migrate [-d] [-b] [-i] @var{uri}
765@findex migrate
766Migrate to @var{uri} (using -d to not wait for completion).
767 -b for migration with full copy of disk
768 -i for migration with incremental copy of disk (base image is shared)
769ETEXI
770
771 {
772 .name = "migrate_cancel",
773 .args_type = "",
774 .params = "",
775 .help = "cancel the current VM migration",
776 .user_print = monitor_user_noop,
777 .mhandler.cmd_new = do_migrate_cancel,
778 },
779
780STEXI
781@item migrate_cancel
782@findex migrate_cancel
783Cancel the current VM migration.
784ETEXI
785
786 {
787 .name = "migrate_set_speed",
788 .args_type = "value:o",
789 .params = "value",
790 .help = "set maximum speed (in bytes) for migrations. "
791 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
792 .user_print = monitor_user_noop,
793 .mhandler.cmd_new = do_migrate_set_speed,
794 },
795
796STEXI
797@item migrate_set_speed @var{value}
798@findex migrate_set_speed
799Set maximum speed to @var{value} (in bytes) for migrations.
800ETEXI
801
802 {
803 .name = "migrate_set_downtime",
804 .args_type = "value:T",
805 .params = "value",
806 .help = "set maximum tolerated downtime (in seconds) for migrations",
807 .user_print = monitor_user_noop,
808 .mhandler.cmd_new = do_migrate_set_downtime,
809 },
810
811STEXI
812@item migrate_set_downtime @var{second}
813@findex migrate_set_downtime
814Set maximum tolerated downtime (in seconds) for migration.
815ETEXI
816
817 {
818 .name = "client_migrate_info",
819 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
820 .params = "protocol hostname port tls-port cert-subject",
821 .help = "send migration info to spice/vnc client",
822 .user_print = monitor_user_noop,
823 .mhandler.cmd_async = client_migrate_info,
824 .flags = MONITOR_CMD_ASYNC,
825 },
826
827STEXI
828@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
829@findex client_migrate_info
830Set the spice/vnc connection info for the migration target. The spice/vnc
831server will ask the spice/vnc client to automatically reconnect using the
832new parameters (if specified) once the vm migration finished successfully.
833ETEXI
834
835 {
836 .name = "snapshot_blkdev",
837 .args_type = "device:B,snapshot-file:s?,format:s?",
838 .params = "device [new-image-file] [format]",
839 .help = "initiates a live snapshot\n\t\t\t"
840 "of device. If a new image file is specified, the\n\t\t\t"
841 "new image file will become the new root image.\n\t\t\t"
842 "If format is specified, the snapshot file will\n\t\t\t"
843 "be created in that format. Otherwise the\n\t\t\t"
844 "snapshot will be internal! (currently unsupported)",
845 .mhandler.cmd_new = do_snapshot_blkdev,
846 },
847
848STEXI
849@item snapshot_blkdev
850@findex snapshot_blkdev
851Snapshot device, using snapshot file as target if provided
852ETEXI
853
854#if defined(TARGET_I386)
855 {
856 .name = "drive_add",
857 .args_type = "pci_addr:s,opts:s",
858 .params = "[[<domain>:]<bus>:]<slot>\n"
859 "[file=file][,if=type][,bus=n]\n"
860 "[,unit=m][,media=d][,index=i]\n"
861 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
862 "[,snapshot=on|off][,cache=on|off]\n"
863 "[,readonly=on|off][,copy-on-read=on|off]",
864 .help = "add drive to PCI storage controller",
865 .mhandler.cmd = drive_hot_add,
866 },
867#endif
868
869STEXI
870@item drive_add
871@findex drive_add
872Add drive to PCI storage controller.
873ETEXI
874
875#if defined(TARGET_I386)
876 {
877 .name = "pci_add",
878 .args_type = "pci_addr:s,type:s,opts:s?",
879 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
880 .help = "hot-add PCI device",
881 .mhandler.cmd = pci_device_hot_add,
882 },
883#endif
884
885STEXI
886@item pci_add
887@findex pci_add
888Hot-add PCI device.
889ETEXI
890
891#if defined(TARGET_I386)
892 {
893 .name = "pci_del",
894 .args_type = "pci_addr:s",
895 .params = "[[<domain>:]<bus>:]<slot>",
896 .help = "hot remove PCI device",
897 .mhandler.cmd = do_pci_device_hot_remove,
898 },
899#endif
900
901STEXI
902@item pci_del
903@findex pci_del
904Hot remove PCI device.
905ETEXI
906
907 {
908 .name = "pcie_aer_inject_error",
909 .args_type = "advisory_non_fatal:-a,correctable:-c,"
910 "id:s,error_status:s,"
911 "header0:i?,header1:i?,header2:i?,header3:i?,"
912 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
913 .params = "[-a] [-c] id "
914 "<error_status> [<tlp header> [<tlp header prefix>]]",
915 .help = "inject pcie aer error\n\t\t\t"
916 " -a for advisory non fatal error\n\t\t\t"
917 " -c for correctable error\n\t\t\t"
918 "<id> = qdev device id\n\t\t\t"
919 "<error_status> = error string or 32bit\n\t\t\t"
920 "<tlb header> = 32bit x 4\n\t\t\t"
921 "<tlb header prefix> = 32bit x 4",
922 .user_print = pcie_aer_inject_error_print,
923 .mhandler.cmd_new = do_pcie_aer_inejct_error,
924 },
925
926STEXI
927@item pcie_aer_inject_error
928@findex pcie_aer_inject_error
929Inject PCIe AER error
930ETEXI
931
932 {
933 .name = "host_net_add",
934 .args_type = "device:s,opts:s?",
935 .params = "tap|user|socket|vde|dump [options]",
936 .help = "add host VLAN client",
937 .mhandler.cmd = net_host_device_add,
938 },
939
940STEXI
941@item host_net_add
942@findex host_net_add
943Add host VLAN client.
944ETEXI
945
946 {
947 .name = "host_net_remove",
948 .args_type = "vlan_id:i,device:s",
949 .params = "vlan_id name",
950 .help = "remove host VLAN client",
951 .mhandler.cmd = net_host_device_remove,
952 },
953
954STEXI
955@item host_net_remove
956@findex host_net_remove
957Remove host VLAN client.
958ETEXI
959
960 {
961 .name = "netdev_add",
962 .args_type = "netdev:O",
963 .params = "[user|tap|socket],id=str[,prop=value][,...]",
964 .help = "add host network device",
965 .user_print = monitor_user_noop,
966 .mhandler.cmd_new = do_netdev_add,
967 },
968
969STEXI
970@item netdev_add
971@findex netdev_add
972Add host network device.
973ETEXI
974
975 {
976 .name = "netdev_del",
977 .args_type = "id:s",
978 .params = "id",
979 .help = "remove host network device",
980 .user_print = monitor_user_noop,
981 .mhandler.cmd_new = do_netdev_del,
982 },
983
984STEXI
985@item netdev_del
986@findex netdev_del
987Remove host network device.
988ETEXI
989
990#ifdef CONFIG_SLIRP
991 {
992 .name = "hostfwd_add",
993 .args_type = "arg1:s,arg2:s?,arg3:s?",
994 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
995 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
996 .mhandler.cmd = net_slirp_hostfwd_add,
997 },
998#endif
999STEXI
1000@item hostfwd_add
1001@findex hostfwd_add
1002Redirect TCP or UDP connections from host to guest (requires -net user).
1003ETEXI
1004
1005#ifdef CONFIG_SLIRP
1006 {
1007 .name = "hostfwd_remove",
1008 .args_type = "arg1:s,arg2:s?,arg3:s?",
1009 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1010 .help = "remove host-to-guest TCP or UDP redirection",
1011 .mhandler.cmd = net_slirp_hostfwd_remove,
1012 },
1013
1014#endif
1015STEXI
1016@item hostfwd_remove
1017@findex hostfwd_remove
1018Remove host-to-guest TCP or UDP redirection.
1019ETEXI
1020
1021 {
1022 .name = "balloon",
1023 .args_type = "value:M",
1024 .params = "target",
1025 .help = "request VM to change its memory allocation (in MB)",
1026 .user_print = monitor_user_noop,
1027 .mhandler.cmd_async = do_balloon,
1028 .flags = MONITOR_CMD_ASYNC,
1029 },
1030
1031STEXI
1032@item balloon @var{value}
1033@findex balloon
1034Request VM to change its memory allocation to @var{value} (in MB).
1035ETEXI
1036
1037 {
1038 .name = "set_link",
1039 .args_type = "name:s,up:b",
1040 .params = "name on|off",
1041 .help = "change the link status of a network adapter",
1042 .user_print = monitor_user_noop,
1043 .mhandler.cmd_new = do_set_link,
1044 },
1045
1046STEXI
1047@item set_link @var{name} [on|off]
1048@findex set_link
1049Switch link @var{name} on (i.e. up) or off (i.e. down).
1050ETEXI
1051
1052 {
1053 .name = "watchdog_action",
1054 .args_type = "action:s",
1055 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1056 .help = "change watchdog action",
1057 .mhandler.cmd = do_watchdog_action,
1058 },
1059
1060STEXI
1061@item watchdog_action
1062@findex watchdog_action
1063Change watchdog action.
1064ETEXI
1065
1066 {
1067 .name = "acl_show",
1068 .args_type = "aclname:s",
1069 .params = "aclname",
1070 .help = "list rules in the access control list",
1071 .mhandler.cmd = do_acl_show,
1072 },
1073
1074STEXI
1075@item acl_show @var{aclname}
1076@findex acl_show
1077List all the matching rules in the access control list, and the default
1078policy. There are currently two named access control lists,
1079@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1080certificate distinguished name, and SASL username respectively.
1081ETEXI
1082
1083 {
1084 .name = "acl_policy",
1085 .args_type = "aclname:s,policy:s",
1086 .params = "aclname allow|deny",
1087 .help = "set default access control list policy",
1088 .mhandler.cmd = do_acl_policy,
1089 },
1090
1091STEXI
1092@item acl_policy @var{aclname} @code{allow|deny}
1093@findex acl_policy
1094Set the default access control list policy, used in the event that
1095none of the explicit rules match. The default policy at startup is
1096always @code{deny}.
1097ETEXI
1098
1099 {
1100 .name = "acl_add",
1101 .args_type = "aclname:s,match:s,policy:s,index:i?",
1102 .params = "aclname match allow|deny [index]",
1103 .help = "add a match rule to the access control list",
1104 .mhandler.cmd = do_acl_add,
1105 },
1106
1107STEXI
1108@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1109@findex acl_add
1110Add a match rule to the access control list, allowing or denying access.
1111The match will normally be an exact username or x509 distinguished name,
1112but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1113allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1114normally be appended to the end of the ACL, but can be inserted
1115earlier in the list if the optional @var{index} parameter is supplied.
1116ETEXI
1117
1118 {
1119 .name = "acl_remove",
1120 .args_type = "aclname:s,match:s",
1121 .params = "aclname match",
1122 .help = "remove a match rule from the access control list",
1123 .mhandler.cmd = do_acl_remove,
1124 },
1125
1126STEXI
1127@item acl_remove @var{aclname} @var{match}
1128@findex acl_remove
1129Remove the specified match rule from the access control list.
1130ETEXI
1131
1132 {
1133 .name = "acl_reset",
1134 .args_type = "aclname:s",
1135 .params = "aclname",
1136 .help = "reset the access control list",
1137 .mhandler.cmd = do_acl_reset,
1138 },
1139
1140STEXI
1141@item acl_reset @var{aclname}
1142@findex acl_reset
1143Remove all matches from the access control list, and set the default
1144policy back to @code{deny}.
1145ETEXI
1146
1147#if defined(TARGET_I386)
1148
1149 {
1150 .name = "mce",
1151 .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1152 .params = "[-b] cpu bank status mcgstatus addr misc",
1153 .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1154 .mhandler.cmd = do_inject_mce,
1155 },
1156
1157#endif
1158STEXI
1159@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1160@findex mce (x86)
1161Inject an MCE on the given CPU (x86 only).
1162ETEXI
1163
1164 {
1165 .name = "getfd",
1166 .args_type = "fdname:s",
1167 .params = "getfd name",
1168 .help = "receive a file descriptor via SCM rights and assign it a name",
1169 .user_print = monitor_user_noop,
1170 .mhandler.cmd_new = do_getfd,
1171 },
1172
1173STEXI
1174@item getfd @var{fdname}
1175@findex getfd
1176If a file descriptor is passed alongside this command using the SCM_RIGHTS
1177mechanism on unix sockets, it is stored using the name @var{fdname} for
1178later use by other monitor commands.
1179ETEXI
1180
1181 {
1182 .name = "closefd",
1183 .args_type = "fdname:s",
1184 .params = "closefd name",
1185 .help = "close a file descriptor previously passed via SCM rights",
1186 .user_print = monitor_user_noop,
1187 .mhandler.cmd_new = do_closefd,
1188 },
1189
1190STEXI
1191@item closefd @var{fdname}
1192@findex closefd
1193Close the file descriptor previously assigned to @var{fdname} using the
1194@code{getfd} command. This is only needed if the file descriptor was never
1195used by another monitor command.
1196ETEXI
1197
1198 {
1199 .name = "block_passwd",
1200 .args_type = "device:B,password:s",
1201 .params = "block_passwd device password",
1202 .help = "set the password of encrypted block devices",
1203 .user_print = monitor_user_noop,
1204 .mhandler.cmd_new = do_block_set_passwd,
1205 },
1206
1207STEXI
1208@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1209@findex block_set_io_throttle
1210Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1211ETEXI
1212
1213 {
1214 .name = "block_set_io_throttle",
1215 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1216 .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
1217 .help = "change I/O throttle limits for a block drive",
1218 .user_print = monitor_user_noop,
1219 .mhandler.cmd_new = do_block_set_io_throttle,
1220 },
1221
1222STEXI
1223@item block_passwd @var{device} @var{password}
1224@findex block_passwd
1225Set the encrypted device @var{device} password to @var{password}
1226ETEXI
1227
1228 {
1229 .name = "set_password",
1230 .args_type = "protocol:s,password:s,connected:s?",
1231 .params = "protocol password action-if-connected",
1232 .help = "set spice/vnc password",
1233 .user_print = monitor_user_noop,
1234 .mhandler.cmd_new = set_password,
1235 },
1236
1237STEXI
1238@item set_password [ vnc | spice ] password [ action-if-connected ]
1239@findex set_password
1240
1241Change spice/vnc password. Use zero to make the password stay valid
1242forever. @var{action-if-connected} specifies what should happen in
1243case a connection is established: @var{fail} makes the password change
1244fail. @var{disconnect} changes the password and disconnects the
1245client. @var{keep} changes the password and keeps the connection up.
1246@var{keep} is the default.
1247ETEXI
1248
1249 {
1250 .name = "expire_password",
1251 .args_type = "protocol:s,time:s",
1252 .params = "protocol time",
1253 .help = "set spice/vnc password expire-time",
1254 .user_print = monitor_user_noop,
1255 .mhandler.cmd_new = expire_password,
1256 },
1257
1258STEXI
1259@item expire_password [ vnc | spice ] expire-time
1260@findex expire_password
1261
1262Specify when a password for spice/vnc becomes
1263invalid. @var{expire-time} accepts:
1264
1265@table @var
1266@item now
1267Invalidate password instantly.
1268
1269@item never
1270Password stays valid forever.
1271
1272@item +nsec
1273Password stays valid for @var{nsec} seconds starting now.
1274
1275@item nsec
1276Password is invalidated at the given time. @var{nsec} are the seconds
1277passed since 1970, i.e. unix epoch.
1278
1279@end table
1280ETEXI
1281
1282 {
1283 .name = "info",
1284 .args_type = "item:s?",
1285 .params = "[subcommand]",
1286 .help = "show various information about the system state",
1287 .mhandler.cmd = do_info,
1288 },
1289
1290STEXI
1291@item info @var{subcommand}
1292@findex info
1293Show various information about the system state.
1294
1295@table @option
1296@item info version
1297show the version of QEMU
1298@item info network
1299show the various VLANs and the associated devices
1300@item info chardev
1301show the character devices
1302@item info block
1303show the block devices
1304@item info blockstats
1305show block device statistics
1306@item info registers
1307show the cpu registers
1308@item info cpus
1309show infos for each CPU
1310@item info history
1311show the command line history
1312@item info irq
1313show the interrupts statistics (if available)
1314@item info pic
1315show i8259 (PIC) state
1316@item info pci
1317show emulated PCI device info
1318@item info tlb
1319show virtual to physical memory mappings (i386, SH4, SPARC, and PPC only)
1320@item info mem
1321show the active virtual memory mappings (i386 only)
1322@item info jit
1323show dynamic compiler info
1324@item info numa
1325show NUMA information
1326@item info kvm
1327show KVM information
1328@item info usb
1329show USB devices plugged on the virtual USB hub
1330@item info usbhost
1331show all USB host devices
1332@item info profile
1333show profiling information
1334@item info capture
1335show information about active capturing
1336@item info snapshots
1337show list of VM snapshots
1338@item info status
1339show the current VM status (running|paused)
1340@item info pcmcia
1341show guest PCMCIA status
1342@item info mice
1343show which guest mouse is receiving events
1344@item info vnc
1345show the vnc server status
1346@item info name
1347show the current VM name
1348@item info uuid
1349show the current VM UUID
1350@item info cpustats
1351show CPU statistics
1352@item info usernet
1353show user network stack connection states
1354@item info migrate
1355show migration status
1356@item info balloon
1357show balloon information
1358@item info qtree
1359show device tree
1360@item info qdm
1361show qdev device model list
1362@item info roms
1363show roms
1364@end table
1365ETEXI
1366
1367#ifdef CONFIG_TRACE_SIMPLE
1368STEXI
1369@item info trace
1370show contents of trace buffer
1371ETEXI
1372#endif
1373
1374STEXI
1375@item info trace-events
1376show available trace events and their state
1377ETEXI
1378
1379STEXI
1380@end table
1381ETEXI