savevm: qemu_savevm_state(): Drop stop VM logic
[qemu/wangdongxu.git] / hmp-commands.hx
blobab08d583df1a5871e6129c2cd54f085915e34539
1 HXCOMM Use DEFHEADING() to define headings in both help text and texi
2 HXCOMM Text between STEXI and ETEXI are copied to texi version and
3 HXCOMM discarded from C version
4 HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5 HXCOMM monitor commands
6 HXCOMM HXCOMM can be used for comments, discarded from both texi and C
8 STEXI
9 @table @option
10 ETEXI
13 .name = "help|?",
14 .args_type = "name:s?",
15 .params = "[cmd]",
16 .help = "show the help",
17 .mhandler.cmd = do_help_cmd,
20 STEXI
21 @item help or ? [@var{cmd}]
22 @findex help
23 Show the help for all commands or just for command @var{cmd}.
24 ETEXI
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,
34 STEXI
35 @item commit
36 @findex commit
37 Commit changes to the disk images (if -snapshot is used) or backing files.
38 ETEXI
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,
49 STEXI
50 @item q or quit
51 @findex quit
52 Quit the emulator.
53 ETEXI
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,
64 STEXI
65 @item block_resize
66 @findex block_resize
67 Resize a block image while a guest is running. Usually requires guest
68 action to see the updated size. Resize to a lower size is supported,
69 but should be used with extreme caution. Note that this command only
70 resizes image files, it can not resize block devices like LVM volumes.
71 ETEXI
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,
83 STEXI
84 @item eject [-f] @var{device}
85 @findex eject
86 Eject a removable medium (use -f to force it).
87 ETEXI
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,
98 STEXI
99 @item drive_del @var{device}
100 @findex drive_del
101 Remove host block device. The result is that guest generated IO is no longer
102 submitted against the host device underlying the disk. Once a drive has
103 been deleted, the QEMU Block layer returns -EIO which results in IO
104 errors in the guest for applications that are reading/writing to the device.
105 ETEXI
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,
116 STEXI
117 @item change @var{device} @var{setting}
118 @findex change
120 Change the configuration of a device.
122 @table @option
123 @item change @var{diskdevice} @var{filename} [@var{format}]
124 Change the medium for a removable disk device to point to @var{filename}. eg
126 @example
127 (qemu) change ide1-cd0 /path/to/some.iso
128 @end example
130 @var{format} is optional.
132 @item change vnc @var{display},@var{options}
133 Change the configuration of the VNC server. The valid syntax for @var{display}
134 and @var{options} are described at @ref{sec_invocation}. eg
136 @example
137 (qemu) change vnc localhost:1
138 @end example
140 @item change vnc password [@var{password}]
142 Change the password associated with the VNC server. If the new password is not
143 supplied, the monitor will prompt for it to be entered. VNC passwords are only
144 significant up to 8 letters. eg
146 @example
147 (qemu) change vnc password
148 Password: ********
149 @end example
151 @end table
152 ETEXI
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,
163 STEXI
164 @item screendump @var{filename}
165 @findex screendump
166 Save screen into PPM image @var{filename}.
167 ETEXI
170 .name = "logfile",
171 .args_type = "filename:F",
172 .params = "filename",
173 .help = "output logs to 'filename'",
174 .mhandler.cmd = do_logfile,
177 STEXI
178 @item logfile @var{filename}
179 @findex logfile
180 Output logs to @var{filename}.
181 ETEXI
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,
191 STEXI
192 @item trace-event
193 @findex trace-event
194 changes status of a trace event
195 ETEXI
197 #if defined(CONFIG_TRACE_SIMPLE)
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,
206 STEXI
207 @item trace-file on|off|flush
208 @findex trace-file
209 Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
210 ETEXI
211 #endif
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,
221 STEXI
222 @item log @var{item1}[,...]
223 @findex log
224 Activate logging of the specified items to @file{/tmp/qemu.log}.
225 ETEXI
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,
235 STEXI
236 @item savevm [@var{tag}|@var{id}]
237 @findex savevm
238 Create a snapshot of the whole virtual machine. If @var{tag} is
239 provided, it is used as human readable identifier. If there is already
240 a snapshot with the same tag or ID, it is replaced. More info at
241 @ref{vm_snapshots}.
242 ETEXI
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,
252 STEXI
253 @item loadvm @var{tag}|@var{id}
254 @findex loadvm
255 Set the whole virtual machine to the snapshot identified by the tag
256 @var{tag} or the unique snapshot ID @var{id}.
257 ETEXI
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,
267 STEXI
268 @item delvm @var{tag}|@var{id}
269 @findex delvm
270 Delete the snapshot identified by @var{tag} or @var{id}.
271 ETEXI
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,
281 STEXI
282 @item singlestep [off]
283 @findex singlestep
284 Run the emulation in single step mode.
285 If called with option off, the emulation returns to normal mode.
286 ETEXI
289 .name = "stop",
290 .args_type = "",
291 .params = "",
292 .help = "stop emulation",
293 .mhandler.cmd = hmp_stop,
296 STEXI
297 @item stop
298 @findex stop
299 Stop emulation.
300 ETEXI
303 .name = "c|cont",
304 .args_type = "",
305 .params = "",
306 .help = "resume emulation",
307 .user_print = monitor_user_noop,
308 .mhandler.cmd_new = do_cont,
311 STEXI
312 @item c or cont
313 @findex cont
314 Resume emulation.
315 ETEXI
318 .name = "gdbserver",
319 .args_type = "device:s?",
320 .params = "[device]",
321 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
322 .mhandler.cmd = do_gdbserver,
325 STEXI
326 @item gdbserver [@var{port}]
327 @findex gdbserver
328 Start gdbserver session (default @var{port}=1234)
329 ETEXI
332 .name = "x",
333 .args_type = "fmt:/,addr:l",
334 .params = "/fmt addr",
335 .help = "virtual memory dump starting at 'addr'",
336 .mhandler.cmd = do_memory_dump,
339 STEXI
340 @item x/fmt @var{addr}
341 @findex x
342 Virtual memory dump starting at @var{addr}.
343 ETEXI
346 .name = "xp",
347 .args_type = "fmt:/,addr:l",
348 .params = "/fmt addr",
349 .help = "physical memory dump starting at 'addr'",
350 .mhandler.cmd = do_physical_memory_dump,
353 STEXI
354 @item xp /@var{fmt} @var{addr}
355 @findex xp
356 Physical memory dump starting at @var{addr}.
358 @var{fmt} is a format which tells the command how to format the
359 data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
361 @table @var
362 @item count
363 is the number of items to be dumped.
365 @item format
366 can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
367 c (char) or i (asm instruction).
369 @item size
370 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
371 @code{h} or @code{w} can be specified with the @code{i} format to
372 respectively select 16 or 32 bit code instruction size.
374 @end table
376 Examples:
377 @itemize
378 @item
379 Dump 10 instructions at the current instruction pointer:
380 @example
381 (qemu) x/10i $eip
382 0x90107063: ret
383 0x90107064: sti
384 0x90107065: lea 0x0(%esi,1),%esi
385 0x90107069: lea 0x0(%edi,1),%edi
386 0x90107070: ret
387 0x90107071: jmp 0x90107080
388 0x90107073: nop
389 0x90107074: nop
390 0x90107075: nop
391 0x90107076: nop
392 @end example
394 @item
395 Dump 80 16 bit values at the start of the video memory.
396 @smallexample
397 (qemu) xp/80hx 0xb8000
398 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
399 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
400 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
401 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
402 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
403 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
404 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
405 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
406 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
407 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
408 @end smallexample
409 @end itemize
410 ETEXI
413 .name = "p|print",
414 .args_type = "fmt:/,val:l",
415 .params = "/fmt expr",
416 .help = "print expression value (use $reg for CPU register access)",
417 .mhandler.cmd = do_print,
420 STEXI
421 @item p or print/@var{fmt} @var{expr}
422 @findex print
424 Print expression value. Only the @var{format} part of @var{fmt} is
425 used.
426 ETEXI
429 .name = "i",
430 .args_type = "fmt:/,addr:i,index:i.",
431 .params = "/fmt addr",
432 .help = "I/O port read",
433 .mhandler.cmd = do_ioport_read,
436 STEXI
437 Read I/O port.
438 ETEXI
441 .name = "o",
442 .args_type = "fmt:/,addr:i,val:i",
443 .params = "/fmt addr value",
444 .help = "I/O port write",
445 .mhandler.cmd = do_ioport_write,
448 STEXI
449 Write to I/O port.
450 ETEXI
453 .name = "sendkey",
454 .args_type = "string:s,hold_time:i?",
455 .params = "keys [hold_ms]",
456 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
457 .mhandler.cmd = do_sendkey,
460 STEXI
461 @item sendkey @var{keys}
462 @findex sendkey
464 Send @var{keys} to the emulator. @var{keys} could be the name of the
465 key or @code{#} followed by the raw value in either decimal or hexadecimal
466 format. Use @code{-} to press several keys simultaneously. Example:
467 @example
468 sendkey ctrl-alt-f1
469 @end example
471 This command is useful to send keys that your graphical user interface
472 intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
473 ETEXI
476 .name = "system_reset",
477 .args_type = "",
478 .params = "",
479 .help = "reset the system",
480 .mhandler.cmd = hmp_system_reset,
483 STEXI
484 @item system_reset
485 @findex system_reset
487 Reset the system.
488 ETEXI
491 .name = "system_powerdown",
492 .args_type = "",
493 .params = "",
494 .help = "send system power down event",
495 .mhandler.cmd = hmp_system_powerdown,
498 STEXI
499 @item system_powerdown
500 @findex system_powerdown
502 Power down the system (if supported).
503 ETEXI
506 .name = "sum",
507 .args_type = "start:i,size:i",
508 .params = "addr size",
509 .help = "compute the checksum of a memory region",
510 .mhandler.cmd = do_sum,
513 STEXI
514 @item sum @var{addr} @var{size}
515 @findex sum
517 Compute the checksum of a memory region.
518 ETEXI
521 .name = "usb_add",
522 .args_type = "devname:s",
523 .params = "device",
524 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
525 .mhandler.cmd = do_usb_add,
528 STEXI
529 @item usb_add @var{devname}
530 @findex usb_add
532 Add the USB device @var{devname}. For details of available devices see
533 @ref{usb_devices}
534 ETEXI
537 .name = "usb_del",
538 .args_type = "devname:s",
539 .params = "device",
540 .help = "remove USB device 'bus.addr'",
541 .mhandler.cmd = do_usb_del,
544 STEXI
545 @item usb_del @var{devname}
546 @findex usb_del
548 Remove the USB device @var{devname} from the QEMU virtual USB
549 hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
550 command @code{info usb} to see the devices you can remove.
551 ETEXI
554 .name = "device_add",
555 .args_type = "device:O",
556 .params = "driver[,prop=value][,...]",
557 .help = "add device, like -device on the command line",
558 .user_print = monitor_user_noop,
559 .mhandler.cmd_new = do_device_add,
562 STEXI
563 @item device_add @var{config}
564 @findex device_add
566 Add device.
567 ETEXI
570 .name = "device_del",
571 .args_type = "id:s",
572 .params = "device",
573 .help = "remove device",
574 .user_print = monitor_user_noop,
575 .mhandler.cmd_new = do_device_del,
578 STEXI
579 @item device_del @var{id}
580 @findex device_del
582 Remove device @var{id}.
583 ETEXI
586 .name = "cpu",
587 .args_type = "index:i",
588 .params = "index",
589 .help = "set the default CPU",
590 .user_print = monitor_user_noop,
591 .mhandler.cmd_new = do_cpu_set,
594 STEXI
595 @item cpu @var{index}
596 @findex cpu
597 Set the default CPU.
598 ETEXI
601 .name = "mouse_move",
602 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
603 .params = "dx dy [dz]",
604 .help = "send mouse move events",
605 .mhandler.cmd = do_mouse_move,
608 STEXI
609 @item mouse_move @var{dx} @var{dy} [@var{dz}]
610 @findex mouse_move
611 Move the active mouse to the specified coordinates @var{dx} @var{dy}
612 with optional scroll axis @var{dz}.
613 ETEXI
616 .name = "mouse_button",
617 .args_type = "button_state:i",
618 .params = "state",
619 .help = "change mouse button state (1=L, 2=M, 4=R)",
620 .mhandler.cmd = do_mouse_button,
623 STEXI
624 @item mouse_button @var{val}
625 @findex mouse_button
626 Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
627 ETEXI
630 .name = "mouse_set",
631 .args_type = "index:i",
632 .params = "index",
633 .help = "set which mouse device receives events",
634 .mhandler.cmd = do_mouse_set,
637 STEXI
638 @item mouse_set @var{index}
639 @findex mouse_set
640 Set which mouse device receives events at given @var{index}, index
641 can be obtained with
642 @example
643 info mice
644 @end example
645 ETEXI
647 #ifdef HAS_AUDIO
649 .name = "wavcapture",
650 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
651 .params = "path [frequency [bits [channels]]]",
652 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
653 .mhandler.cmd = do_wav_capture,
655 #endif
656 STEXI
657 @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
658 @findex wavcapture
659 Capture audio into @var{filename}. Using sample rate @var{frequency}
660 bits per sample @var{bits} and number of channels @var{channels}.
662 Defaults:
663 @itemize @minus
664 @item Sample rate = 44100 Hz - CD quality
665 @item Bits = 16
666 @item Number of channels = 2 - Stereo
667 @end itemize
668 ETEXI
670 #ifdef HAS_AUDIO
672 .name = "stopcapture",
673 .args_type = "n:i",
674 .params = "capture index",
675 .help = "stop capture",
676 .mhandler.cmd = do_stop_capture,
678 #endif
679 STEXI
680 @item stopcapture @var{index}
681 @findex stopcapture
682 Stop capture with a given @var{index}, index can be obtained with
683 @example
684 info capture
685 @end example
686 ETEXI
689 .name = "memsave",
690 .args_type = "val:l,size:i,filename:s",
691 .params = "addr size file",
692 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
693 .user_print = monitor_user_noop,
694 .mhandler.cmd_new = do_memory_save,
697 STEXI
698 @item memsave @var{addr} @var{size} @var{file}
699 @findex memsave
700 save to disk virtual memory dump starting at @var{addr} of size @var{size}.
701 ETEXI
704 .name = "pmemsave",
705 .args_type = "val:l,size:i,filename:s",
706 .params = "addr size file",
707 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
708 .user_print = monitor_user_noop,
709 .mhandler.cmd_new = do_physical_memory_save,
712 STEXI
713 @item pmemsave @var{addr} @var{size} @var{file}
714 @findex pmemsave
715 save to disk physical memory dump starting at @var{addr} of size @var{size}.
716 ETEXI
719 .name = "boot_set",
720 .args_type = "bootdevice:s",
721 .params = "bootdevice",
722 .help = "define new values for the boot device list",
723 .mhandler.cmd = do_boot_set,
726 STEXI
727 @item boot_set @var{bootdevicelist}
728 @findex boot_set
730 Define new values for the boot device list. Those values will override
731 the values specified on the command line through the @code{-boot} option.
733 The values that can be specified here depend on the machine type, but are
734 the same that can be specified in the @code{-boot} command line option.
735 ETEXI
737 #if defined(TARGET_I386)
739 .name = "nmi",
740 .args_type = "",
741 .params = "",
742 .help = "inject an NMI on all guest's CPUs",
743 .user_print = monitor_user_noop,
744 .mhandler.cmd_new = do_inject_nmi,
746 #endif
747 STEXI
748 @item nmi @var{cpu}
749 @findex nmi
750 Inject an NMI on the given CPU (x86 only).
751 ETEXI
754 .name = "migrate",
755 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
756 .params = "[-d] [-b] [-i] uri",
757 .help = "migrate to URI (using -d to not wait for completion)"
758 "\n\t\t\t -b for migration without shared storage with"
759 " full copy of disk\n\t\t\t -i for migration without "
760 "shared storage with incremental copy of disk "
761 "(base image shared between src and destination)",
762 .user_print = monitor_user_noop,
763 .mhandler.cmd_new = do_migrate,
767 STEXI
768 @item migrate [-d] [-b] [-i] @var{uri}
769 @findex migrate
770 Migrate to @var{uri} (using -d to not wait for completion).
771 -b for migration with full copy of disk
772 -i for migration with incremental copy of disk (base image is shared)
773 ETEXI
776 .name = "migrate_cancel",
777 .args_type = "",
778 .params = "",
779 .help = "cancel the current VM migration",
780 .user_print = monitor_user_noop,
781 .mhandler.cmd_new = do_migrate_cancel,
784 STEXI
785 @item migrate_cancel
786 @findex migrate_cancel
787 Cancel the current VM migration.
788 ETEXI
791 .name = "migrate_set_speed",
792 .args_type = "value:o",
793 .params = "value",
794 .help = "set maximum speed (in bytes) for migrations. "
795 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
796 .user_print = monitor_user_noop,
797 .mhandler.cmd_new = do_migrate_set_speed,
800 STEXI
801 @item migrate_set_speed @var{value}
802 @findex migrate_set_speed
803 Set maximum speed to @var{value} (in bytes) for migrations.
804 ETEXI
807 .name = "migrate_set_downtime",
808 .args_type = "value:T",
809 .params = "value",
810 .help = "set maximum tolerated downtime (in seconds) for migrations",
811 .user_print = monitor_user_noop,
812 .mhandler.cmd_new = do_migrate_set_downtime,
815 STEXI
816 @item migrate_set_downtime @var{second}
817 @findex migrate_set_downtime
818 Set maximum tolerated downtime (in seconds) for migration.
819 ETEXI
822 .name = "client_migrate_info",
823 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
824 .params = "protocol hostname port tls-port cert-subject",
825 .help = "send migration info to spice/vnc client",
826 .user_print = monitor_user_noop,
827 .mhandler.cmd_new = client_migrate_info,
830 STEXI
831 @item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
832 @findex client_migrate_info
833 Set the spice/vnc connection info for the migration target. The spice/vnc
834 server will ask the spice/vnc client to automatically reconnect using the
835 new parameters (if specified) once the vm migration finished successfully.
836 ETEXI
839 .name = "snapshot_blkdev",
840 .args_type = "device:B,snapshot-file:s?,format:s?",
841 .params = "device [new-image-file] [format]",
842 .help = "initiates a live snapshot\n\t\t\t"
843 "of device. If a new image file is specified, the\n\t\t\t"
844 "new image file will become the new root image.\n\t\t\t"
845 "If format is specified, the snapshot file will\n\t\t\t"
846 "be created in that format. Otherwise the\n\t\t\t"
847 "snapshot will be internal! (currently unsupported)",
848 .mhandler.cmd_new = do_snapshot_blkdev,
851 STEXI
852 @item snapshot_blkdev
853 @findex snapshot_blkdev
854 Snapshot device, using snapshot file as target if provided
855 ETEXI
857 #if defined(TARGET_I386)
859 .name = "drive_add",
860 .args_type = "pci_addr:s,opts:s",
861 .params = "[[<domain>:]<bus>:]<slot>\n"
862 "[file=file][,if=type][,bus=n]\n"
863 "[,unit=m][,media=d][index=i]\n"
864 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
865 "[snapshot=on|off][,cache=on|off]",
866 .help = "add drive to PCI storage controller",
867 .mhandler.cmd = drive_hot_add,
869 #endif
871 STEXI
872 @item drive_add
873 @findex drive_add
874 Add drive to PCI storage controller.
875 ETEXI
877 #if defined(TARGET_I386)
879 .name = "pci_add",
880 .args_type = "pci_addr:s,type:s,opts:s?",
881 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
882 .help = "hot-add PCI device",
883 .mhandler.cmd = pci_device_hot_add,
885 #endif
887 STEXI
888 @item pci_add
889 @findex pci_add
890 Hot-add PCI device.
891 ETEXI
893 #if defined(TARGET_I386)
895 .name = "pci_del",
896 .args_type = "pci_addr:s",
897 .params = "[[<domain>:]<bus>:]<slot>",
898 .help = "hot remove PCI device",
899 .mhandler.cmd = do_pci_device_hot_remove,
901 #endif
903 STEXI
904 @item pci_del
905 @findex pci_del
906 Hot remove PCI device.
907 ETEXI
910 .name = "pcie_aer_inject_error",
911 .args_type = "advisory_non_fatal:-a,correctable:-c,"
912 "id:s,error_status:s,"
913 "header0:i?,header1:i?,header2:i?,header3:i?,"
914 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
915 .params = "[-a] [-c] id "
916 "<error_status> [<tlp header> [<tlp header prefix>]]",
917 .help = "inject pcie aer error\n\t\t\t"
918 " -a for advisory non fatal error\n\t\t\t"
919 " -c for correctable error\n\t\t\t"
920 "<id> = qdev device id\n\t\t\t"
921 "<error_status> = error string or 32bit\n\t\t\t"
922 "<tlb header> = 32bit x 4\n\t\t\t"
923 "<tlb header prefix> = 32bit x 4",
924 .user_print = pcie_aer_inject_error_print,
925 .mhandler.cmd_new = do_pcie_aer_inejct_error,
928 STEXI
929 @item pcie_aer_inject_error
930 @findex pcie_aer_inject_error
931 Inject PCIe AER error
932 ETEXI
935 .name = "host_net_add",
936 .args_type = "device:s,opts:s?",
937 .params = "tap|user|socket|vde|dump [options]",
938 .help = "add host VLAN client",
939 .mhandler.cmd = net_host_device_add,
942 STEXI
943 @item host_net_add
944 @findex host_net_add
945 Add host VLAN client.
946 ETEXI
949 .name = "host_net_remove",
950 .args_type = "vlan_id:i,device:s",
951 .params = "vlan_id name",
952 .help = "remove host VLAN client",
953 .mhandler.cmd = net_host_device_remove,
956 STEXI
957 @item host_net_remove
958 @findex host_net_remove
959 Remove host VLAN client.
960 ETEXI
963 .name = "netdev_add",
964 .args_type = "netdev:O",
965 .params = "[user|tap|socket],id=str[,prop=value][,...]",
966 .help = "add host network device",
967 .user_print = monitor_user_noop,
968 .mhandler.cmd_new = do_netdev_add,
971 STEXI
972 @item netdev_add
973 @findex netdev_add
974 Add host network device.
975 ETEXI
978 .name = "netdev_del",
979 .args_type = "id:s",
980 .params = "id",
981 .help = "remove host network device",
982 .user_print = monitor_user_noop,
983 .mhandler.cmd_new = do_netdev_del,
986 STEXI
987 @item netdev_del
988 @findex netdev_del
989 Remove host network device.
990 ETEXI
992 #ifdef CONFIG_SLIRP
994 .name = "hostfwd_add",
995 .args_type = "arg1:s,arg2:s?,arg3:s?",
996 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
997 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
998 .mhandler.cmd = net_slirp_hostfwd_add,
1000 #endif
1001 STEXI
1002 @item hostfwd_add
1003 @findex hostfwd_add
1004 Redirect TCP or UDP connections from host to guest (requires -net user).
1005 ETEXI
1007 #ifdef CONFIG_SLIRP
1009 .name = "hostfwd_remove",
1010 .args_type = "arg1:s,arg2:s?,arg3:s?",
1011 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1012 .help = "remove host-to-guest TCP or UDP redirection",
1013 .mhandler.cmd = net_slirp_hostfwd_remove,
1016 #endif
1017 STEXI
1018 @item hostfwd_remove
1019 @findex hostfwd_remove
1020 Remove host-to-guest TCP or UDP redirection.
1021 ETEXI
1024 .name = "balloon",
1025 .args_type = "value:M",
1026 .params = "target",
1027 .help = "request VM to change its memory allocation (in MB)",
1028 .user_print = monitor_user_noop,
1029 .mhandler.cmd_async = do_balloon,
1030 .flags = MONITOR_CMD_ASYNC,
1033 STEXI
1034 @item balloon @var{value}
1035 @findex balloon
1036 Request VM to change its memory allocation to @var{value} (in MB).
1037 ETEXI
1040 .name = "set_link",
1041 .args_type = "name:s,up:b",
1042 .params = "name on|off",
1043 .help = "change the link status of a network adapter",
1044 .user_print = monitor_user_noop,
1045 .mhandler.cmd_new = do_set_link,
1048 STEXI
1049 @item set_link @var{name} [on|off]
1050 @findex set_link
1051 Switch link @var{name} on (i.e. up) or off (i.e. down).
1052 ETEXI
1055 .name = "watchdog_action",
1056 .args_type = "action:s",
1057 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1058 .help = "change watchdog action",
1059 .mhandler.cmd = do_watchdog_action,
1062 STEXI
1063 @item watchdog_action
1064 @findex watchdog_action
1065 Change watchdog action.
1066 ETEXI
1069 .name = "acl_show",
1070 .args_type = "aclname:s",
1071 .params = "aclname",
1072 .help = "list rules in the access control list",
1073 .mhandler.cmd = do_acl_show,
1076 STEXI
1077 @item acl_show @var{aclname}
1078 @findex acl_show
1079 List all the matching rules in the access control list, and the default
1080 policy. There are currently two named access control lists,
1081 @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1082 certificate distinguished name, and SASL username respectively.
1083 ETEXI
1086 .name = "acl_policy",
1087 .args_type = "aclname:s,policy:s",
1088 .params = "aclname allow|deny",
1089 .help = "set default access control list policy",
1090 .mhandler.cmd = do_acl_policy,
1093 STEXI
1094 @item acl_policy @var{aclname} @code{allow|deny}
1095 @findex acl_policy
1096 Set the default access control list policy, used in the event that
1097 none of the explicit rules match. The default policy at startup is
1098 always @code{deny}.
1099 ETEXI
1102 .name = "acl_add",
1103 .args_type = "aclname:s,match:s,policy:s,index:i?",
1104 .params = "aclname match allow|deny [index]",
1105 .help = "add a match rule to the access control list",
1106 .mhandler.cmd = do_acl_add,
1109 STEXI
1110 @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1111 @findex acl_add
1112 Add a match rule to the access control list, allowing or denying access.
1113 The match will normally be an exact username or x509 distinguished name,
1114 but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1115 allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1116 normally be appended to the end of the ACL, but can be inserted
1117 earlier in the list if the optional @var{index} parameter is supplied.
1118 ETEXI
1121 .name = "acl_remove",
1122 .args_type = "aclname:s,match:s",
1123 .params = "aclname match",
1124 .help = "remove a match rule from the access control list",
1125 .mhandler.cmd = do_acl_remove,
1128 STEXI
1129 @item acl_remove @var{aclname} @var{match}
1130 @findex acl_remove
1131 Remove the specified match rule from the access control list.
1132 ETEXI
1135 .name = "acl_reset",
1136 .args_type = "aclname:s",
1137 .params = "aclname",
1138 .help = "reset the access control list",
1139 .mhandler.cmd = do_acl_reset,
1142 STEXI
1143 @item acl_reset @var{aclname}
1144 @findex acl_reset
1145 Remove all matches from the access control list, and set the default
1146 policy back to @code{deny}.
1147 ETEXI
1149 #if defined(TARGET_I386)
1152 .name = "mce",
1153 .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1154 .params = "[-b] cpu bank status mcgstatus addr misc",
1155 .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1156 .mhandler.cmd = do_inject_mce,
1159 #endif
1160 STEXI
1161 @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1162 @findex mce (x86)
1163 Inject an MCE on the given CPU (x86 only).
1164 ETEXI
1167 .name = "getfd",
1168 .args_type = "fdname:s",
1169 .params = "getfd name",
1170 .help = "receive a file descriptor via SCM rights and assign it a name",
1171 .user_print = monitor_user_noop,
1172 .mhandler.cmd_new = do_getfd,
1175 STEXI
1176 @item getfd @var{fdname}
1177 @findex getfd
1178 If a file descriptor is passed alongside this command using the SCM_RIGHTS
1179 mechanism on unix sockets, it is stored using the name @var{fdname} for
1180 later use by other monitor commands.
1181 ETEXI
1184 .name = "closefd",
1185 .args_type = "fdname:s",
1186 .params = "closefd name",
1187 .help = "close a file descriptor previously passed via SCM rights",
1188 .user_print = monitor_user_noop,
1189 .mhandler.cmd_new = do_closefd,
1192 STEXI
1193 @item closefd @var{fdname}
1194 @findex closefd
1195 Close the file descriptor previously assigned to @var{fdname} using the
1196 @code{getfd} command. This is only needed if the file descriptor was never
1197 used by another monitor command.
1198 ETEXI
1201 .name = "block_passwd",
1202 .args_type = "device:B,password:s",
1203 .params = "block_passwd device password",
1204 .help = "set the password of encrypted block devices",
1205 .user_print = monitor_user_noop,
1206 .mhandler.cmd_new = do_block_set_passwd,
1209 STEXI
1210 @item block_passwd @var{device} @var{password}
1211 @findex block_passwd
1212 Set the encrypted device @var{device} password to @var{password}
1213 ETEXI
1216 .name = "set_password",
1217 .args_type = "protocol:s,password:s,connected:s?",
1218 .params = "protocol password action-if-connected",
1219 .help = "set spice/vnc password",
1220 .user_print = monitor_user_noop,
1221 .mhandler.cmd_new = set_password,
1224 STEXI
1225 @item set_password [ vnc | spice ] password [ action-if-connected ]
1226 @findex set_password
1228 Change spice/vnc password. Use zero to make the password stay valid
1229 forever. @var{action-if-connected} specifies what should happen in
1230 case a connection is established: @var{fail} makes the password change
1231 fail. @var{disconnect} changes the password and disconnects the
1232 client. @var{keep} changes the password and keeps the connection up.
1233 @var{keep} is the default.
1234 ETEXI
1237 .name = "expire_password",
1238 .args_type = "protocol:s,time:s",
1239 .params = "protocol time",
1240 .help = "set spice/vnc password expire-time",
1241 .user_print = monitor_user_noop,
1242 .mhandler.cmd_new = expire_password,
1245 STEXI
1246 @item expire_password [ vnc | spice ] expire-time
1247 @findex expire_password
1249 Specify when a password for spice/vnc becomes
1250 invalid. @var{expire-time} accepts:
1252 @table @var
1253 @item now
1254 Invalidate password instantly.
1256 @item never
1257 Password stays valid forever.
1259 @item +nsec
1260 Password stays valid for @var{nsec} seconds starting now.
1262 @item nsec
1263 Password is invalidated at the given time. @var{nsec} are the seconds
1264 passed since 1970, i.e. unix epoch.
1266 @end table
1267 ETEXI
1270 .name = "info",
1271 .args_type = "item:s?",
1272 .params = "[subcommand]",
1273 .help = "show various information about the system state",
1274 .mhandler.cmd = do_info,
1277 STEXI
1278 @item info @var{subcommand}
1279 @findex info
1280 Show various information about the system state.
1282 @table @option
1283 @item info version
1284 show the version of QEMU
1285 @item info network
1286 show the various VLANs and the associated devices
1287 @item info chardev
1288 show the character devices
1289 @item info block
1290 show the block devices
1291 @item info blockstats
1292 show block device statistics
1293 @item info registers
1294 show the cpu registers
1295 @item info cpus
1296 show infos for each CPU
1297 @item info history
1298 show the command line history
1299 @item info irq
1300 show the interrupts statistics (if available)
1301 @item info pic
1302 show i8259 (PIC) state
1303 @item info pci
1304 show emulated PCI device info
1305 @item info tlb
1306 show virtual to physical memory mappings (i386, SH4, SPARC, and PPC only)
1307 @item info mem
1308 show the active virtual memory mappings (i386 only)
1309 @item info jit
1310 show dynamic compiler info
1311 @item info numa
1312 show NUMA information
1313 @item info kvm
1314 show KVM information
1315 @item info usb
1316 show USB devices plugged on the virtual USB hub
1317 @item info usbhost
1318 show all USB host devices
1319 @item info profile
1320 show profiling information
1321 @item info capture
1322 show information about active capturing
1323 @item info snapshots
1324 show list of VM snapshots
1325 @item info status
1326 show the current VM status (running|paused)
1327 @item info pcmcia
1328 show guest PCMCIA status
1329 @item info mice
1330 show which guest mouse is receiving events
1331 @item info vnc
1332 show the vnc server status
1333 @item info name
1334 show the current VM name
1335 @item info uuid
1336 show the current VM UUID
1337 @item info cpustats
1338 show CPU statistics
1339 @item info usernet
1340 show user network stack connection states
1341 @item info migrate
1342 show migration status
1343 @item info balloon
1344 show balloon information
1345 @item info qtree
1346 show device tree
1347 @item info qdm
1348 show qdev device model list
1349 @item info roms
1350 show roms
1351 @end table
1352 ETEXI
1354 #ifdef CONFIG_TRACE_SIMPLE
1355 STEXI
1356 @item info trace
1357 show contents of trace buffer
1358 ETEXI
1359 #endif
1361 STEXI
1362 @item info trace-events
1363 show available trace events and their state
1364 ETEXI
1366 STEXI
1367 @end table
1368 ETEXI