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
= do_commit
,
37 Commit changes to the disk
images (if -snapshot is used
) or backing files
.
44 .help
= "quit the emulator",
45 .user_print
= monitor_user_noop
,
46 .mhandler
.cmd
= hmp_quit
,
56 .name
= "block_resize",
57 .args_type
= "device:B,size:o",
58 .params
= "device size",
59 .help
= "resize a block image",
60 .mhandler
.cmd
= hmp_block_resize
,
66 Resize a block image
while a guest is running
. Usually requires guest
67 action to see the updated size
. Resize to a lower size is supported
,
68 but should be used with extreme caution
. Note that
this command only
69 resizes image files
, it can not resize block devices like LVM volumes
.
73 .name
= "block_stream",
74 .args_type
= "device:B,speed:o?,base:s?",
75 .params
= "device [speed [base]]",
76 .help
= "copy data from a backing file into a block device",
77 .mhandler
.cmd
= hmp_block_stream
,
83 Copy data from a backing file into a block device
.
87 .name
= "block_job_set_speed",
88 .args_type
= "device:B,speed:o",
89 .params
= "device speed",
90 .help
= "set maximum speed for a background block operation",
91 .mhandler
.cmd
= hmp_block_job_set_speed
,
95 @item block_job_set_speed
96 @findex block_job_set_speed
97 Set maximum speed
for a background block operation
.
101 .name
= "block_job_cancel",
102 .args_type
= "force:-f,device:B",
103 .params
= "[-f] device",
104 .help
= "stop an active background block operation (use -f"
105 "\n\t\t\t if the operation is currently paused)",
106 .mhandler
.cmd
= hmp_block_job_cancel
,
110 @item block_job_cancel
111 @findex block_job_cancel
112 Stop an active background block
operation (streaming
, mirroring
).
116 .name
= "block_job_complete",
117 .args_type
= "device:B",
119 .help
= "stop an active background block operation",
120 .mhandler
.cmd
= hmp_block_job_complete
,
124 @item block_job_complete
125 @findex block_job_complete
126 Manually trigger completion of an active background block operation
.
127 For mirroring
, this will
switch the device to the destination path
.
131 .name
= "block_job_pause",
132 .args_type
= "device:B",
134 .help
= "pause an active background block operation",
135 .mhandler
.cmd
= hmp_block_job_pause
,
139 @item block_job_pause
140 @findex block_job_pause
141 Pause an active block streaming operation
.
145 .name
= "block_job_resume",
146 .args_type
= "device:B",
148 .help
= "resume a paused background block operation",
149 .mhandler
.cmd
= hmp_block_job_resume
,
153 @item block_job_resume
154 @findex block_job_resume
155 Resume a paused block streaming operation
.
160 .args_type
= "force:-f,device:B",
161 .params
= "[-f] device",
162 .help
= "eject a removable medium (use -f to force it)",
163 .mhandler
.cmd
= hmp_eject
,
167 @item eject
[-f
] @
var{device
}
169 Eject a removable
medium (use
-f to force it
).
176 .help
= "remove host block device",
177 .user_print
= monitor_user_noop
,
178 .mhandler
.cmd_new
= do_drive_del
,
182 @item drive_del @
var{device
}
184 Remove host block device
. The result is that guest generated IO is no longer
185 submitted against the host device underlying the disk
. Once a drive has
186 been deleted
, the QEMU Block layer returns
-EIO which results
in IO
187 errors
in the guest
for applications that are reading
/writing to the device
.
192 .args_type
= "device:B,target:F,arg:s?",
193 .params
= "device filename [format]",
194 .help
= "change a removable medium, optional format",
195 .mhandler
.cmd
= hmp_change
,
199 @item change @
var{device
} @
var{setting
}
202 Change the configuration of a device
.
205 @item change @
var{diskdevice
} @
var{filename
} [@
var{format
}]
206 Change the medium
for a removable disk device to point to @
var{filename
}. eg
209 (qemu
) change ide1
-cd0
/path
/to
/some
.iso
212 @
var{format
} is optional
.
214 @item change vnc @
var{display
},@
var{options
}
215 Change the configuration of the VNC server
. The valid syntax
for @
var{display
}
216 and @
var{options
} are described at @ref
{sec_invocation
}. eg
219 (qemu
) change vnc localhost
:1
222 @item change vnc password
[@
var{password
}]
224 Change the password associated with the VNC server
. If the
new password is not
225 supplied
, the monitor will prompt
for it to be entered
. VNC passwords are only
226 significant up to
8 letters
. eg
229 (qemu
) change vnc password
237 .name
= "screendump",
238 .args_type
= "filename:F",
239 .params
= "filename",
240 .help
= "save screen into PPM image 'filename'",
241 .mhandler
.cmd
= hmp_screen_dump
,
245 @item screendump @
var{filename
}
247 Save screen into PPM image @
var{filename
}.
252 .args_type
= "filename:F",
253 .params
= "filename",
254 .help
= "output logs to 'filename'",
255 .mhandler
.cmd
= do_logfile
,
259 @item logfile @
var{filename
}
261 Output logs to @
var{filename
}.
265 .name
= "trace-event",
266 .args_type
= "name:s,option:b",
267 .params
= "name on|off",
268 .help
= "changes status of a specific trace event",
269 .mhandler
.cmd
= do_trace_event_set_state
,
275 changes status of a
trace event
278 #
if defined(CONFIG_TRACE_SIMPLE
)
280 .name
= "trace-file",
281 .args_type
= "op:s?,arg:F?",
282 .params
= "on|off|flush|set [arg]",
283 .help
= "open, close, or flush trace file, or set a new file name",
284 .mhandler
.cmd
= do_trace_file
,
288 @item
trace-file on|off|flush
290 Open
, close
, or flush the
trace file
. If no argument is given
, the status of the
trace file is displayed
.
296 .args_type
= "items:s",
297 .params
= "item1[,...]",
298 .help
= "activate logging of the specified items to '/tmp/qemu.log'",
299 .mhandler
.cmd
= do_log
,
303 @item log @
var{item1
}[,...]
305 Activate logging of the specified items to @file
{/tmp
/qemu
.log
}.
310 .args_type
= "name:s?",
311 .params
= "[tag|id]",
312 .help
= "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
313 .mhandler
.cmd
= do_savevm
,
317 @item savevm
[@
var{tag
}|@
var{id
}]
319 Create a snapshot of the whole virtual machine
. If @
var{tag
} is
320 provided
, it is used as human readable identifier
. If there is already
321 a snapshot with the same tag or ID
, it is replaced
. More info at
327 .args_type
= "name:s",
329 .help
= "restore a VM snapshot from its tag or id",
330 .mhandler
.cmd
= do_loadvm
,
334 @item loadvm @
var{tag
}|@
var{id
}
336 Set the whole virtual machine to the snapshot identified by the tag
337 @
var{tag
} or the unique snapshot ID @
var{id
}.
342 .args_type
= "name:s",
344 .help
= "delete a VM snapshot from its tag or id",
345 .mhandler
.cmd
= do_delvm
,
349 @item delvm @
var{tag
}|@
var{id
}
351 Delete the snapshot identified by @
var{tag
} or @
var{id
}.
355 .name
= "singlestep",
356 .args_type
= "option:s?",
357 .params
= "[on|off]",
358 .help
= "run emulation in singlestep mode or switch to normal mode",
359 .mhandler
.cmd
= do_singlestep
,
363 @item singlestep
[off
]
365 Run the emulation
in single step mode
.
366 If called with option off
, the emulation returns to normal mode
.
373 .help
= "stop emulation",
374 .mhandler
.cmd
= hmp_stop
,
387 .help
= "resume emulation",
388 .mhandler
.cmd
= hmp_cont
,
398 .name
= "system_wakeup",
401 .help
= "wakeup guest from suspend",
402 .mhandler
.cmd
= hmp_system_wakeup
,
407 @findex system_wakeup
408 Wakeup guest from suspend
.
413 .args_type
= "device:s?",
414 .params
= "[device]",
415 .help
= "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
416 .mhandler
.cmd
= do_gdbserver
,
420 @item gdbserver
[@
var{port
}]
422 Start gdbserver
session (default @
var{port
}=1234)
427 .args_type
= "fmt:/,addr:l",
428 .params
= "/fmt addr",
429 .help
= "virtual memory dump starting at 'addr'",
430 .mhandler
.cmd
= do_memory_dump
,
434 @item x
/fmt @
var{addr
}
436 Virtual memory dump starting at @
var{addr
}.
441 .args_type
= "fmt:/,addr:l",
442 .params
= "/fmt addr",
443 .help
= "physical memory dump starting at 'addr'",
444 .mhandler
.cmd
= do_physical_memory_dump
,
448 @item xp
/@
var{fmt
} @
var{addr
}
450 Physical memory dump starting at @
var{addr
}.
452 @
var{fmt
} is a format which tells the command how to format the
453 data
. Its syntax is
: @option
{/@
{count@
}@
{format@
}@
{size@
}}
457 is the number of items to be dumped
.
460 can be
x (hex
), d (signed decimal
), u (unsigned decimal
), o (octal
),
461 c (char
) or
i (asm instruction
).
464 can be
b (8 bits
), h (16 bits
), w (32 bits
) or
g (64 bits
). On x86
,
465 @code
{h
} or @code
{w
} can be specified with the @code
{i
} format to
466 respectively select
16 or
32 bit code instruction size
.
473 Dump
10 instructions at the current instruction pointer
:
478 0x90107065: lea
0x0(%esi
,1),%esi
479 0x90107069: lea
0x0(%edi
,1),%edi
481 0x90107071: jmp
0x90107080
489 Dump
80 16 bit values at the start of the video memory
.
491 (qemu
) xp
/80hx
0xb8000
492 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
493 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
494 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
495 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
496 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
497 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
498 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
499 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
500 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
501 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
508 .args_type
= "fmt:/,val:l",
509 .params
= "/fmt expr",
510 .help
= "print expression value (use $reg for CPU register access)",
511 .mhandler
.cmd
= do_print
,
515 @item p or print
/@
var{fmt
} @
var{expr
}
518 Print expression value
. Only the @
var{format
} part of @
var{fmt
} is
524 .args_type
= "fmt:/,addr:i,index:i.",
525 .params
= "/fmt addr",
526 .help
= "I/O port read",
527 .mhandler
.cmd
= do_ioport_read
,
536 .args_type
= "fmt:/,addr:i,val:i",
537 .params
= "/fmt addr value",
538 .help
= "I/O port write",
539 .mhandler
.cmd
= do_ioport_write
,
548 .args_type
= "keys:s,hold-time:i?",
549 .params
= "keys [hold_ms]",
550 .help
= "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
551 .mhandler
.cmd
= hmp_send_key
,
555 @item sendkey @
var{keys
}
558 Send @
var{keys
} to the guest
. @
var{keys
} could be the name of the
559 key or the raw value
in hexadecimal format
. Use @code
{-} to press
560 several keys simultaneously
. Example
:
565 This command is useful to send keys that your graphical user
interface
566 intercepts at low level
, such as @code
{ctrl
-alt
-f1
} in X Window
.
570 .name
= "system_reset",
573 .help
= "reset the system",
574 .mhandler
.cmd
= hmp_system_reset
,
585 .name
= "system_powerdown",
588 .help
= "send system power down event",
589 .mhandler
.cmd
= hmp_system_powerdown
,
593 @item system_powerdown
594 @findex system_powerdown
596 Power down the
system (if supported
).
601 .args_type
= "start:i,size:i",
602 .params
= "addr size",
603 .help
= "compute the checksum of a memory region",
604 .mhandler
.cmd
= do_sum
,
608 @item sum @
var{addr
} @
var{size
}
611 Compute the checksum of a memory region
.
616 .args_type
= "devname:s",
618 .help
= "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
619 .mhandler
.cmd
= do_usb_add
,
623 @item usb_add @
var{devname
}
626 Add the USB device @
var{devname
}. For details of available devices see
632 .args_type
= "devname:s",
634 .help
= "remove USB device 'bus.addr'",
635 .mhandler
.cmd
= do_usb_del
,
639 @item usb_del @
var{devname
}
642 Remove the USB device @
var{devname
} from the QEMU virtual USB
643 hub
. @
var{devname
} has the syntax @code
{bus
.addr
}. Use the monitor
644 command @code
{info usb
} to see the devices you can remove
.
648 .name
= "device_add",
649 .args_type
= "device:O",
650 .params
= "driver[,prop=value][,...]",
651 .help
= "add device, like -device on the command line",
652 .user_print
= monitor_user_noop
,
653 .mhandler
.cmd_new
= do_device_add
,
657 @item device_add @
var{config
}
664 .name
= "device_del",
667 .help
= "remove device",
668 .mhandler
.cmd
= hmp_device_del
,
672 @item device_del @
var{id
}
675 Remove device @
var{id
}.
680 .args_type
= "index:i",
682 .help
= "set the default CPU",
683 .mhandler
.cmd
= hmp_cpu
,
687 @item cpu @
var{index
}
693 .name
= "mouse_move",
694 .args_type
= "dx_str:s,dy_str:s,dz_str:s?",
695 .params
= "dx dy [dz]",
696 .help
= "send mouse move events",
697 .mhandler
.cmd
= do_mouse_move
,
701 @item mouse_move @
var{dx
} @
var{dy
} [@
var{dz
}]
703 Move the active mouse to the specified coordinates @
var{dx
} @
var{dy
}
704 with optional scroll axis @
var{dz
}.
708 .name
= "mouse_button",
709 .args_type
= "button_state:i",
711 .help
= "change mouse button state (1=L, 2=M, 4=R)",
712 .mhandler
.cmd
= do_mouse_button
,
716 @item mouse_button @
var{val
}
718 Change the active mouse button state @
var{val
} (1=L
, 2=M
, 4=R
).
723 .args_type
= "index:i",
725 .help
= "set which mouse device receives events",
726 .mhandler
.cmd
= do_mouse_set
,
730 @item mouse_set @
var{index
}
732 Set which mouse device receives events at given @
var{index
}, index
741 .name
= "wavcapture",
742 .args_type
= "path:F,freq:i?,bits:i?,nchannels:i?",
743 .params
= "path [frequency [bits [channels]]]",
744 .help
= "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
745 .mhandler
.cmd
= do_wav_capture
,
749 @item wavcapture @
var{filename
} [@
var{frequency
} [@
var{bits
} [@
var{channels
}]]]
751 Capture audio into @
var{filename
}. Using sample rate @
var{frequency
}
752 bits per sample @
var{bits
} and number of channels @
var{channels
}.
756 @item Sample rate
= 44100 Hz
- CD quality
758 @item Number of channels
= 2 - Stereo
764 .name
= "stopcapture",
766 .params
= "capture index",
767 .help
= "stop capture",
768 .mhandler
.cmd
= do_stop_capture
,
772 @item stopcapture @
var{index
}
774 Stop capture with a given @
var{index
}, index can be obtained with
782 .args_type
= "val:l,size:i,filename:s",
783 .params
= "addr size file",
784 .help
= "save to disk virtual memory dump starting at 'addr' of size 'size'",
785 .mhandler
.cmd
= hmp_memsave
,
789 @item memsave @
var{addr
} @
var{size
} @
var{file
}
791 save to disk virtual memory dump starting at @
var{addr
} of size @
var{size
}.
796 .args_type
= "val:l,size:i,filename:s",
797 .params
= "addr size file",
798 .help
= "save to disk physical memory dump starting at 'addr' of size 'size'",
799 .mhandler
.cmd
= hmp_pmemsave
,
803 @item pmemsave @
var{addr
} @
var{size
} @
var{file
}
805 save to disk physical memory dump starting at @
var{addr
} of size @
var{size
}.
810 .args_type
= "bootdevice:s",
811 .params
= "bootdevice",
812 .help
= "define new values for the boot device list",
813 .mhandler
.cmd
= do_boot_set
,
817 @item boot_set @
var{bootdevicelist
}
820 Define
new values
for the boot device list
. Those values will
override
821 the values specified on the command line through the @code
{-boot
} option
.
823 The values that can be specified
here depend on the machine type
, but are
824 the same that can be specified
in the @code
{-boot
} command line option
.
827 #
if defined(TARGET_I386
)
832 .help
= "inject an NMI on all guest's CPUs",
833 .mhandler
.cmd
= hmp_inject_nmi
,
839 Inject an NMI on the given
CPU (x86 only
).
844 .args_type
= "detach:-d,blk:-b,inc:-i,uri:s",
845 .params
= "[-d] [-b] [-i] uri",
846 .help
= "migrate to URI (using -d to not wait for completion)"
847 "\n\t\t\t -b for migration without shared storage with"
848 " full copy of disk\n\t\t\t -i for migration without "
849 "shared storage with incremental copy of disk "
850 "(base image shared between src and destination)",
851 .mhandler
.cmd
= hmp_migrate
,
856 @item migrate
[-d
] [-b
] [-i
] @
var{uri
}
858 Migrate to @
var{uri
} (using -d to not wait
for completion
).
859 -b
for migration with full copy of disk
860 -i
for migration with incremental copy of
disk (base image is shared
)
864 .name
= "migrate_cancel",
867 .help
= "cancel the current VM migration",
868 .mhandler
.cmd
= hmp_migrate_cancel
,
873 @findex migrate_cancel
874 Cancel the current VM migration
.
879 .name
= "migrate_set_cache_size",
880 .args_type
= "value:o",
882 .help
= "set cache size (in bytes) for XBZRLE migrations,"
883 "the cache size will be rounded down to the nearest "
885 "The cache size affects the number of cache misses."
886 "In case of a high cache miss ratio you need to increase"
888 .mhandler
.cmd
= hmp_migrate_set_cache_size
,
892 @item migrate_set_cache_size @
var{value
}
893 @findex migrate_set_cache_size
894 Set cache size to @
var{value
} (in bytes
) for xbzrle migrations
.
898 .name
= "migrate_set_speed",
899 .args_type
= "value:o",
901 .help
= "set maximum speed (in bytes) for migrations. "
902 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
903 .mhandler
.cmd
= hmp_migrate_set_speed
,
907 @item migrate_set_speed @
var{value
}
908 @findex migrate_set_speed
909 Set maximum speed to @
var{value
} (in bytes
) for migrations
.
913 .name
= "migrate_set_downtime",
914 .args_type
= "value:T",
916 .help
= "set maximum tolerated downtime (in seconds) for migrations",
917 .mhandler
.cmd
= hmp_migrate_set_downtime
,
921 @item migrate_set_downtime @
var{second
}
922 @findex migrate_set_downtime
923 Set maximum tolerated
downtime (in seconds
) for migration
.
927 .name
= "migrate_set_capability",
928 .args_type
= "capability:s,state:b",
929 .params
= "capability state",
930 .help
= "Enable/Disable the usage of a capability for migration",
931 .mhandler
.cmd
= hmp_migrate_set_capability
,
935 @item migrate_set_capability @
var{capability
} @
var{state
}
936 @findex migrate_set_capability
937 Enable
/Disable the usage of a capability @
var{capability
} for migration
.
941 .name
= "client_migrate_info",
942 .args_type
= "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
943 .params
= "protocol hostname port tls-port cert-subject",
944 .help
= "send migration info to spice/vnc client",
945 .user_print
= monitor_user_noop
,
946 .mhandler
.cmd_async
= client_migrate_info
,
947 .flags
= MONITOR_CMD_ASYNC
,
951 @item client_migrate_info @
var{protocol
} @
var{hostname
} @
var{port
} @
var{tls
-port
} @
var{cert
-subject
}
952 @findex client_migrate_info
953 Set the spice
/vnc connection info
for the migration target
. The spice
/vnc
954 server will ask the spice
/vnc client to automatically reconnect
using the
955 new parameters (if specified
) once the vm migration finished successfully
.
958 #
if defined(CONFIG_HAVE_CORE_DUMP
)
960 .name
= "dump-guest-memory",
961 .args_type
= "paging:-p,filename:F,begin:i?,length:i?",
962 .params
= "[-p] filename [begin] [length]",
963 .help
= "dump guest memory to file"
964 "\n\t\t\t begin(optional): the starting physical address"
965 "\n\t\t\t length(optional): the memory size, in bytes",
966 .mhandler
.cmd
= hmp_dump_guest_memory
,
971 @item dump
-guest
-memory
[-p
] @
var{protocol
} @
var{begin
} @
var{length
}
972 @findex dump
-guest
-memory
973 Dump guest memory to @
var{protocol
}. The file can be processed with crash or
975 filename
: dump file name
976 paging
: do paging to get guest
's memory mapping
977 begin: the starting physical address. It's optional
, and should be
978 specified with length together
.
979 length
: the memory size
, in bytes
. It
's optional, and should be specified
985 .name = "snapshot_blkdev",
986 .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
987 .params = "[-n] device [new-image-file] [format]",
988 .help = "initiates a live snapshot\n\t\t\t"
989 "of device. If a new image file is specified, the\n\t\t\t"
990 "new image file will become the new root image.\n\t\t\t"
991 "If format is specified, the snapshot file will\n\t\t\t"
992 "be created in that format. Otherwise the\n\t\t\t"
993 "snapshot will be internal! (currently unsupported).\n\t\t\t"
994 "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
995 "to reuse the image found in new-image-file, instead of\n\t\t\t"
996 "recreating it from scratch.",
997 .mhandler.cmd = hmp_snapshot_blkdev,
1001 @item snapshot_blkdev
1002 @findex snapshot_blkdev
1003 Snapshot device, using snapshot file as target if provided
1007 .name = "drive_mirror",
1008 .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
1009 .params = "[-n] [-f] device target [format]",
1010 .help = "initiates live storage\n\t\t\t"
1011 "migration for a device. The device's contents are
\n\t\t\t"
1012 "copied to the
new image file
, including data that
\n\t\t\t"
1013 "is written after the command is started
.\n\t\t\t"
1014 "The
-n flag requests QEMU to reuse the image found
\n\t\t\t"
1015 "in new-image
-file
, instead of recreating it from scratch
.\n\t\t\t"
1016 "The
-f flag requests QEMU to copy the whole disk
,\n\t\t\t"
1017 "so that the result does not need a backing file
.\n\t\t\t",
1018 .mhandler.cmd = hmp_drive_mirror,
1022 @findex drive_mirror
1023 Start mirroring a block device's writes to a new destination,
1024 using the specified target.
1028 .name = "drive_add
",
1029 .args_type = "pci_addr
:s
,opts
:s
",
1030 .params = "[[<domain
>:]<bus
>:]<slot
>\n"
1031 "[file
=file
][,if=type
][,bus
=n
]\n"
1032 "[,unit
=m
][,media
=d
][,index
=i
]\n"
1033 "[,cyls
=c
,heads
=h
,secs
=s
[,trans
=t
]]\n"
1034 "[,snapshot
=on|off
][,cache
=on|off
]\n"
1035 "[,readonly
=on|off
][,copy
-on
-read
=on|off
]",
1036 .help = "add drive to PCI storage controller
",
1037 .mhandler.cmd = drive_hot_add,
1043 Add drive to PCI storage controller.
1046 #if defined(TARGET_I386)
1049 .args_type = "pci_addr
:s
,type
:s
,opts
:s?
",
1050 .params = "auto|
[[<domain
>:]<bus
>:]<slot
> nic|storage
[[vlan
=n
][,macaddr
=addr
][,model
=type
]] [file
=file
][,if=type
][,bus
=nr
]...",
1051 .help = "hot
-add PCI device
",
1052 .mhandler.cmd = pci_device_hot_add,
1062 #if defined(TARGET_I386)
1065 .args_type = "pci_addr
:s
",
1066 .params = "[[<domain
>:]<bus
>:]<slot
>",
1067 .help = "hot remove PCI device
",
1068 .mhandler.cmd = do_pci_device_hot_remove,
1075 Hot remove PCI device.
1079 .name = "pcie_aer_inject_error
",
1080 .args_type = "advisory_non_fatal
:-a
,correctable
:-c
,"
1081 "id
:s
,error_status
:s
,"
1082 "header0
:i?
,header1
:i?
,header2
:i?
,header3
:i?
,"
1083 "prefix0
:i?
,prefix1
:i?
,prefix2
:i?
,prefix3
:i?
",
1084 .params = "[-a
] [-c
] id
"
1085 "<error_status
> [<tlp header
> [<tlp header prefix
>]]",
1086 .help = "inject pcie aer error
\n\t\t\t"
1087 " -a
for advisory non fatal error
\n\t\t\t"
1088 " -c
for correctable error
\n\t\t\t"
1089 "<id
> = qdev device id
\n\t\t\t"
1090 "<error_status
> = error string or
32bit
\n\t\t\t"
1091 "<tlb header
> = 32bit x
4\n\t\t\t"
1092 "<tlb header prefix
> = 32bit x
4",
1093 .user_print = pcie_aer_inject_error_print,
1094 .mhandler.cmd_new = do_pcie_aer_inject_error,
1098 @item pcie_aer_inject_error
1099 @findex pcie_aer_inject_error
1100 Inject PCIe AER error
1104 .name = "host_net_add
",
1105 .args_type = "device
:s
,opts
:s?
",
1106 .params = "tap|user|socket|vde|dump
[options
]",
1107 .help = "add host VLAN client
",
1108 .mhandler.cmd = net_host_device_add,
1113 @findex host_net_add
1114 Add host VLAN client.
1118 .name = "host_net_remove
",
1119 .args_type = "vlan_id
:i
,device
:s
",
1120 .params = "vlan_id name
",
1121 .help = "remove host VLAN client
",
1122 .mhandler.cmd = net_host_device_remove,
1126 @item host_net_remove
1127 @findex host_net_remove
1128 Remove host VLAN client.
1132 .name = "netdev_add
",
1133 .args_type = "netdev
:O
",
1134 .params = "[user|tap|socket
],id
=str
[,prop
=value
][,...]",
1135 .help = "add host network device
",
1136 .mhandler.cmd = hmp_netdev_add,
1142 Add host network device.
1146 .name = "netdev_del
",
1147 .args_type = "id
:s
",
1149 .help = "remove host network device
",
1150 .mhandler.cmd = hmp_netdev_del,
1156 Remove host network device.
1161 .name = "hostfwd_add
",
1162 .args_type = "arg1
:s
,arg2
:s?
,arg3
:s?
",
1163 .params = "[vlan_id name
] [tcp|udp
]:[hostaddr
]:hostport
-[guestaddr
]:guestport
",
1164 .help = "redirect TCP or UDP connections from host to
guest (requires
-net user
)",
1165 .mhandler.cmd = net_slirp_hostfwd_add,
1171 Redirect TCP or UDP connections from host to guest (requires -net user).
1176 .name = "hostfwd_remove
",
1177 .args_type = "arg1
:s
,arg2
:s?
,arg3
:s?
",
1178 .params = "[vlan_id name
] [tcp|udp
]:[hostaddr
]:hostport
",
1179 .help = "remove host
-to
-guest TCP or UDP redirection
",
1180 .mhandler.cmd = net_slirp_hostfwd_remove,
1185 @item hostfwd_remove
1186 @findex hostfwd_remove
1187 Remove host-to-guest TCP or UDP redirection.
1192 .args_type = "value
:M
",
1194 .help = "request VM to change its memory
allocation (in MB
)",
1195 .mhandler.cmd = hmp_balloon,
1199 @item balloon @var{value}
1201 Request VM to change its memory allocation to @var{value} (in MB).
1206 .args_type = "name
:s
,up
:b
",
1207 .params = "name on|off
",
1208 .help = "change the link status of a network adapter
",
1209 .mhandler.cmd = hmp_set_link,
1213 @item set_link @var{name} [on|off]
1215 Switch link @var{name} on (i.e. up) or off (i.e. down).
1219 .name = "watchdog_action
",
1220 .args_type = "action
:s
",
1221 .params = "[reset|shutdown|poweroff|pause|debug|none
]",
1222 .help = "change watchdog action
",
1223 .mhandler.cmd = do_watchdog_action,
1227 @item watchdog_action
1228 @findex watchdog_action
1229 Change watchdog action.
1234 .args_type = "aclname
:s
",
1235 .params = "aclname
",
1236 .help = "list rules
in the access control list
",
1237 .mhandler.cmd = do_acl_show,
1241 @item acl_show @var{aclname}
1243 List all the matching rules in the access control list, and the default
1244 policy. There are currently two named access control lists,
1245 @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1246 certificate distinguished name, and SASL username respectively.
1250 .name = "acl_policy
",
1251 .args_type = "aclname
:s
,policy
:s
",
1252 .params = "aclname allow|deny
",
1253 .help = "set
default access control list policy
",
1254 .mhandler.cmd = do_acl_policy,
1258 @item acl_policy @var{aclname} @code{allow|deny}
1260 Set the default access control list policy, used in the event that
1261 none of the explicit rules match. The default policy at startup is
1267 .args_type = "aclname
:s
,match
:s
,policy
:s
,index
:i?
",
1268 .params = "aclname match allow|deny
[index
]",
1269 .help = "add a match rule to the access control list
",
1270 .mhandler.cmd = do_acl_add,
1274 @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1276 Add a match rule to the access control list, allowing or denying access.
1277 The match will normally be an exact username or x509 distinguished name,
1278 but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1279 allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1280 normally be appended to the end of the ACL, but can be inserted
1281 earlier in the list if the optional @var{index} parameter is supplied.
1285 .name = "acl_remove
",
1286 .args_type = "aclname
:s
,match
:s
",
1287 .params = "aclname match
",
1288 .help = "remove a match rule from the access control list
",
1289 .mhandler.cmd = do_acl_remove,
1293 @item acl_remove @var{aclname} @var{match}
1295 Remove the specified match rule from the access control list.
1299 .name = "acl_reset
",
1300 .args_type = "aclname
:s
",
1301 .params = "aclname
",
1302 .help = "reset the access control list
",
1303 .mhandler.cmd = do_acl_reset,
1307 @item acl_reset @var{aclname}
1309 Remove all matches from the access control list, and set the default
1310 policy back to @code{deny}.
1314 .name = "nbd_server_start
",
1315 .args_type = "all
:-a
,writable
:-w
,uri
:s
",
1316 .params = "nbd_server_start
[-a
] [-w
] host
:port
",
1317 .help = "serve block devices on the given host and port
",
1318 .mhandler.cmd = hmp_nbd_server_start,
1321 @item nbd_server_start @var{host}:@var{port}
1322 @findex nbd_server_start
1323 Start an NBD server on the given host and/or port. If the @option{-a}
1324 option is included, all of the virtual machine's block devices that
1325 have an inserted media on them are automatically exported; in this case,
1326 the @option{-w} option makes the devices writable too.
1330 .name = "nbd_server_add
",
1331 .args_type = "writable
:-w
,device
:B
",
1332 .params = "nbd_server_add
[-w
] device
",
1333 .help = "export a block device via NBD
",
1334 .mhandler.cmd = hmp_nbd_server_add,
1337 @item nbd_server_add @var{device}
1338 @findex nbd_server_add
1339 Export a block device through QEMU's NBD server, which must be started
1340 beforehand with @command{nbd_server_start}. The @option{-w} option makes the
1341 exported device writable too.
1345 .name = "nbd_server_stop
",
1347 .params = "nbd_server_stop
",
1348 .help = "stop serving block devices
using the NBD protocol
",
1349 .mhandler.cmd = hmp_nbd_server_stop,
1352 @item nbd_server_stop
1353 @findex nbd_server_stop
1354 Stop the QEMU embedded NBD server.
1358 #if defined(TARGET_I386)
1362 .args_type = "broadcast
:-b
,cpu_index
:i
,bank
:i
,status
:l
,mcg_status
:l
,addr
:l
,misc
:l
",
1363 .params = "[-b
] cpu bank status mcgstatus addr misc
",
1364 .help = "inject a MCE on the given CPU
[and broadcast to other CPUs with
-b option
]",
1365 .mhandler.cmd = do_inject_mce,
1370 @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1372 Inject an MCE on the given CPU (x86 only).
1377 .args_type = "fdname
:s
",
1378 .params = "getfd name
",
1379 .help = "receive a file descriptor via SCM rights and assign it a name
",
1380 .mhandler.cmd = hmp_getfd,
1384 @item getfd @var{fdname}
1386 If a file descriptor is passed alongside this command using the SCM_RIGHTS
1387 mechanism on unix sockets, it is stored using the name @var{fdname} for
1388 later use by other monitor commands.
1393 .args_type = "fdname
:s
",
1394 .params = "closefd name
",
1395 .help = "close a file descriptor previously passed via SCM rights
",
1396 .mhandler.cmd = hmp_closefd,
1400 @item closefd @var{fdname}
1402 Close the file descriptor previously assigned to @var{fdname} using the
1403 @code{getfd} command. This is only needed if the file descriptor was never
1404 used by another monitor command.
1408 .name = "block_passwd
",
1409 .args_type = "device
:B
,password
:s
",
1410 .params = "block_passwd device password
",
1411 .help = "set the password of encrypted block devices
",
1412 .mhandler.cmd = hmp_block_passwd,
1416 @item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
1417 @findex block_set_io_throttle
1418 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}
1422 .name = "block_set_io_throttle
",
1423 .args_type = "device
:B
,bps
:l
,bps_rd
:l
,bps_wr
:l
,iops
:l
,iops_rd
:l
,iops_wr
:l
",
1424 .params = "device bps bps_rd bps_wr iops iops_rd iops_wr
",
1425 .help = "change I
/O throttle limits
for a block drive
",
1426 .mhandler.cmd = hmp_block_set_io_throttle,
1430 @item block_passwd @var{device} @var{password}
1431 @findex block_passwd
1432 Set the encrypted device @var{device} password to @var{password}
1436 .name = "set_password
",
1437 .args_type = "protocol
:s
,password
:s
,connected
:s?
",
1438 .params = "protocol password action
-if-connected
",
1439 .help = "set spice
/vnc password
",
1440 .mhandler.cmd = hmp_set_password,
1444 @item set_password [ vnc | spice ] password [ action-if-connected ]
1445 @findex set_password
1447 Change spice/vnc password. Use zero to make the password stay valid
1448 forever. @var{action-if-connected} specifies what should happen in
1449 case a connection is established: @var{fail} makes the password change
1450 fail. @var{disconnect} changes the password and disconnects the
1451 client. @var{keep} changes the password and keeps the connection up.
1452 @var{keep} is the default.
1456 .name = "expire_password
",
1457 .args_type = "protocol
:s
,time
:s
",
1458 .params = "protocol time
",
1459 .help = "set spice
/vnc password expire
-time
",
1460 .mhandler.cmd = hmp_expire_password,
1464 @item expire_password [ vnc | spice ] expire-time
1465 @findex expire_password
1467 Specify when a password for spice/vnc becomes
1468 invalid. @var{expire-time} accepts:
1472 Invalidate password instantly.
1475 Password stays valid forever.
1478 Password stays valid for @var{nsec} seconds starting now.
1481 Password is invalidated at the given time. @var{nsec} are the seconds
1482 passed since 1970, i.e. unix epoch.
1488 .name = "chardev
-add
",
1489 .args_type = "args
:s
",
1491 .help = "add chardev
",
1492 .mhandler.cmd = hmp_chardev_add,
1496 @item chardev_add args
1499 chardev_add accepts the same parameters as the -chardev command line switch.
1504 .name = "chardev
-remove
",
1505 .args_type = "id
:s
",
1507 .help = "remove chardev
",
1508 .mhandler.cmd = hmp_chardev_remove,
1512 @item chardev_remove id
1513 @findex chardev_remove
1515 Removes the chardev @var{id}.
1521 .args_type = "item
:s?
",
1522 .params = "[subcommand
]",
1523 .help = "show various information about the system state
",
1524 .mhandler.cmd = do_info_help,
1525 .sub_table = info_cmds,
1529 @item info @var{subcommand}
1531 Show various information about the system state.
1535 show the version of QEMU
1537 show the various VLANs and the associated devices
1539 show the character devices
1541 show the block devices
1542 @item info blockstats
1543 show block device statistics
1544 @item info registers
1545 show the cpu registers
1547 show infos for each CPU
1549 show the command line history
1551 show the interrupts statistics (if available)
1553 show i8259 (PIC) state
1555 show emulated PCI device info
1557 show virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only)
1559 show the active virtual memory mappings (i386 only)
1561 show dynamic compiler info
1563 show NUMA information
1565 show KVM information
1567 show USB devices plugged on the virtual USB hub
1569 show all USB host devices
1571 show profiling information
1573 show information about active capturing
1574 @item info snapshots
1575 show list of VM snapshots
1577 show the current VM status (running|paused)
1579 show guest PCMCIA status
1581 show which guest mouse is receiving events
1583 show the vnc server status
1585 show the current VM name
1587 show the current VM UUID
1591 show user network stack connection states
1593 show migration status
1594 @item info migrate_capabilities
1595 show current migration capabilities
1596 @item info migrate_cache_size
1597 show current migration XBZRLE cache size
1599 show balloon information
1603 show qdev device model list
1610 @item info trace-events
1611 show available trace events and their state