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
14 .args_type = "name:s?",
16 .help = "show the help",
17 .mhandler.cmd = do_help_cmd,
21 @item help or ? [@var{cmd}]
22 Show the help for all commands or just for command @var{cmd}.
27 .args_type = "device:B",
28 .params = "device|all",
29 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
30 .mhandler.cmd = do_commit,
35 Commit changes to the disk images (if -snapshot is used) or backing files.
40 .args_type = "item:s?",
41 .params = "[subcommand]",
42 .help = "show various information about the system state",
43 .mhandler.cmd = do_info,
47 @item info @var{subcommand}
48 Show various information about the system state.
52 show the version of QEMU
54 show the various VLANs and the associated devices
56 show the character devices
58 show the block devices
60 show block device statistics
62 show the cpu registers
64 show infos for each CPU
66 show the command line history
68 show the interrupts statistics (if available)
70 show i8259 (PIC) state
72 show emulated PCI device info
74 show virtual to physical memory mappings (i386 only)
76 show the active virtual memory mappings (i386 only)
78 show state of HPET (i386 only)
82 show USB devices plugged on the virtual USB hub
84 show all USB host devices
86 show profiling information
88 show information about active capturing
90 show list of VM snapshots
92 show the current VM status (running|paused)
94 show guest PCMCIA status
96 show which guest mouse is receiving events
98 show the vnc server status
100 show the current VM name
102 show the current VM UUID
106 show user network stack connection states
108 show migration status
110 show balloon information
120 .help = "quit the emulator",
121 .mhandler.cmd = do_quit,
131 .args_type = "force:-f,filename:B",
132 .params = "[-f] device",
133 .help = "eject a removable medium (use -f to force it)",
134 .mhandler.cmd = do_eject,
138 @item eject [-f] @var{device}
139 Eject a removable medium (use -f to force it).
144 .args_type = "device:B,target:F,arg:s?",
145 .params = "device filename [format]",
146 .help = "change a removable medium, optional format",
147 .mhandler.cmd = do_change,
151 @item change @var{device} @var{setting}
153 Change the configuration of a device.
156 @item change @var{diskdevice} @var{filename} [@var{format}]
157 Change the medium for a removable disk device to point to @var{filename}. eg
160 (qemu) change ide1-cd0 /path/to/some.iso
163 @var{format} is optional.
165 @item change vnc @var{display},@var{options}
166 Change the configuration of the VNC server. The valid syntax for @var{display}
167 and @var{options} are described at @ref{sec_invocation}. eg
170 (qemu) change vnc localhost:1
173 @item change vnc password [@var{password}]
175 Change the password associated with the VNC server. If the new password is not
176 supplied, the monitor will prompt for it to be entered. VNC passwords are only
177 significant up to 8 letters. eg
180 (qemu) change vnc password
188 .name = "screendump",
189 .args_type = "filename:F",
190 .params = "filename",
191 .help = "save screen into PPM image 'filename'",
192 .mhandler.cmd = do_screen_dump,
196 @item screendump @var{filename}
197 Save screen into PPM image @var{filename}.
202 .args_type = "filename:F",
203 .params = "filename",
204 .help = "output logs to 'filename'",
205 .mhandler.cmd = do_logfile,
209 @item logfile @var{filename}
210 Output logs to @var{filename}.
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,
222 @item log @var{item1}[,...]
223 Activate logging of the specified items to @file{/tmp/qemu.log}.
228 .args_type = "name:s?",
229 .params = "[tag|id]",
230 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
231 .mhandler.cmd = do_savevm,
235 @item savevm [@var{tag}|@var{id}]
236 Create a snapshot of the whole virtual machine. If @var{tag} is
237 provided, it is used as human readable identifier. If there is already
238 a snapshot with the same tag or ID, it is replaced. More info at
244 .args_type = "name:s",
246 .help = "restore a VM snapshot from its tag or id",
247 .mhandler.cmd = do_loadvm,
251 @item loadvm @var{tag}|@var{id}
252 Set the whole virtual machine to the snapshot identified by the tag
253 @var{tag} or the unique snapshot ID @var{id}.
258 .args_type = "name:s",
260 .help = "delete a VM snapshot from its tag or id",
261 .mhandler.cmd = do_delvm,
265 @item delvm @var{tag}|@var{id}
266 Delete the snapshot identified by @var{tag} or @var{id}.
270 .name = "singlestep",
271 .args_type = "option:s?",
272 .params = "[on|off]",
273 .help = "run emulation in singlestep mode or switch to normal mode",
274 .mhandler.cmd = do_singlestep,
278 @item singlestep [off]
279 Run the emulation in single step mode.
280 If called with option off, the emulation returns to normal mode.
287 .help = "stop emulation",
288 .mhandler.cmd = do_stop,
300 .help = "resume emulation",
301 .mhandler.cmd = do_cont,
311 .args_type = "device:s?",
312 .params = "[device]",
313 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
314 .mhandler.cmd = do_gdbserver,
318 @item gdbserver [@var{port}]
319 Start gdbserver session (default @var{port}=1234)
324 .args_type = "fmt:/,addr:l",
325 .params = "/fmt addr",
326 .help = "virtual memory dump starting at 'addr'",
327 .mhandler.cmd = do_memory_dump,
331 @item x/fmt @var{addr}
332 Virtual memory dump starting at @var{addr}.
337 .args_type = "fmt:/,addr:l",
338 .params = "/fmt addr",
339 .help = "physical memory dump starting at 'addr'",
340 .mhandler.cmd = do_physical_memory_dump,
344 @item xp /@var{fmt} @var{addr}
345 Physical memory dump starting at @var{addr}.
347 @var{fmt} is a format which tells the command how to format the
348 data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
352 is the number of items to be dumped.
355 can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
356 c (char) or i (asm instruction).
359 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
360 @code{h} or @code{w} can be specified with the @code{i} format to
361 respectively select 16 or 32 bit code instruction size.
368 Dump 10 instructions at the current instruction pointer:
373 0x90107065: lea 0x0(%esi,1),%esi
374 0x90107069: lea 0x0(%edi,1),%edi
376 0x90107071: jmp 0x90107080
384 Dump 80 16 bit values at the start of the video memory.
386 (qemu) xp/80hx 0xb8000
387 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
388 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
389 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
390 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
391 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
392 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
393 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
394 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
395 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
396 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
403 .args_type = "fmt:/,val:l",
404 .params = "/fmt expr",
405 .help = "print expression value (use $reg for CPU register access)",
406 .mhandler.cmd = do_print,
410 @item p or print/@var{fmt} @var{expr}
412 Print expression value. Only the @var{format} part of @var{fmt} is
418 .args_type = "fmt:/,addr:i,index:i.",
419 .params = "/fmt addr",
420 .help = "I/O port read",
421 .mhandler.cmd = do_ioport_read,
430 .args_type = "fmt:/,addr:i,val:i",
431 .params = "/fmt addr value",
432 .help = "I/O port write",
433 .mhandler.cmd = do_ioport_write,
442 .args_type = "string:s,hold_time:i?",
443 .params = "keys [hold_ms]",
444 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
445 .mhandler.cmd = do_sendkey,
449 @item sendkey @var{keys}
451 Send @var{keys} to the emulator. @var{keys} could be the name of the
452 key or @code{#} followed by the raw value in either decimal or hexadecimal
453 format. Use @code{-} to press several keys simultaneously. Example:
458 This command is useful to send keys that your graphical user interface
459 intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
463 .name = "system_reset",
466 .help = "reset the system",
467 .mhandler.cmd = do_system_reset,
477 .name = "system_powerdown",
480 .help = "send system power down event",
481 .mhandler.cmd = do_system_powerdown,
485 @item system_powerdown
487 Power down the system (if supported).
492 .args_type = "start:i,size:i",
493 .params = "addr size",
494 .help = "compute the checksum of a memory region",
495 .mhandler.cmd = do_sum,
499 @item sum @var{addr} @var{size}
501 Compute the checksum of a memory region.
506 .args_type = "devname:s",
508 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
509 .mhandler.cmd = do_usb_add,
513 @item usb_add @var{devname}
515 Add the USB device @var{devname}. For details of available devices see
521 .args_type = "devname:s",
523 .help = "remove USB device 'bus.addr'",
524 .mhandler.cmd = do_usb_del,
528 @item usb_del @var{devname}
530 Remove the USB device @var{devname} from the QEMU virtual USB
531 hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
532 command @code{info usb} to see the devices you can remove.
536 .name = "device_add",
537 .args_type = "config:s",
539 .help = "add device, like -device on the command line",
540 .mhandler.cmd = do_device_add,
544 @item device_add @var{config}
550 .name = "device_del",
553 .help = "remove device",
554 .mhandler.cmd = do_device_del,
558 @item device_del @var{id}
560 Remove device @var{id}.
565 .args_type = "index:i",
567 .help = "set the default CPU",
568 .mhandler.cmd = do_cpu_set,
576 .name = "mouse_move",
577 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
578 .params = "dx dy [dz]",
579 .help = "send mouse move events",
580 .mhandler.cmd = do_mouse_move,
584 @item mouse_move @var{dx} @var{dy} [@var{dz}]
585 Move the active mouse to the specified coordinates @var{dx} @var{dy}
586 with optional scroll axis @var{dz}.
590 .name = "mouse_button",
591 .args_type = "button_state:i",
593 .help = "change mouse button state (1=L, 2=M, 4=R)",
594 .mhandler.cmd = do_mouse_button,
598 @item mouse_button @var{val}
599 Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
604 .args_type = "index:i",
606 .help = "set which mouse device receives events",
607 .mhandler.cmd = do_mouse_set,
611 @item mouse_set @var{index}
612 Set which mouse device receives events at given @var{index}, index
621 .name = "wavcapture",
622 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
623 .params = "path [frequency [bits [channels]]]",
624 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
625 .mhandler.cmd = do_wav_capture,
629 @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
630 Capture audio into @var{filename}. Using sample rate @var{frequency}
631 bits per sample @var{bits} and number of channels @var{channels}.
635 @item Sample rate = 44100 Hz - CD quality
637 @item Number of channels = 2 - Stereo
643 .name = "stopcapture",
645 .params = "capture index",
646 .help = "stop capture",
647 .mhandler.cmd = do_stop_capture,
651 @item stopcapture @var{index}
652 Stop capture with a given @var{index}, index can be obtained with
660 .args_type = "val:l,size:i,filename:s",
661 .params = "addr size file",
662 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
663 .mhandler.cmd = do_memory_save,
667 @item memsave @var{addr} @var{size} @var{file}
668 save to disk virtual memory dump starting at @var{addr} of size @var{size}.
673 .args_type = "val:l,size:i,filename:s",
674 .params = "addr size file",
675 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
676 .mhandler.cmd = do_physical_memory_save,
680 @item pmemsave @var{addr} @var{size} @var{file}
681 save to disk physical memory dump starting at @var{addr} of size @var{size}.
686 .args_type = "bootdevice:s",
687 .params = "bootdevice",
688 .help = "define new values for the boot device list",
689 .mhandler.cmd = do_boot_set,
693 @item boot_set @var{bootdevicelist}
695 Define new values for the boot device list. Those values will override
696 the values specified on the command line through the @code{-boot} option.
698 The values that can be specified here depend on the machine type, but are
699 the same that can be specified in the @code{-boot} command line option.
702 #if defined(TARGET_I386)
705 .args_type = "cpu_index:i",
707 .help = "inject an NMI on the given CPU",
708 .mhandler.cmd = do_inject_nmi,
713 Inject an NMI on the given CPU (x86 only).
718 .args_type = "detach:-d,uri:s",
719 .params = "[-d] uri",
720 .help = "migrate to URI (using -d to not wait for completion)",
721 .mhandler.cmd = do_migrate,
725 @item migrate [-d] @var{uri}
726 Migrate to @var{uri} (using -d to not wait for completion).
730 .name = "migrate_cancel",
733 .help = "cancel the current VM migration",
734 .mhandler.cmd = do_migrate_cancel,
739 Cancel the current VM migration.
743 .name = "migrate_set_speed",
744 .args_type = "value:s",
746 .help = "set maximum speed (in bytes) for migrations",
747 .mhandler.cmd = do_migrate_set_speed,
751 @item migrate_set_speed @var{value}
752 Set maximum speed to @var{value} (in bytes) for migrations.
756 .name = "migrate_set_downtime",
757 .args_type = "value:s",
759 .help = "set maximum tolerated downtime (in seconds) for migrations",
760 .mhandler.cmd = do_migrate_set_downtime,
764 @item migrate_set_downtime @var{second}
765 Set maximum tolerated downtime (in seconds) for migration.
768 #if defined(TARGET_I386)
771 .args_type = "pci_addr:s,opts:s",
772 .params = "[[<domain>:]<bus>:]<slot>\n"
773 "[file=file][,if=type][,bus=n]\n"
774 "[,unit=m][,media=d][index=i]\n"
775 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
776 "[snapshot=on|off][,cache=on|off]",
777 .help = "add drive to PCI storage controller",
778 .mhandler.cmd = drive_hot_add,
784 Add drive to PCI storage controller.
787 #if defined(TARGET_I386)
790 .args_type = "pci_addr:s,type:s,opts:s?",
791 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
792 .help = "hot-add PCI device",
793 .mhandler.cmd = pci_device_hot_add,
802 #if defined(TARGET_I386)
805 .args_type = "pci_addr:s",
806 .params = "[[<domain>:]<bus>:]<slot>",
807 .help = "hot remove PCI device",
808 .mhandler.cmd = do_pci_device_hot_remove,
814 Hot remove PCI device.
818 .name = "host_net_add",
819 .args_type = "device:s,opts:s?",
820 .params = "tap|user|socket|vde|dump [options]",
821 .help = "add host VLAN client",
822 .mhandler.cmd = net_host_device_add,
827 Add host VLAN client.
831 .name = "host_net_remove",
832 .args_type = "vlan_id:i,device:s",
833 .params = "vlan_id name",
834 .help = "remove host VLAN client",
835 .mhandler.cmd = net_host_device_remove,
839 @item host_net_remove
840 Remove host VLAN client.
845 .name = "hostfwd_add",
846 .args_type = "arg1:s,arg2:s?,arg3:s?",
847 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
848 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
849 .mhandler.cmd = net_slirp_hostfwd_add,
853 .name = "hostfwd_remove",
854 .args_type = "arg1:s,arg2:s?,arg3:s?",
855 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
856 .help = "remove host-to-guest TCP or UDP redirection",
857 .mhandler.cmd = net_slirp_hostfwd_remove,
863 Redirect TCP or UDP connections from host to guest (requires -net user).
868 .args_type = "value:i",
870 .help = "request VM to change it's memory allocation (in MB)",
871 .mhandler.cmd = do_balloon,
875 @item balloon @var{value}
876 Request VM to change its memory allocation to @var{value} (in MB).
881 .args_type = "name:s,up_or_down:s",
882 .params = "name up|down",
883 .help = "change the link status of a network adapter",
884 .mhandler.cmd = do_set_link,
888 @item set_link @var{name} [up|down]
889 Set link @var{name} up or down.
893 .name = "watchdog_action",
894 .args_type = "action:s",
895 .params = "[reset|shutdown|poweroff|pause|debug|none]",
896 .help = "change watchdog action",
897 .mhandler.cmd = do_watchdog_action,
901 @item watchdog_action
902 Change watchdog action.
907 .args_type = "aclname:s",
909 .help = "list rules in the access control list",
910 .mhandler.cmd = do_acl_show,
914 @item acl_show @var{aclname}
915 List all the matching rules in the access control list, and the default
916 policy. There are currently two named access control lists,
917 @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
918 certificate distinguished name, and SASL username respectively.
922 .name = "acl_policy",
923 .args_type = "aclname:s,policy:s",
924 .params = "aclname allow|deny",
925 .help = "set default access control list policy",
926 .mhandler.cmd = do_acl_policy,
930 @item acl_policy @var{aclname} @code{allow|deny}
931 Set the default access control list policy, used in the event that
932 none of the explicit rules match. The default policy at startup is
938 .args_type = "aclname:s,match:s,policy:s,index:i?",
939 .params = "aclname match allow|deny [index]",
940 .help = "add a match rule to the access control list",
941 .mhandler.cmd = do_acl_add,
945 @item acl_allow @var{aclname} @var{match} @code{allow|deny} [@var{index}]
946 Add a match rule to the access control list, allowing or denying access.
947 The match will normally be an exact username or x509 distinguished name,
948 but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
949 allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
950 normally be appended to the end of the ACL, but can be inserted
951 earlier in the list if the optional @var{index} parameter is supplied.
955 .name = "acl_remove",
956 .args_type = "aclname:s,match:s",
957 .params = "aclname match",
958 .help = "remove a match rule from the access control list",
959 .mhandler.cmd = do_acl_remove,
963 @item acl_remove @var{aclname} @var{match}
964 Remove the specified match rule from the access control list.
969 .args_type = "aclname:s",
971 .help = "reset the access control list",
972 .mhandler.cmd = do_acl_reset,
976 @item acl_remove @var{aclname} @var{match}
977 Remove all matches from the access control list, and set the default
978 policy back to @code{deny}.
981 #if defined(TARGET_I386)
985 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
986 .params = "cpu bank status mcgstatus addr misc",
987 .help = "inject a MCE on the given CPU",
988 .mhandler.cmd = do_inject_mce,
993 @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
994 Inject an MCE on the given CPU (x86 only).
999 .args_type = "fdname:s",
1000 .params = "getfd name",
1001 .help = "receive a file descriptor via SCM rights and assign it a name",
1002 .mhandler.cmd = do_getfd,
1006 @item getfd @var{fdname}
1007 If a file descriptor is passed alongside this command using the SCM_RIGHTS
1008 mechanism on unix sockets, it is stored using the name @var{fdname} for
1009 later use by other monitor commands.
1014 .args_type = "fdname:s",
1015 .params = "closefd name",
1016 .help = "close a file descriptor previously passed via SCM rights",
1017 .mhandler.cmd = do_closefd,
1021 @item closefd @var{fdname}
1022 Close the file descriptor previously assigned to @var{fdname} using the
1023 @code{getfd} command. This is only needed if the file descriptor was never
1024 used by another monitor command.