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
}]
23 Show the help
for all commands or just
for command @
var{cmd
}.
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
= hmp_commit
,
37 Commit changes to the disk
images (if -snapshot is used
) or backing files
.
38 If the backing file is smaller than the snapshot
, then the backing file will be
39 resized to be the same size as the snapshot
. If the snapshot is smaller than
40 the backing file
, the backing file will not be truncated
. If you want the
41 backing file to match the size of the smaller snapshot
, you can safely truncate
42 it yourself once the commit operation successfully completes
.
49 .help
= "quit the emulator",
50 .mhandler
.cmd
= hmp_quit
,
60 .name
= "block_resize",
61 .args_type
= "device:B,size:o",
62 .params
= "device size",
63 .help
= "resize a block image",
64 .mhandler
.cmd
= hmp_block_resize
,
70 Resize a block image
while a guest is running
. Usually requires guest
71 action to see the updated size
. Resize to a lower size is supported
,
72 but should be used with extreme caution
. Note that
this command only
73 resizes image files
, it can not resize block devices like LVM volumes
.
77 .name
= "block_stream",
78 .args_type
= "device:B,speed:o?,base:s?",
79 .params
= "device [speed [base]]",
80 .help
= "copy data from a backing file into a block device",
81 .mhandler
.cmd
= hmp_block_stream
,
87 Copy data from a backing file into a block device
.
91 .name
= "block_job_set_speed",
92 .args_type
= "device:B,speed:o",
93 .params
= "device speed",
94 .help
= "set maximum speed for a background block operation",
95 .mhandler
.cmd
= hmp_block_job_set_speed
,
99 @item block_job_set_speed
100 @findex block_job_set_speed
101 Set maximum speed
for a background block operation
.
105 .name
= "block_job_cancel",
106 .args_type
= "force:-f,device:B",
107 .params
= "[-f] device",
108 .help
= "stop an active background block operation (use -f"
109 "\n\t\t\t if the operation is currently paused)",
110 .mhandler
.cmd
= hmp_block_job_cancel
,
114 @item block_job_cancel
115 @findex block_job_cancel
116 Stop an active background block
operation (streaming
, mirroring
).
120 .name
= "block_job_complete",
121 .args_type
= "device:B",
123 .help
= "stop an active background block operation",
124 .mhandler
.cmd
= hmp_block_job_complete
,
128 @item block_job_complete
129 @findex block_job_complete
130 Manually trigger completion of an active background block operation
.
131 For mirroring
, this will
switch the device to the destination path
.
135 .name
= "block_job_pause",
136 .args_type
= "device:B",
138 .help
= "pause an active background block operation",
139 .mhandler
.cmd
= hmp_block_job_pause
,
143 @item block_job_pause
144 @findex block_job_pause
145 Pause an active block streaming operation
.
149 .name
= "block_job_resume",
150 .args_type
= "device:B",
152 .help
= "resume a paused background block operation",
153 .mhandler
.cmd
= hmp_block_job_resume
,
157 @item block_job_resume
158 @findex block_job_resume
159 Resume a paused block streaming operation
.
164 .args_type
= "force:-f,device:B",
165 .params
= "[-f] device",
166 .help
= "eject a removable medium (use -f to force it)",
167 .mhandler
.cmd
= hmp_eject
,
171 @item eject
[-f
] @
var{device
}
173 Eject a removable
medium (use
-f to force it
).
180 .help
= "remove host block device",
181 .user_print
= monitor_user_noop
,
182 .mhandler
.cmd_new
= hmp_drive_del
,
186 @item drive_del @
var{device
}
188 Remove host block device
. The result is that guest generated IO is no longer
189 submitted against the host device underlying the disk
. Once a drive has
190 been deleted
, the QEMU Block layer returns
-EIO which results
in IO
191 errors
in the guest
for applications that are reading
/writing to the device
.
192 These errors are always reported to the guest
, regardless of the drive
's error
193 actions (drive options rerror, werror).
198 .args_type = "device:B,target:F,arg:s?",
199 .params = "device filename [format]",
200 .help = "change a removable medium, optional format",
201 .mhandler.cmd = hmp_change,
205 @item change @var{device} @var{setting}
208 Change the configuration of a device.
211 @item change @var{diskdevice} @var{filename} [@var{format}]
212 Change the medium for a removable disk device to point to @var{filename}. eg
215 (qemu) change ide1-cd0 /path/to/some.iso
218 @var{format} is optional.
220 @item change vnc @var{display},@var{options}
221 Change the configuration of the VNC server. The valid syntax for @var{display}
222 and @var{options} are described at @ref{sec_invocation}. eg
225 (qemu) change vnc localhost:1
228 @item change vnc password [@var{password}]
230 Change the password associated with the VNC server. If the new password is not
231 supplied, the monitor will prompt for it to be entered. VNC passwords are only
232 significant up to 8 letters. eg
235 (qemu) change vnc password
243 .name = "screendump",
244 .args_type = "filename:F",
245 .params = "filename",
246 .help = "save screen into PPM image 'filename
'",
247 .mhandler.cmd = hmp_screendump,
251 @item screendump @var{filename}
253 Save screen into PPM image @var{filename}.
258 .args_type = "filename:F",
259 .params = "filename",
260 .help = "output logs to 'filename
'",
261 .mhandler.cmd = hmp_logfile,
265 @item logfile @var{filename}
267 Output logs to @var{filename}.
271 .name = "trace-event",
272 .args_type = "name:s,option:b",
273 .params = "name on|off",
274 .help = "changes status of a specific trace event",
275 .mhandler.cmd = hmp_trace_event,
281 changes status of a trace event
284 #if defined(CONFIG_TRACE_SIMPLE)
286 .name = "trace-file",
287 .args_type = "op:s?,arg:F?",
288 .params = "on|off|flush|set [arg]",
289 .help = "open, close, or flush trace file, or set a new file name",
290 .mhandler.cmd = hmp_trace_file,
294 @item trace-file on|off|flush
296 Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
302 .args_type = "items:s",
303 .params = "item1[,...]",
304 .help = "activate logging of the specified items",
305 .mhandler.cmd = hmp_log,
309 @item log @var{item1}[,...]
311 Activate logging of the specified items.
316 .args_type = "name:s?",
317 .params = "[tag|id]",
318 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
319 .mhandler.cmd = hmp_savevm,
323 @item savevm [@var{tag}|@var{id}]
325 Create a snapshot of the whole virtual machine. If @var{tag} is
326 provided, it is used as human readable identifier. If there is already
327 a snapshot with the same tag or ID, it is replaced. More info at
333 .args_type = "name:s",
335 .help = "restore a VM snapshot from its tag or id",
336 .mhandler.cmd = hmp_loadvm,
337 .command_completion = loadvm_completion,
341 @item loadvm @var{tag}|@var{id}
343 Set the whole virtual machine to the snapshot identified by the tag
344 @var{tag} or the unique snapshot ID @var{id}.
349 .args_type = "name:s",
351 .help = "delete a VM snapshot from its tag or id",
352 .mhandler.cmd = hmp_delvm,
353 .command_completion = delvm_completion,
357 @item delvm @var{tag}|@var{id}
359 Delete the snapshot identified by @var{tag} or @var{id}.
363 .name = "singlestep",
364 .args_type = "option:s?",
365 .params = "[on|off]",
366 .help = "run emulation in singlestep mode or switch to normal mode",
367 .mhandler.cmd = hmp_singlestep,
371 @item singlestep [off]
373 Run the emulation in single step mode.
374 If called with option off, the emulation returns to normal mode.
381 .help = "stop emulation",
382 .mhandler.cmd = hmp_stop,
395 .help = "resume emulation",
396 .mhandler.cmd = hmp_cont,
406 .name = "system_wakeup",
409 .help = "wakeup guest from suspend",
410 .mhandler.cmd = hmp_system_wakeup,
415 @findex system_wakeup
416 Wakeup guest from suspend.
421 .args_type = "device:s?",
422 .params = "[device]",
423 .help = "start gdbserver on given device (default 'tcp
::1234'), stop with 'none
'",
424 .mhandler.cmd = hmp_gdbserver,
428 @item gdbserver [@var{port}]
430 Start gdbserver session (default @var{port}=1234)
435 .args_type = "fmt:/,addr:l",
436 .params = "/fmt addr",
437 .help = "virtual memory dump starting at 'addr
'",
438 .mhandler.cmd = hmp_memory_dump,
442 @item x/fmt @var{addr}
444 Virtual memory dump starting at @var{addr}.
449 .args_type = "fmt:/,addr:l",
450 .params = "/fmt addr",
451 .help = "physical memory dump starting at 'addr
'",
452 .mhandler.cmd = hmp_physical_memory_dump,
456 @item xp /@var{fmt} @var{addr}
458 Physical memory dump starting at @var{addr}.
460 @var{fmt} is a format which tells the command how to format the
461 data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
465 is the number of items to be dumped.
468 can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
469 c (char) or i (asm instruction).
472 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
473 @code{h} or @code{w} can be specified with the @code{i} format to
474 respectively select 16 or 32 bit code instruction size.
481 Dump 10 instructions at the current instruction pointer:
486 0x90107065: lea 0x0(%esi,1),%esi
487 0x90107069: lea 0x0(%edi,1),%edi
489 0x90107071: jmp 0x90107080
497 Dump 80 16 bit values at the start of the video memory.
499 (qemu) xp/80hx 0xb8000
500 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
501 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
502 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
503 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
504 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
505 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
506 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
507 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
508 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
509 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
516 .args_type = "fmt:/,val:l",
517 .params = "/fmt expr",
518 .help = "print expression value (use $reg for CPU register access)",
519 .mhandler.cmd = do_print,
523 @item p or print/@var{fmt} @var{expr}
526 Print expression value. Only the @var{format} part of @var{fmt} is
532 .args_type = "fmt:/,addr:i,index:i.",
533 .params = "/fmt addr",
534 .help = "I/O port read",
535 .mhandler.cmd = hmp_ioport_read,
544 .args_type = "fmt:/,addr:i,val:i",
545 .params = "/fmt addr value",
546 .help = "I/O port write",
547 .mhandler.cmd = hmp_ioport_write,
556 .args_type = "keys:s,hold-time:i?",
557 .params = "keys [hold_ms]",
558 .help = "send keys to the VM (e.g. 'sendkey ctrl
-alt
-f1
', default hold time=100 ms)",
559 .mhandler.cmd = hmp_sendkey,
560 .command_completion = sendkey_completion,
564 @item sendkey @var{keys}
567 Send @var{keys} to the guest. @var{keys} could be the name of the
568 key or the raw value in hexadecimal format. Use @code{-} to press
569 several keys simultaneously. Example:
574 This command is useful to send keys that your graphical user interface
575 intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
579 .name = "system_reset",
582 .help = "reset the system",
583 .mhandler.cmd = hmp_system_reset,
594 .name = "system_powerdown",
597 .help = "send system power down event",
598 .mhandler.cmd = hmp_system_powerdown,
602 @item system_powerdown
603 @findex system_powerdown
605 Power down the system (if supported).
610 .args_type = "start:i,size:i",
611 .params = "addr size",
612 .help = "compute the checksum of a memory region",
613 .mhandler.cmd = hmp_sum,
617 @item sum @var{addr} @var{size}
620 Compute the checksum of a memory region.
625 .args_type = "devname:s",
627 .help = "add USB device (e.g. 'host
:bus
.addr
' or 'host
:vendor_id
:product_id
')",
628 .mhandler.cmd = hmp_usb_add,
632 @item usb_add @var{devname}
635 Add the USB device @var{devname}. For details of available devices see
641 .args_type = "devname:s",
643 .help = "remove USB device 'bus
.addr
'",
644 .mhandler.cmd = hmp_usb_del,
648 @item usb_del @var{devname}
651 Remove the USB device @var{devname} from the QEMU virtual USB
652 hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
653 command @code{info usb} to see the devices you can remove.
657 .name = "device_add",
658 .args_type = "device:O",
659 .params = "driver[,prop=value][,...]",
660 .help = "add device, like -device on the command line",
661 .user_print = monitor_user_noop,
662 .mhandler.cmd_new = do_device_add,
663 .command_completion = device_add_completion,
667 @item device_add @var{config}
674 .name = "device_del",
677 .help = "remove device",
678 .mhandler.cmd = hmp_device_del,
679 .command_completion = device_del_completion,
683 @item device_del @var{id}
686 Remove device @var{id}.
691 .args_type = "index:i",
693 .help = "set the default CPU",
694 .mhandler.cmd = hmp_cpu,
698 @item cpu @var{index}
704 .name = "mouse_move",
705 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
706 .params = "dx dy [dz]",
707 .help = "send mouse move events",
708 .mhandler.cmd = hmp_mouse_move,
712 @item mouse_move @var{dx} @var{dy} [@var{dz}]
714 Move the active mouse to the specified coordinates @var{dx} @var{dy}
715 with optional scroll axis @var{dz}.
719 .name = "mouse_button",
720 .args_type = "button_state:i",
722 .help = "change mouse button state (1=L, 2=M, 4=R)",
723 .mhandler.cmd = hmp_mouse_button,
727 @item mouse_button @var{val}
729 Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
734 .args_type = "index:i",
736 .help = "set which mouse device receives events",
737 .mhandler.cmd = hmp_mouse_set,
741 @item mouse_set @var{index}
743 Set which mouse device receives events at given @var{index}, index
751 .name = "wavcapture",
752 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
753 .params = "path [frequency [bits [channels]]]",
754 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
755 .mhandler.cmd = hmp_wavcapture,
758 @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
760 Capture audio into @var{filename}. Using sample rate @var{frequency}
761 bits per sample @var{bits} and number of channels @var{channels}.
765 @item Sample rate = 44100 Hz - CD quality
767 @item Number of channels = 2 - Stereo
772 .name = "stopcapture",
774 .params = "capture index",
775 .help = "stop capture",
776 .mhandler.cmd = hmp_stopcapture,
779 @item stopcapture @var{index}
781 Stop capture with a given @var{index}, index can be obtained with
789 .args_type = "val:l,size:i,filename:s",
790 .params = "addr size file",
791 .help = "save to disk virtual memory dump starting at 'addr
' of size 'size
'",
792 .mhandler.cmd = hmp_memsave,
796 @item memsave @var{addr} @var{size} @var{file}
798 save to disk virtual memory dump starting at @var{addr} of size @var{size}.
803 .args_type = "val:l,size:i,filename:s",
804 .params = "addr size file",
805 .help = "save to disk physical memory dump starting at 'addr
' of size 'size
'",
806 .mhandler.cmd = hmp_pmemsave,
810 @item pmemsave @var{addr} @var{size} @var{file}
812 save to disk physical memory dump starting at @var{addr} of size @var{size}.
817 .args_type = "bootdevice:s",
818 .params = "bootdevice",
819 .help = "define new values for the boot device list",
820 .mhandler.cmd = hmp_boot_set,
824 @item boot_set @var{bootdevicelist}
827 Define new values for the boot device list. Those values will override
828 the values specified on the command line through the @code{-boot} option.
830 The values that can be specified here depend on the machine type, but are
831 the same that can be specified in the @code{-boot} command line option.
838 .help = "inject an NMI",
839 .mhandler.cmd = hmp_nmi,
844 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
849 .name = "ringbuf_write",
850 .args_type = "device:s,data:s",
851 .params = "device data",
852 .help = "Write to a ring buffer character device",
853 .mhandler.cmd = hmp_ringbuf_write,
854 .command_completion = ringbuf_write_completion,
858 @item ringbuf_write @var{device} @var{data}
859 @findex ringbuf_write
860 Write @var{data} to ring buffer character device @var{device}.
861 @var{data} must be a UTF-8 string.
866 .name = "ringbuf_read",
867 .args_type = "device:s,size:i",
868 .params = "device size",
869 .help = "Read from a ring buffer character device",
870 .mhandler.cmd = hmp_ringbuf_read,
871 .command_completion = ringbuf_write_completion,
875 @item ringbuf_read @var{device}
877 Read and print up to @var{size} bytes from ring buffer character
879 Certain non-printable characters are printed \uXXXX, where XXXX is the
880 character code in hexadecimal. Character \ is printed \\.
881 Bug: can screw up when the buffer contains invalid UTF-8 sequences,
882 NUL characters, after the ring buffer lost data, and when reading
883 stops because the size limit is reached.
889 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
890 .params = "[-d] [-b] [-i] uri",
891 .help = "migrate to URI (using -d to not wait for completion)"
892 "\n\t\t\t -b for migration without shared storage with"
893 " full copy of disk\n\t\t\t -i for migration without "
894 "shared storage with incremental copy of disk "
895 "(base image shared between src and destination)",
896 .mhandler.cmd = hmp_migrate,
901 @item migrate [-d] [-b] [-i] @var{uri}
903 Migrate to @var{uri} (using -d to not wait for completion).
904 -b for migration with full copy of disk
905 -i for migration with incremental copy of disk (base image is shared)
909 .name = "migrate_cancel",
912 .help = "cancel the current VM migration",
913 .mhandler.cmd = hmp_migrate_cancel,
918 @findex migrate_cancel
919 Cancel the current VM migration.
924 .name = "migrate_incoming",
925 .args_type = "uri:s",
927 .help = "Continue an incoming migration from an -incoming defer",
928 .mhandler.cmd = hmp_migrate_incoming,
932 @item migrate_incoming @var{uri}
933 @findex migrate_incoming
934 Continue an incoming migration using the @var{uri} (that has the same syntax
935 as the -incoming option).
940 .name = "migrate_set_cache_size",
941 .args_type = "value:o",
943 .help = "set cache size (in bytes) for XBZRLE migrations,"
944 "the cache size will be rounded down to the nearest "
946 "The cache size affects the number of cache misses."
947 "In case of a high cache miss ratio you need to increase"
949 .mhandler.cmd = hmp_migrate_set_cache_size,
953 @item migrate_set_cache_size @var{value}
954 @findex migrate_set_cache_size
955 Set cache size to @var{value} (in bytes) for xbzrle migrations.
959 .name = "migrate_set_speed",
960 .args_type = "value:o",
962 .help = "set maximum speed (in bytes) for migrations. "
963 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
964 .mhandler.cmd = hmp_migrate_set_speed,
968 @item migrate_set_speed @var{value}
969 @findex migrate_set_speed
970 Set maximum speed to @var{value} (in bytes) for migrations.
974 .name = "migrate_set_downtime",
975 .args_type = "value:T",
977 .help = "set maximum tolerated downtime (in seconds) for migrations",
978 .mhandler.cmd = hmp_migrate_set_downtime,
982 @item migrate_set_downtime @var{second}
983 @findex migrate_set_downtime
984 Set maximum tolerated downtime (in seconds) for migration.
988 .name = "migrate_set_capability",
989 .args_type = "capability:s,state:b",
990 .params = "capability state",
991 .help = "Enable/Disable the usage of a capability for migration",
992 .mhandler.cmd = hmp_migrate_set_capability,
993 .command_completion = migrate_set_capability_completion,
997 @item migrate_set_capability @var{capability} @var{state}
998 @findex migrate_set_capability
999 Enable/Disable the usage of a capability @var{capability} for migration.
1003 .name = "client_migrate_info",
1004 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
1005 .params = "protocol hostname port tls-port cert-subject",
1006 .help = "send migration info to spice/vnc client",
1007 .user_print = monitor_user_noop,
1008 .mhandler.cmd_async = client_migrate_info,
1009 .flags = MONITOR_CMD_ASYNC,
1013 @item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
1014 @findex client_migrate_info
1015 Set the spice/vnc connection info for the migration target. The spice/vnc
1016 server will ask the spice/vnc client to automatically reconnect using the
1017 new parameters (if specified) once the vm migration finished successfully.
1021 .name = "dump-guest-memory",
1022 .args_type = "paging:-p,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
1023 .params = "[-p] [-z|-l|-s] filename [begin length]",
1024 .help = "dump guest memory into file 'filename
'.\n\t\t\t"
1025 "-p: do paging to get guest's memory mapping
.\n\t\t\t"
1026 "-z
: dump
in kdump
-compressed format
, with zlib compression
.\n\t\t\t"
1027 "-l
: dump
in kdump
-compressed format
, with lzo compression
.\n\t\t\t"
1028 "-s
: dump
in kdump
-compressed format
, with snappy compression
.\n\t\t\t"
1029 "begin
: the starting physical address
.\n\t\t\t"
1030 "length
: the memory size
, in bytes
.",
1031 .mhandler.cmd = hmp_dump_guest_memory,
1036 @item dump-guest-memory [-p] @var{filename} @var{begin} @var{length}
1037 @item dump-guest-memory [-z|-l|-s] @var{filename}
1038 @findex dump-guest-memory
1039 Dump guest memory to @var{protocol}. The file can be processed with crash or
1040 gdb. Without -z|-l|-s, the dump format is ELF.
1041 -p: do paging to get guest's memory mapping.
1042 -z: dump in kdump-compressed format, with zlib compression.
1043 -l: dump in kdump-compressed format, with lzo compression.
1044 -s: dump in kdump-compressed format, with snappy compression.
1045 filename: dump file name.
1046 begin: the starting physical address. It's optional, and should be
1047 specified together with length.
1048 length: the memory size, in bytes. It's optional, and should be specified
1049 together with begin.
1053 .name = "snapshot_blkdev
",
1054 .args_type = "reuse
:-n
,device
:B
,snapshot
-file
:s?
,format
:s?
",
1055 .params = "[-n
] device
[new-image
-file
] [format
]",
1056 .help = "initiates a live snapshot
\n\t\t\t"
1057 "of device
. If a
new image file is specified
, the
\n\t\t\t"
1058 "new image file will become the
new root image
.\n\t\t\t"
1059 "If format is specified
, the snapshot file will
\n\t\t\t"
1060 "be created
in that format
.\n\t\t\t"
1061 "The
default format is qcow2
. The
-n flag requests QEMU
\n\t\t\t"
1062 "to reuse the image found
in new-image
-file
, instead of
\n\t\t\t"
1063 "recreating it from scratch
.",
1064 .mhandler.cmd = hmp_snapshot_blkdev,
1068 @item snapshot_blkdev
1069 @findex snapshot_blkdev
1070 Snapshot device, using snapshot file as target if provided
1074 .name = "snapshot_blkdev_internal
",
1075 .args_type = "device
:B
,name
:s
",
1076 .params = "device name
",
1077 .help = "take an internal snapshot of device
.\n\t\t\t"
1078 "The format of the image used by device must
\n\t\t\t"
1079 "support it
, such as qcow2
.\n\t\t\t",
1080 .mhandler.cmd = hmp_snapshot_blkdev_internal,
1084 @item snapshot_blkdev_internal
1085 @findex snapshot_blkdev_internal
1086 Take an internal snapshot on device if it support
1090 .name = "snapshot_delete_blkdev_internal
",
1091 .args_type = "device
:B
,name
:s
,id
:s?
",
1092 .params = "device name
[id
]",
1093 .help = "delete an internal snapshot of device
.\n\t\t\t"
1094 "If id is specified
, qemu will
try delete
\n\t\t\t"
1095 "the snapshot matching both id and name
.\n\t\t\t"
1096 "The format of the image used by device must
\n\t\t\t"
1097 "support it
, such as qcow2
.\n\t\t\t",
1098 .mhandler.cmd = hmp_snapshot_delete_blkdev_internal,
1102 @item snapshot_delete_blkdev_internal
1103 @findex snapshot_delete_blkdev_internal
1104 Delete an internal snapshot on device if it support
1108 .name = "drive_mirror
",
1109 .args_type = "reuse
:-n
,full
:-f
,device
:B
,target
:s
,format
:s?
",
1110 .params = "[-n
] [-f
] device target
[format
]",
1111 .help = "initiates live storage
\n\t\t\t"
1112 "migration
for a device
. The device
's contents are\n\t\t\t"
1113 "copied to the new image file, including data that\n\t\t\t"
1114 "is written after the command is started.\n\t\t\t"
1115 "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1116 "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1117 "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1118 "so that the result does not need a backing file.\n\t\t\t",
1119 .mhandler.cmd = hmp_drive_mirror,
1123 @findex drive_mirror
1124 Start mirroring a block device's writes to a
new destination
,
1125 using the specified target
.
1129 .name
= "drive_backup",
1130 .args_type
= "reuse:-n,full:-f,device:B,target:s,format:s?",
1131 .params
= "[-n] [-f] device target [format]",
1132 .help
= "initiates a point-in-time\n\t\t\t"
1133 "copy for a device. The device's contents are\n\t\t\t"
1134 "copied to the new image file, excluding data that\n\t\t\t"
1135 "is written after the command is started.\n\t\t\t"
1136 "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1137 "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1138 "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1139 "so that the result does not need a backing file.\n\t\t\t",
1140 .mhandler
.cmd
= hmp_drive_backup
,
1144 @findex drive_backup
1145 Start a point
-in-time copy of a block device to a specificed target
.
1149 .name
= "drive_add",
1150 .args_type
= "pci_addr:s,opts:s",
1151 .params
= "[[<domain>:]<bus>:]<slot>\n"
1152 "[file=file][,if=type][,bus=n]\n"
1153 "[,unit=m][,media=d][,index=i]\n"
1154 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
1155 "[,snapshot=on|off][,cache=on|off]\n"
1156 "[,readonly=on|off][,copy-on-read=on|off]",
1157 .help
= "add drive to PCI storage controller",
1158 .mhandler
.cmd
= hmp_drive_add
,
1164 Add drive to PCI storage controller
.
1168 .name
= "pcie_aer_inject_error",
1169 .args_type
= "advisory_non_fatal:-a,correctable:-c,"
1170 "id:s,error_status:s,"
1171 "header0:i?,header1:i?,header2:i?,header3:i?,"
1172 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
1173 .params
= "[-a] [-c] id "
1174 "<error_status> [<tlp header> [<tlp header prefix>]]",
1175 .help
= "inject pcie aer error\n\t\t\t"
1176 " -a for advisory non fatal error\n\t\t\t"
1177 " -c for correctable error\n\t\t\t"
1178 "<id> = qdev device id\n\t\t\t"
1179 "<error_status> = error string or 32bit\n\t\t\t"
1180 "<tlb header> = 32bit x 4\n\t\t\t"
1181 "<tlb header prefix> = 32bit x 4",
1182 .user_print
= pcie_aer_inject_error_print
,
1183 .mhandler
.cmd_new
= hmp_pcie_aer_inject_error
,
1187 @item pcie_aer_inject_error
1188 @findex pcie_aer_inject_error
1189 Inject PCIe AER error
1193 .name
= "host_net_add",
1194 .args_type
= "device:s,opts:s?",
1195 .params
= "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]",
1196 .help
= "add host VLAN client",
1197 .mhandler
.cmd
= hmp_host_net_add
,
1198 .command_completion
= host_net_add_completion
,
1203 @findex host_net_add
1204 Add host VLAN client
.
1208 .name
= "host_net_remove",
1209 .args_type
= "vlan_id:i,device:s",
1210 .params
= "vlan_id name",
1211 .help
= "remove host VLAN client",
1212 .mhandler
.cmd
= hmp_host_net_remove
,
1213 .command_completion
= host_net_remove_completion
,
1217 @item host_net_remove
1218 @findex host_net_remove
1219 Remove host VLAN client
.
1223 .name
= "netdev_add",
1224 .args_type
= "netdev:O",
1225 .params
= "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
1226 .help
= "add host network device",
1227 .mhandler
.cmd
= hmp_netdev_add
,
1228 .command_completion
= netdev_add_completion
,
1234 Add host network device
.
1238 .name
= "netdev_del",
1239 .args_type
= "id:s",
1241 .help
= "remove host network device",
1242 .mhandler
.cmd
= hmp_netdev_del
,
1243 .command_completion
= netdev_del_completion
,
1249 Remove host network device
.
1253 .name
= "object_add",
1254 .args_type
= "object:O",
1255 .params
= "[qom-type=]type,id=str[,prop=value][,...]",
1256 .help
= "create QOM object",
1257 .mhandler
.cmd
= hmp_object_add
,
1258 .command_completion
= object_add_completion
,
1268 .name
= "object_del",
1269 .args_type
= "id:s",
1271 .help
= "destroy QOM object",
1272 .mhandler
.cmd
= hmp_object_del
,
1273 .command_completion
= object_del_completion
,
1284 .name
= "hostfwd_add",
1285 .args_type
= "arg1:s,arg2:s?,arg3:s?",
1286 .params
= "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1287 .help
= "redirect TCP or UDP connections from host to guest (requires -net user)",
1288 .mhandler
.cmd
= hmp_hostfwd_add
,
1294 Redirect TCP or UDP connections from host to
guest (requires
-net user
).
1299 .name
= "hostfwd_remove",
1300 .args_type
= "arg1:s,arg2:s?,arg3:s?",
1301 .params
= "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
1302 .help
= "remove host-to-guest TCP or UDP redirection",
1303 .mhandler
.cmd
= hmp_hostfwd_remove
,
1308 @item hostfwd_remove
1309 @findex hostfwd_remove
1310 Remove host
-to
-guest TCP or UDP redirection
.
1315 .args_type
= "value:M",
1317 .help
= "request VM to change its memory allocation (in MB)",
1318 .mhandler
.cmd
= hmp_balloon
,
1322 @item balloon @
var{value
}
1324 Request VM to change its memory allocation to @
var{value
} (in MB
).
1329 .args_type
= "name:s,up:b",
1330 .params
= "name on|off",
1331 .help
= "change the link status of a network adapter",
1332 .mhandler
.cmd
= hmp_set_link
,
1333 .command_completion
= set_link_completion
,
1337 @item set_link @
var{name
} [on|off
]
1339 Switch link @
var{name
} on (i
.e
. up
) or
off (i
.e
. down
).
1343 .name
= "watchdog_action",
1344 .args_type
= "action:s",
1345 .params
= "[reset|shutdown|poweroff|pause|debug|none]",
1346 .help
= "change watchdog action",
1347 .mhandler
.cmd
= hmp_watchdog_action
,
1348 .command_completion
= watchdog_action_completion
,
1352 @item watchdog_action
1353 @findex watchdog_action
1354 Change watchdog action
.
1359 .args_type
= "aclname:s",
1360 .params
= "aclname",
1361 .help
= "list rules in the access control list",
1362 .mhandler
.cmd
= hmp_acl_show
,
1366 @item acl_show @
var{aclname
}
1368 List all the matching rules
in the access control list
, and the
default
1369 policy
. There are currently two named access control lists
,
1370 @
var{vnc
.x509dname
} and @
var{vnc
.username
} matching on the x509 client
1371 certificate distinguished name
, and SASL username respectively
.
1375 .name
= "acl_policy",
1376 .args_type
= "aclname:s,policy:s",
1377 .params
= "aclname allow|deny",
1378 .help
= "set default access control list policy",
1379 .mhandler
.cmd
= hmp_acl_policy
,
1383 @item acl_policy @
var{aclname
} @code
{allow|deny
}
1385 Set the
default access control list policy
, used
in the event that
1386 none of the explicit rules match
. The
default policy at startup is
1392 .args_type
= "aclname:s,match:s,policy:s,index:i?",
1393 .params
= "aclname match allow|deny [index]",
1394 .help
= "add a match rule to the access control list",
1395 .mhandler
.cmd
= hmp_acl_add
,
1399 @item acl_add @
var{aclname
} @
var{match
} @code
{allow|deny
} [@
var{index
}]
1401 Add a match rule to the access control list
, allowing or denying access
.
1402 The match will normally be an exact username or x509 distinguished name
,
1403 but can optionally include wildcard globs
. eg @code
{*@@EXAMPLE
.COM
} to
1404 allow all users
in the @code
{EXAMPLE
.COM
} kerberos realm
. The match will
1405 normally be appended to the end of the ACL
, but can be inserted
1406 earlier
in the list
if the optional @
var{index
} parameter is supplied
.
1410 .name
= "acl_remove",
1411 .args_type
= "aclname:s,match:s",
1412 .params
= "aclname match",
1413 .help
= "remove a match rule from the access control list",
1414 .mhandler
.cmd
= hmp_acl_remove
,
1418 @item acl_remove @
var{aclname
} @
var{match
}
1420 Remove the specified match rule from the access control list
.
1424 .name
= "acl_reset",
1425 .args_type
= "aclname:s",
1426 .params
= "aclname",
1427 .help
= "reset the access control list",
1428 .mhandler
.cmd
= hmp_acl_reset
,
1432 @item acl_reset @
var{aclname
}
1434 Remove all matches from the access control list
, and set the
default
1435 policy back to @code
{deny
}.
1439 .name
= "nbd_server_start",
1440 .args_type
= "all:-a,writable:-w,uri:s",
1441 .params
= "nbd_server_start [-a] [-w] host:port",
1442 .help
= "serve block devices on the given host and port",
1443 .mhandler
.cmd
= hmp_nbd_server_start
,
1446 @item nbd_server_start @
var{host
}:@
var{port
}
1447 @findex nbd_server_start
1448 Start an NBD server on the given host and
/or port
. If the @option
{-a
}
1449 option is included
, all of the virtual machine
's block devices that
1450 have an inserted media on them are automatically exported; in this case,
1451 the @option{-w} option makes the devices writable too.
1455 .name = "nbd_server_add",
1456 .args_type = "writable:-w,device:B",
1457 .params = "nbd_server_add [-w] device",
1458 .help = "export a block device via NBD",
1459 .mhandler.cmd = hmp_nbd_server_add,
1462 @item nbd_server_add @var{device}
1463 @findex nbd_server_add
1464 Export a block device through QEMU's NBD server
, which must be started
1465 beforehand with @command
{nbd_server_start
}. The @option
{-w
} option makes the
1466 exported device writable too
.
1470 .name
= "nbd_server_stop",
1472 .params
= "nbd_server_stop",
1473 .help
= "stop serving block devices using the NBD protocol",
1474 .mhandler
.cmd
= hmp_nbd_server_stop
,
1477 @item nbd_server_stop
1478 @findex nbd_server_stop
1479 Stop the QEMU embedded NBD server
.
1483 #
if defined(TARGET_I386
)
1487 .args_type
= "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1488 .params
= "[-b] cpu bank status mcgstatus addr misc",
1489 .help
= "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1490 .mhandler
.cmd
= hmp_mce
,
1495 @item mce @
var{cpu
} @
var{bank
} @
var{status
} @
var{mcgstatus
} @
var{addr
} @
var{misc
}
1497 Inject an MCE on the given
CPU (x86 only
).
1502 .args_type
= "fdname:s",
1503 .params
= "getfd name",
1504 .help
= "receive a file descriptor via SCM rights and assign it a name",
1505 .mhandler
.cmd
= hmp_getfd
,
1509 @item getfd @
var{fdname
}
1511 If a file descriptor is passed alongside
this command
using the SCM_RIGHTS
1512 mechanism on unix sockets
, it is stored
using the name @
var{fdname
} for
1513 later use by other monitor commands
.
1518 .args_type
= "fdname:s",
1519 .params
= "closefd name",
1520 .help
= "close a file descriptor previously passed via SCM rights",
1521 .mhandler
.cmd
= hmp_closefd
,
1525 @item closefd @
var{fdname
}
1527 Close the file descriptor previously assigned to @
var{fdname
} using the
1528 @code
{getfd
} command
. This is only needed
if the file descriptor was
never
1529 used by another monitor command
.
1533 .name
= "block_passwd",
1534 .args_type
= "device:B,password:s",
1535 .params
= "block_passwd device password",
1536 .help
= "set the password of encrypted block devices",
1537 .mhandler
.cmd
= hmp_block_passwd
,
1541 @item block_set_io_throttle @
var{device
} @
var{bps
} @
var{bps_rd
} @
var{bps_wr
} @
var{iops
} @
var{iops_rd
} @
var{iops_wr
}
1542 @findex block_set_io_throttle
1543 Change 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
}
1547 .name
= "block_set_io_throttle",
1548 .args_type
= "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1549 .params
= "device bps bps_rd bps_wr iops iops_rd iops_wr",
1550 .help
= "change I/O throttle limits for a block drive",
1551 .mhandler
.cmd
= hmp_block_set_io_throttle
,
1555 @item block_passwd @
var{device
} @
var{password
}
1556 @findex block_passwd
1557 Set the encrypted device @
var{device
} password to @
var{password
}
1561 .name
= "set_password",
1562 .args_type
= "protocol:s,password:s,connected:s?",
1563 .params
= "protocol password action-if-connected",
1564 .help
= "set spice/vnc password",
1565 .mhandler
.cmd
= hmp_set_password
,
1569 @item set_password
[ vnc | spice
] password
[ action
-if-connected
]
1570 @findex set_password
1572 Change spice
/vnc password
. Use zero to make the password stay valid
1573 forever
. @
var{action
-if-connected
} specifies what should happen
in
1574 case a connection is established
: @
var{fail
} makes the password change
1575 fail
. @
var{disconnect
} changes the password and disconnects the
1576 client
. @
var{keep
} changes the password and keeps the connection up
.
1577 @
var{keep
} is the
default.
1581 .name
= "expire_password",
1582 .args_type
= "protocol:s,time:s",
1583 .params
= "protocol time",
1584 .help
= "set spice/vnc password expire-time",
1585 .mhandler
.cmd
= hmp_expire_password
,
1589 @item expire_password
[ vnc | spice
] expire
-time
1590 @findex expire_password
1592 Specify when a password
for spice
/vnc becomes
1593 invalid
. @
var{expire
-time
} accepts
:
1597 Invalidate password instantly
.
1600 Password stays valid forever
.
1603 Password stays valid
for @
var{nsec
} seconds starting now
.
1606 Password is invalidated at the given time
. @
var{nsec
} are the seconds
1607 passed since
1970, i
.e
. unix epoch
.
1613 .name
= "chardev-add",
1614 .args_type
= "args:s",
1616 .help
= "add chardev",
1617 .mhandler
.cmd
= hmp_chardev_add
,
1618 .command_completion
= chardev_add_completion
,
1622 @item chardev_add args
1625 chardev_add accepts the same parameters as the
-chardev command line
switch.
1630 .name
= "chardev-remove",
1631 .args_type
= "id:s",
1633 .help
= "remove chardev",
1634 .mhandler
.cmd
= hmp_chardev_remove
,
1635 .command_completion
= chardev_remove_completion
,
1639 @item chardev_remove id
1640 @findex chardev_remove
1642 Removes the chardev @
var{id
}.
1648 .args_type
= "device:B,command:s",
1649 .params
= "[device] \"[command]\"",
1650 .help
= "run a qemu-io command on a block device",
1651 .mhandler
.cmd
= hmp_qemu_io
,
1655 @item qemu
-io @
var{device
} @
var{command
}
1658 Executes a qemu
-io command on the given block device
.
1664 .args_type
= "id:i",
1667 .mhandler
.cmd
= hmp_cpu_add
,
1671 @item cpu
-add @
var{id
}
1672 Add CPU with id @
var{id
}
1677 .args_type
= "path:s?",
1679 .help
= "list QOM properties",
1680 .mhandler
.cmd
= hmp_qom_list
,
1684 @item qom
-list
[@
var{path
}]
1685 Print QOM properties of object at location @
var{path
}
1690 .args_type
= "path:s,property:s,value:s",
1691 .params
= "path property value",
1692 .help
= "set QOM property",
1693 .mhandler
.cmd
= hmp_qom_set
,
1697 @item qom
-set @
var{path
} @
var{property
} @
var{value
}
1698 Set QOM property @
var{property
} of object at location @
var{path
} to value @
var{value
}
1703 .args_type
= "item:s?",
1704 .params
= "[subcommand]",
1705 .help
= "show various information about the system state",
1706 .mhandler
.cmd
= hmp_info_help
,
1707 .sub_table
= info_cmds
,
1711 @item info @
var{subcommand
}
1713 Show various information about the system state
.
1717 show the version of QEMU
1719 show the various VLANs and the associated devices
1721 show the character devices
1723 show the block devices
1724 @item info blockstats
1725 show block device statistics
1726 @item info registers
1727 show the cpu registers
1729 show infos
for each CPU
1731 show the command line history
1733 show the interrupts
statistics (if available
)
1735 show
i8259 (PIC
) state
1737 show emulated PCI device info
1739 show virtual to physical memory
mappings (i386
, SH4
, SPARC
, PPC
, and Xtensa only
)
1741 show the active virtual memory
mappings (i386 only
)
1743 show
dynamic compiler info
1745 show NUMA information
1747 show KVM information
1749 show USB devices plugged on the virtual USB hub
1751 show all USB host devices
1753 show profiling information
1755 show information about active capturing
1756 @item info snapshots
1757 show list of VM snapshots
1759 show the current VM
status (running|paused
)
1761 show which guest mouse is receiving events
1763 show the vnc server status
1765 show the current VM name
1767 show the current VM UUID
1771 show user network stack connection states
1773 show migration status
1774 @item info migrate_capabilities
1775 show current migration capabilities
1776 @item info migrate_cache_size
1777 show current migration XBZRLE cache size
1779 show balloon information
1783 show qdev device model list
1785 show object composition tree
1790 @item info memory
-devices
1791 show the memory devices
1796 @item info
trace-events
1797 show available
trace events and their state