1 HXCOMM Use
DEFHEADING() to define headings
in both help text and rST
.
2 HXCOMM Text between SRST and ERST is copied to the rST 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 rST and C
.
11 .args_type
= "name:S?",
13 .help
= "show the help",
19 ``help`` or ``?``
[*cmd
*]
20 Show the help
for all commands or just
for command
*cmd
*.
25 .args_type
= "device:B",
26 .params
= "device|all",
27 .help
= "commit changes to the disk images (if -snapshot is used) or backing files",
33 Commit changes to the disk
images (if -snapshot is used
) or backing files
.
34 If the backing file is smaller than the snapshot
, then the backing file
35 will be resized to be the same size as the snapshot
. If the snapshot is
36 smaller than the backing file
, the backing file will not be truncated
.
37 If you want the backing file to match the size of the smaller snapshot
,
38 you can safely truncate it yourself once the commit operation successfully
46 .help
= "quit the emulator",
57 .name
= "exit_preconfig",
60 .help
= "exit the preconfig state",
61 .cmd
= hmp_exit_preconfig
,
67 This command makes QEMU exit the preconfig state and proceed with
68 VM initialization
using configuration data provided on the command line
69 and via the QMP monitor during the preconfig state
. The command is only
70 available during the preconfig
state (i
.e
. when the
--preconfig command
71 line option was
in use
).
75 .name
= "block_resize",
76 .args_type
= "device:B,size:o",
77 .params
= "device size",
78 .help
= "resize a block image",
79 .cmd
= hmp_block_resize
,
85 Resize a block image
while a guest is running
. Usually requires guest
86 action to see the updated size
. Resize to a lower size is supported
,
87 but should be used with extreme caution
. Note that
this command only
88 resizes image files
, it can not resize block devices like LVM volumes
.
92 .name
= "block_stream",
93 .args_type
= "device:B,speed:o?,base:s?",
94 .params
= "device [speed [base]]",
95 .help
= "copy data from a backing file into a block device",
96 .cmd
= hmp_block_stream
,
101 Copy data from a backing file into a block device
.
105 .name
= "block_job_set_speed",
106 .args_type
= "device:B,speed:o",
107 .params
= "device speed",
108 .help
= "set maximum speed for a background block operation",
109 .cmd
= hmp_block_job_set_speed
,
113 ``block_job_set_speed``
114 Set maximum speed
for a background block operation
.
118 .name
= "block_job_cancel",
119 .args_type
= "force:-f,device:B",
120 .params
= "[-f] device",
121 .help
= "stop an active background block operation (use -f"
122 "\n\t\t\t if you want to abort the operation immediately"
123 "\n\t\t\t instead of keep running until data is in sync)",
124 .cmd
= hmp_block_job_cancel
,
129 Stop an active background block
operation (streaming
, mirroring
).
133 .name
= "block_job_complete",
134 .args_type
= "device:B",
136 .help
= "stop an active background block operation",
137 .cmd
= hmp_block_job_complete
,
141 ``block_job_complete``
142 Manually trigger completion of an active background block operation
.
143 For mirroring
, this will
switch the device to the destination path
.
147 .name
= "block_job_pause",
148 .args_type
= "device:B",
150 .help
= "pause an active background block operation",
151 .cmd
= hmp_block_job_pause
,
156 Pause an active block streaming operation
.
160 .name
= "block_job_resume",
161 .args_type
= "device:B",
163 .help
= "resume a paused background block operation",
164 .cmd
= hmp_block_job_resume
,
169 Resume a paused block streaming operation
.
174 .args_type
= "force:-f,device:B",
175 .params
= "[-f] device",
176 .help
= "eject a removable medium (use -f to force it)",
181 ``eject
[-f
]``
*device
*
182 Eject a removable
medium (use
-f to force it
).
189 .help
= "remove host block device",
190 .cmd
= hmp_drive_del
,
194 ``drive_del``
*device
*
195 Remove host block device
. The result is that guest generated IO is no longer
196 submitted against the host device underlying the disk
. Once a drive has
197 been deleted
, the QEMU Block layer returns
-EIO which results
in IO
198 errors
in the guest
for applications that are reading
/writing to the device
.
199 These errors are always reported to the guest
, regardless of the drive
's error
200 actions (drive options rerror, werror).
205 .args_type = "device:B,target:F,arg:s?,read-only-mode:s?",
206 .params = "device filename [format [read-only-mode]]",
207 .help = "change a removable medium, optional format",
212 ``change`` *device* *setting*
213 Change the configuration of a device.
215 ``change`` *diskdevice* *filename* [*format* [*read-only-mode*]]
216 Change the medium for a removable disk device to point to *filename*. eg::
218 (qemu) change ide1-cd0 /path/to/some.iso
220 *format* is optional.
222 *read-only-mode* may be used to change the read-only status of the device.
223 It accepts the following values:
226 Retains the current status; this is the default.
229 Makes the device read-only.
232 Makes the device writable.
234 ``change vnc password`` [*password*]
236 Change the password associated with the VNC server. If the new password
237 is not supplied, the monitor will prompt for it to be entered. VNC
238 passwords are only significant up to 8 letters. eg::
240 (qemu) change vnc password
246 .name = "screendump",
247 .args_type = "filename:F,format:-fs,device:s?,head:i?",
248 .params = "filename [-f format] [device [head]]",
249 .help = "save screen from head 'head
' of display device 'device
'"
250 "in specified format 'format
' as image 'filename
'."
251 "Currently only 'png
' and 'ppm
' formats are supported.",
252 .cmd = hmp_screendump,
257 ``screendump`` *filename*
258 Save screen into PPM image *filename*.
263 .args_type = "filename:F",
264 .params = "filename",
265 .help = "output logs to 'filename
'",
270 ``logfile`` *filename*
271 Output logs to *filename*.
275 .name = "trace-event",
276 .args_type = "name:s,option:b,vcpu:i?",
277 .params = "name on|off [vcpu]",
278 .help = "changes status of a specific trace event "
279 "(vcpu: vCPU to set, default is all)",
280 .cmd = hmp_trace_event,
281 .command_completion = trace_event_completion,
286 changes status of a trace event
289 #if defined(CONFIG_TRACE_SIMPLE)
291 .name = "trace-file",
292 .args_type = "op:s?,arg:F?",
293 .params = "on|off|flush|set [arg]",
294 .help = "open, close, or flush trace file, or set a new file name",
295 .cmd = hmp_trace_file,
299 ``trace-file on|off|flush``
300 Open, close, or flush the trace file. If no argument is given, the
301 status of the trace file is displayed.
307 .args_type = "items:s",
308 .params = "item1[,...]",
309 .help = "activate logging of the specified items",
314 ``log`` *item1*\ [,...]
315 Activate logging of the specified items.
320 .args_type = "name:s?",
322 .help = "save a VM snapshot. If no tag is provided, a new snapshot is created",
328 Create a snapshot of the whole virtual machine. If *tag* is
329 provided, it is used as human readable identifier. If there is already
330 a snapshot with the same tag, it is replaced. More info at
331 :ref:`vm_005fsnapshots`.
333 Since 4.0, savevm stopped allowing the snapshot id to be set, accepting
334 only *tag* as parameter.
339 .args_type = "name:s",
341 .help = "restore a VM snapshot from its tag",
343 .command_completion = loadvm_completion,
348 Set the whole virtual machine to the snapshot identified by the tag
351 Since 4.0, loadvm stopped accepting snapshot id as parameter.
356 .args_type = "name:s",
358 .help = "delete a VM snapshot from its tag",
360 .command_completion = delvm_completion,
365 Delete the snapshot identified by *tag*.
367 Since 4.0, delvm stopped deleting snapshots by snapshot id, accepting
368 only *tag* as parameter.
372 .name = "singlestep",
373 .args_type = "option:s?",
374 .params = "[on|off]",
375 .help = "run emulation in singlestep mode or switch to normal mode",
376 .cmd = hmp_singlestep,
381 Run the emulation in single step mode.
382 If called with option off, the emulation returns to normal mode.
389 .help = "stop emulation",
402 .help = "resume emulation",
412 .name = "system_wakeup",
415 .help = "wakeup guest from suspend",
416 .cmd = hmp_system_wakeup,
421 Wakeup guest from suspend.
426 .args_type = "device:s?",
427 .params = "[device]",
428 .help = "start gdbserver on given device (default 'tcp
::1234'), stop with 'none
'",
429 .cmd = hmp_gdbserver,
433 ``gdbserver`` [*port*]
434 Start gdbserver session (default *port*\=1234)
439 .args_type = "fmt:/,addr:l",
440 .params = "/fmt addr",
441 .help = "virtual memory dump starting at 'addr
'",
442 .cmd = hmp_memory_dump,
447 Virtual memory dump starting at *addr*.
452 .args_type = "fmt:/,addr:l",
453 .params = "/fmt addr",
454 .help = "physical memory dump starting at 'addr
'",
455 .cmd = hmp_physical_memory_dump,
459 ``xp /``\ *fmt* *addr*
460 Physical memory dump starting at *addr*.
462 *fmt* is a format which tells the command how to format the
463 data. Its syntax is: ``/{count}{format}{size}``
466 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).
471 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
472 ``h`` or ``w`` can be specified with the ``i`` format to
473 respectively select 16 or 32 bit code instruction size.
477 Dump 10 instructions at the current instruction pointer::
482 0x90107065: lea 0x0(%esi,1),%esi
483 0x90107069: lea 0x0(%edi,1),%edi
485 0x90107071: jmp 0x90107080
491 Dump 80 16 bit values at the start of the video memory::
493 (qemu) xp/80hx 0xb8000
494 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
495 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
496 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
497 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
498 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
499 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
500 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
501 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
502 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
503 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
509 .args_type = "addr:l",
511 .help = "print the host virtual address corresponding to a guest physical address",
517 Print the host virtual address at which the guest's physical address
*addr
*
524 .args_type
= "addr:l",
526 .help
= "print the host physical address corresponding to a guest physical address",
533 Print the host physical address at which the guest
's physical address *addr*
539 .args_type = "addr:l",
541 .help = "print the guest physical address corresponding to a guest virtual address",
547 Print the guest physical address at which the guest's virtual address
*addr
*
548 is mapped based on the mapping
for the current CPU
.
553 .args_type
= "fmt:/,val:l",
554 .params
= "/fmt expr",
555 .help
= "print expression value (use $reg for CPU register access)",
560 ``print`` or ``p
/``\
*fmt
* *expr
*
561 Print expression value
. Only the
*format
* part of
*fmt
* is
567 .args_type
= "fmt:/,addr:i,index:i.",
568 .params
= "/fmt addr",
569 .help
= "I/O port read",
570 .cmd
= hmp_ioport_read
,
574 ``i
/``\
*fmt
* *addr
* [.\
*index
*\
]
580 .args_type
= "fmt:/,addr:i,val:i",
581 .params
= "/fmt addr value",
582 .help
= "I/O port write",
583 .cmd
= hmp_ioport_write
,
587 ``o
/``\
*fmt
* *addr
* *val
*
593 .args_type
= "keys:s,hold-time:i?",
594 .params
= "keys [hold_ms]",
595 .help
= "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
597 .command_completion
= sendkey_completion
,
602 Send
*keys
* to the guest
. *keys
* could be the name of the
603 key or the raw value
in hexadecimal format
. Use ``
-`` to press
604 several keys simultaneously
. Example
::
608 This command is useful to send keys that your graphical user
interface
609 intercepts at low level
, such as ``ctrl
-alt
-f1``
in X Window
.
612 .name
= "sync-profile",
613 .args_type
= "op:s?",
614 .params
= "[on|off|reset]",
615 .help
= "enable, disable or reset synchronization profiling. "
616 "With no arguments, prints whether profiling is on or off.",
617 .cmd
= hmp_sync_profile
,
621 ``sync
-profile
[on|off|reset
]``
622 Enable
, disable or reset synchronization profiling
. With no arguments
, prints
623 whether profiling is on or off
.
627 .name
= "system_reset",
630 .help
= "reset the system",
631 .cmd
= hmp_system_reset
,
640 .name
= "system_powerdown",
643 .help
= "send system power down event",
644 .cmd
= hmp_system_powerdown
,
649 Power down the
system (if supported
).
654 .args_type
= "start:i,size:i",
655 .params
= "addr size",
656 .help
= "compute the checksum of a memory region",
661 ``sum``
*addr
* *size
*
662 Compute the checksum of a memory region
.
666 .name
= "device_add",
667 .args_type
= "device:O",
668 .params
= "driver[,prop=value][,...]",
669 .help
= "add device, like -device on the command line",
670 .cmd
= hmp_device_add
,
671 .command_completion
= device_add_completion
,
675 ``device_add``
*config
*
680 .name
= "device_del",
683 .help
= "remove device",
684 .cmd
= hmp_device_del
,
685 .command_completion
= device_del_completion
,
690 Remove device
*id
*. *id
* may be a short ID
691 or a QOM object path
.
696 .args_type
= "index:i",
698 .help
= "set the default CPU",
708 .name
= "mouse_move",
709 .args_type
= "dx_str:s,dy_str:s,dz_str:s?",
710 .params
= "dx dy [dz]",
711 .help
= "send mouse move events",
712 .cmd
= hmp_mouse_move
,
716 ``mouse_move``
*dx
* *dy
* [*dz
*]
717 Move the active mouse to the specified coordinates
*dx
* *dy
*
718 with optional scroll axis
*dz
*.
722 .name
= "mouse_button",
723 .args_type
= "button_state:i",
725 .help
= "change mouse button state (1=L, 2=M, 4=R)",
726 .cmd
= hmp_mouse_button
,
730 ``mouse_button``
*val
*
731 Change the active mouse button state
*val
* (1=L
, 2=M
, 4=R
).
736 .args_type
= "index:i",
738 .help
= "set which mouse device receives events",
739 .cmd
= hmp_mouse_set
,
743 ``mouse_set``
*index
*
744 Set which mouse device receives events at given
*index
*, index
745 can be obtained with
::
752 .name
= "wavcapture",
753 .args_type
= "path:F,audiodev:s,freq:i?,bits:i?,nchannels:i?",
754 .params
= "path audiodev [frequency [bits [channels]]]",
755 .help
= "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
756 .cmd
= hmp_wavcapture
,
759 ``wavcapture``
*filename
* *audiodev
* [*frequency
* [*bits
* [*channels
*]]]
760 Capture audio into
*filename
* from
*audiodev
*, using sample rate
761 *frequency
* bits per sample
*bits
* and number of channels
766 - Sample rate
= 44100 Hz
- CD quality
768 - Number of channels
= 2 - Stereo
772 .name
= "stopcapture",
774 .params
= "capture index",
775 .help
= "stop capture",
776 .cmd
= hmp_stopcapture
,
779 ``stopcapture``
*index
*
780 Stop capture with a given
*index
*, index can be obtained with
::
788 .args_type
= "val:l,size:i,filename:s",
789 .params
= "addr size file",
790 .help
= "save to disk virtual memory dump starting at 'addr' of size 'size'",
795 ``memsave``
*addr
* *size
* *file
*
796 save to disk virtual memory dump starting at
*addr
* of size
*size
*.
801 .args_type
= "val:l,size:i,filename:s",
802 .params
= "addr size file",
803 .help
= "save to disk physical memory dump starting at 'addr' of size 'size'",
808 ``pmemsave``
*addr
* *size
* *file
*
809 save to disk physical memory dump starting at
*addr
* of size
*size
*.
814 .args_type
= "bootdevice:s",
815 .params
= "bootdevice",
816 .help
= "define new values for the boot device list",
821 ``boot_set``
*bootdevicelist
*
822 Define
new values
for the boot device list
. Those values will
override
823 the values specified on the command line through the ``
-boot`` option
.
825 The values that can be specified
here depend on the machine type
, but are
826 the same that can be specified
in the ``
-boot`` command line option
.
833 .help
= "inject an NMI",
838 Inject an NMI on the
default CPU (x86
/s390
) or all
CPUs (ppc64
).
842 .name
= "ringbuf_write",
843 .args_type
= "device:s,data:s",
844 .params
= "device data",
845 .help
= "Write to a ring buffer character device",
846 .cmd
= hmp_ringbuf_write
,
847 .command_completion
= ringbuf_write_completion
,
851 ``ringbuf_write``
*device
* *data
*
852 Write
*data
* to ring buffer character device
*device
*.
853 *data
* must be a UTF
-8 string
.
857 .name
= "ringbuf_read",
858 .args_type
= "device:s,size:i",
859 .params
= "device size",
860 .help
= "Read from a ring buffer character device",
861 .cmd
= hmp_ringbuf_read
,
862 .command_completion
= ringbuf_write_completion
,
866 ``ringbuf_read``
*device
*
867 Read and print up to
*size
* bytes from ring buffer character
869 Certain non
-printable characters are printed ``\uXXXX``
, where ``XXXX`` is the
870 character code
in hexadecimal
. Character ``\`` is printed ``
\\``
.
871 Bug
: can screw up when the buffer contains invalid UTF
-8 sequences
,
872 NUL characters
, after the ring buffer lost data
, and when reading
873 stops because the size limit is reached
.
877 .name
= "announce_self",
878 .args_type
= "interfaces:s?,id:s?",
879 .params
= "[interfaces] [id]",
880 .help
= "Trigger GARP/RARP announcements",
881 .cmd
= hmp_announce_self
,
886 Trigger a round of GARP
/RARP broadcasts
; this is useful
for explicitly
887 updating the network infrastructure after a reconfiguration or some forms
888 of migration
. The timings of the round are set by the migration announce
889 parameters
. An optional comma separated
*interfaces
* list restricts the
890 announce to the named set of interfaces
. An optional
*id
* can be used to
891 start a separate announce timer and to change the parameters of it later
.
896 .args_type
= "detach:-d,blk:-b,inc:-i,resume:-r,uri:s",
897 .params
= "[-d] [-b] [-i] [-r] uri",
898 .help
= "migrate to URI (using -d to not wait for completion)"
899 "\n\t\t\t -b for migration without shared storage with"
900 " full copy of disk\n\t\t\t -i for migration without "
901 "shared storage with incremental copy of disk "
902 "(base image shared between src and destination)"
903 "\n\t\t\t -r to resume a paused migration",
909 ``migrate
[-d
] [-b
] [-i
]``
*uri
*
910 Migrate to
*uri
* (using -d to not wait
for completion
).
913 for migration with full copy of disk
915 for migration with incremental copy of
disk (base image is shared
)
919 .name
= "migrate_cancel",
922 .help
= "cancel the current VM migration",
923 .cmd
= hmp_migrate_cancel
,
928 Cancel the current VM migration
.
932 .name
= "migrate_continue",
933 .args_type
= "state:s",
935 .help
= "Continue migration from the given paused state",
936 .cmd
= hmp_migrate_continue
,
939 ``migrate_continue``
*state
*
940 Continue migration from the paused state
*state
*
944 .name
= "migrate_incoming",
945 .args_type
= "uri:s",
947 .help
= "Continue an incoming migration from an -incoming defer",
948 .cmd
= hmp_migrate_incoming
,
952 ``migrate_incoming``
*uri
*
953 Continue an incoming migration
using the
*uri
* (that has the same syntax
954 as the ``
-incoming`` option
).
958 .name
= "migrate_recover",
959 .args_type
= "uri:s",
961 .help
= "Continue a paused incoming postcopy migration",
962 .cmd
= hmp_migrate_recover
,
966 ``migrate_recover``
*uri
*
967 Continue a paused incoming postcopy migration
using the
*uri
*.
971 .name
= "migrate_pause",
974 .help
= "Pause an ongoing migration (postcopy-only)",
975 .cmd
= hmp_migrate_pause
,
980 Pause an ongoing migration
. Currently it only supports postcopy
.
984 .name
= "migrate_set_capability",
985 .args_type
= "capability:s,state:b",
986 .params
= "capability state",
987 .help
= "Enable/Disable the usage of a capability for migration",
988 .cmd
= hmp_migrate_set_capability
,
989 .command_completion
= migrate_set_capability_completion
,
993 ``migrate_set_capability``
*capability
* *state
*
994 Enable
/Disable the usage of a capability
*capability
* for migration
.
998 .name
= "migrate_set_parameter",
999 .args_type
= "parameter:s,value:s",
1000 .params
= "parameter value",
1001 .help
= "Set the parameter for migration",
1002 .cmd
= hmp_migrate_set_parameter
,
1003 .command_completion
= migrate_set_parameter_completion
,
1007 ``migrate_set_parameter``
*parameter
* *value
*
1008 Set the parameter
*parameter
* for migration
.
1012 .name
= "migrate_start_postcopy",
1015 .help
= "Followup to a migration command to switch the migration"
1016 " to postcopy mode. The postcopy-ram capability must "
1017 "be set on both source and destination before the "
1018 "original migration command .",
1019 .cmd
= hmp_migrate_start_postcopy
,
1023 ``migrate_start_postcopy``
1024 Switch
in-progress migration to postcopy mode
. Ignored after the end of
1025 migration (or once already
in postcopy
).
1029 .name
= "x_colo_lost_heartbeat",
1032 .help
= "Tell COLO that heartbeat is lost,\n\t\t\t"
1033 "a failover or takeover is needed.",
1034 .cmd
= hmp_x_colo_lost_heartbeat
,
1038 ``x_colo_lost_heartbeat``
1039 Tell COLO that heartbeat is lost
, a failover or takeover is needed
.
1043 .name
= "client_migrate_info",
1044 .args_type
= "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
1045 .params
= "protocol hostname port tls-port cert-subject",
1046 .help
= "set migration information for remote display",
1047 .cmd
= hmp_client_migrate_info
,
1051 ``client_migrate_info``
*protocol
* *hostname
* *port
* *tls
-port
* *cert
-subject
*
1052 Set migration information
for remote display
. This makes the server
1053 ask the client to automatically reconnect
using the
new parameters
1054 once migration finished successfully
. Only implemented
for SPICE
.
1058 .name
= "dump-guest-memory",
1059 .args_type
= "paging:-p,detach:-d,windmp:-w,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?",
1060 .params
= "[-p] [-d] [-z|-l|-s|-w] filename [begin length]",
1061 .help
= "dump guest memory into file 'filename'.\n\t\t\t"
1062 "-p: do paging to get guest's memory mapping.\n\t\t\t"
1063 "-d: return immediately (do not wait for completion).\n\t\t\t"
1064 "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
1065 "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
1066 "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
1067 "-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),\n\t\t\t"
1068 " for Windows x64 guests with vmcoreinfo driver only.\n\t\t\t"
1069 "begin: the starting physical address.\n\t\t\t"
1070 "length: the memory size, in bytes.",
1071 .cmd
= hmp_dump_guest_memory
,
1075 ``dump
-guest
-memory
[-p
]``
*filename
* *begin
* *length
*
1077 ``dump
-guest
-memory
[-z|
-l|
-s|
-w
]``
*filename
*
1078 Dump guest memory to
*protocol
*. The file can be processed with crash or
1079 gdb
. Without ``
-z|
-l|
-s|
-w``
, the dump format is ELF
.
1082 do paging to get guest
's memory mapping.
1084 dump in kdump-compressed format, with zlib compression.
1086 dump in kdump-compressed format, with lzo compression.
1088 dump in kdump-compressed format, with snappy compression.
1090 dump in Windows crashdump format (can be used instead of ELF-dump converting),
1091 for Windows x64 guests with vmcoreinfo driver only
1095 the starting physical address. It's optional
, and should be
1096 specified together with
*length
*.
1098 the memory size
, in bytes
. It
's optional, and should be specified
1099 together with *begin*.
1103 #if defined(TARGET_S390X)
1105 .name = "dump-skeys",
1106 .args_type = "filename:F",
1108 .help = "Save guest storage keys into file 'filename
'.\n",
1109 .cmd = hmp_dump_skeys,
1114 ``dump-skeys`` *filename*
1115 Save guest storage keys to a file.
1118 #if defined(TARGET_S390X)
1120 .name = "migration_mode",
1121 .args_type = "mode:i",
1123 .help = "Enables or disables migration mode\n",
1124 .cmd = hmp_migrationmode,
1129 ``migration_mode`` *mode*
1130 Enables or disables migration mode.
1134 .name = "snapshot_blkdev",
1135 .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
1136 .params = "[-n] device [new-image-file] [format]",
1137 .help = "initiates a live snapshot\n\t\t\t"
1138 "of device. If a new image file is specified, the\n\t\t\t"
1139 "new image file will become the new root image.\n\t\t\t"
1140 "If format is specified, the snapshot file will\n\t\t\t"
1141 "be created in that format.\n\t\t\t"
1142 "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
1143 "to reuse the image found in new-image-file, instead of\n\t\t\t"
1144 "recreating it from scratch.",
1145 .cmd = hmp_snapshot_blkdev,
1150 Snapshot device, using snapshot file as target if provided
1154 .name = "snapshot_blkdev_internal",
1155 .args_type = "device:B,name:s",
1156 .params = "device name",
1157 .help = "take an internal snapshot of device.\n\t\t\t"
1158 "The format of the image used by device must\n\t\t\t"
1159 "support it, such as qcow2.\n\t\t\t",
1160 .cmd = hmp_snapshot_blkdev_internal,
1164 ``snapshot_blkdev_internal``
1165 Take an internal snapshot on device if it support
1169 .name = "snapshot_delete_blkdev_internal",
1170 .args_type = "device:B,name:s,id:s?",
1171 .params = "device name [id]",
1172 .help = "delete an internal snapshot of device.\n\t\t\t"
1173 "If id is specified, qemu will try delete\n\t\t\t"
1174 "the snapshot matching both id and name.\n\t\t\t"
1175 "The format of the image used by device must\n\t\t\t"
1176 "support it, such as qcow2.\n\t\t\t",
1177 .cmd = hmp_snapshot_delete_blkdev_internal,
1181 ``snapshot_delete_blkdev_internal``
1182 Delete an internal snapshot on device if it support
1186 .name = "drive_mirror",
1187 .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
1188 .params = "[-n] [-f] device target [format]",
1189 .help = "initiates live storage\n\t\t\t"
1190 "migration for a device. The device's contents are
\n\t\t\t"
1191 "copied to the
new image file
, including data that
\n\t\t\t"
1192 "is written after the command is started
.\n\t\t\t"
1193 "The
-n flag requests QEMU to reuse the image found
\n\t\t\t"
1194 "in new-image
-file
, instead of recreating it from scratch
.\n\t\t\t"
1195 "The
-f flag requests QEMU to copy the whole disk
,\n\t\t\t"
1196 "so that the result does not need a backing file
.\n\t\t\t",
1197 .cmd = hmp_drive_mirror,
1201 Start mirroring a block device's writes to a new destination,
1202 using the specified target.
1206 .name = "drive_backup
",
1207 .args_type = "reuse
:-n
,full
:-f
,compress
:-c
,device
:B
,target
:s
,format
:s?
",
1208 .params = "[-n
] [-f
] [-c
] device target
[format
]",
1209 .help = "initiates a point
-in-time
\n\t\t\t"
1210 "copy
for a device
. The device
's contents are\n\t\t\t"
1211 "copied to the new image file, excluding data that\n\t\t\t"
1212 "is written after the command is started.\n\t\t\t"
1213 "The -n flag requests QEMU to reuse the image found\n\t\t\t"
1214 "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
1215 "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
1216 "so that the result does not need a backing file.\n\t\t\t"
1217 "The -c flag requests QEMU to compress backup data\n\t\t\t"
1218 "(if the target format supports it).\n\t\t\t",
1219 .cmd = hmp_drive_backup,
1223 Start a point-in-time copy of a block device to a specified target.
1227 .name = "drive_add",
1228 .args_type = "node:-n,pci_addr:s,opts:s",
1229 .params = "[-n] [[<domain>:]<bus>:]<slot>\n"
1230 "[file=file][,if=type][,bus=n]\n"
1231 "[,unit=m][,media=d][,index=i]\n"
1232 "[,snapshot=on|off][,cache=on|off]\n"
1233 "[,readonly=on|off][,copy-on-read=on|off]",
1234 .help = "add drive to PCI storage controller",
1235 .cmd = hmp_drive_add,
1240 Add drive to PCI storage controller.
1244 .name = "pcie_aer_inject_error",
1245 .args_type = "advisory_non_fatal:-a,correctable:-c,"
1246 "id:s,error_status:s,"
1247 "header0:i?,header1:i?,header2:i?,header3:i?,"
1248 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
1249 .params = "[-a] [-c] id "
1250 "<error_status> [<tlp header> [<tlp header prefix>]]",
1251 .help = "inject pcie aer error\n\t\t\t"
1252 " -a for advisory non fatal error\n\t\t\t"
1253 " -c for correctable error\n\t\t\t"
1254 "<id> = qdev device id\n\t\t\t"
1255 "<error_status> = error string or 32bit\n\t\t\t"
1256 "<tlp header> = 32bit x 4\n\t\t\t"
1257 "<tlp header prefix> = 32bit x 4",
1258 .cmd = hmp_pcie_aer_inject_error,
1262 ``pcie_aer_inject_error``
1263 Inject PCIe AER error
1267 .name = "netdev_add",
1268 .args_type = "netdev:O",
1269 .params = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
1270 .help = "add host network device",
1271 .cmd = hmp_netdev_add,
1272 .command_completion = netdev_add_completion,
1278 Add host network device.
1282 .name = "netdev_del",
1283 .args_type = "id:s",
1285 .help = "remove host network device",
1286 .cmd = hmp_netdev_del,
1287 .command_completion = netdev_del_completion,
1293 Remove host network device.
1297 .name = "object_add",
1298 .args_type = "object:S",
1299 .params = "[qom-type=]type,id=str[,prop=value][,...]",
1300 .help = "create QOM object",
1301 .cmd = hmp_object_add,
1302 .command_completion = object_add_completion,
1312 .name = "object_del",
1313 .args_type = "id:s",
1315 .help = "destroy QOM object",
1316 .cmd = hmp_object_del,
1317 .command_completion = object_del_completion,
1328 .name = "hostfwd_add",
1329 .args_type = "arg1:s,arg2:s?",
1330 .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
1331 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
1332 .cmd = hmp_hostfwd_add,
1337 Redirect TCP or UDP connections from host to guest (requires -net user).
1342 .name = "hostfwd_remove",
1343 .args_type = "arg1:s,arg2:s?",
1344 .params = "[netdev_id] [tcp|udp]:[hostaddr]:hostport",
1345 .help = "remove host-to-guest TCP or UDP redirection",
1346 .cmd = hmp_hostfwd_remove,
1352 Remove host-to-guest TCP or UDP redirection.
1357 .args_type = "value:M",
1359 .help = "request VM to change its memory allocation (in MB)",
1365 Request VM to change its memory allocation to *value* (in MB).
1370 .args_type = "name:s,up:b",
1371 .params = "name on|off",
1372 .help = "change the link status of a network adapter",
1373 .cmd = hmp_set_link,
1374 .command_completion = set_link_completion,
1378 ``set_link`` *name* ``[on|off]``
1379 Switch link *name* on (i.e. up) or off (i.e. down).
1383 .name = "watchdog_action",
1384 .args_type = "action:s",
1385 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1386 .help = "change watchdog action",
1387 .cmd = hmp_watchdog_action,
1388 .command_completion = watchdog_action_completion,
1393 Change watchdog action.
1397 .name = "nbd_server_start",
1398 .args_type = "all:-a,writable:-w,uri:s",
1399 .params = "nbd_server_start [-a] [-w] host:port",
1400 .help = "serve block devices on the given host and port",
1401 .cmd = hmp_nbd_server_start,
1404 ``nbd_server_start`` *host*:*port*
1405 Start an NBD server on the given host and/or port. If the ``-a``
1406 option is included, all of the virtual machine's block devices that
1407 have an inserted media on them are automatically exported
; in this case,
1408 the ``
-w`` option makes the devices writable too
.
1412 .name
= "nbd_server_add",
1413 .args_type
= "writable:-w,device:B,name:s?",
1414 .params
= "nbd_server_add [-w] device [name]",
1415 .help
= "export a block device via NBD",
1416 .cmd
= hmp_nbd_server_add
,
1419 ``nbd_server_add``
*device
* [ *name
* ]
1420 Export a block device through QEMU
's NBD server, which must be started
1421 beforehand with ``nbd_server_start``. The ``-w`` option makes the
1422 exported device writable too. The export name is controlled by *name*,
1423 defaulting to *device*.
1427 .name = "nbd_server_remove",
1428 .args_type = "force:-f,name:s",
1429 .params = "nbd_server_remove [-f] name",
1430 .help = "remove an export previously exposed via NBD",
1431 .cmd = hmp_nbd_server_remove,
1434 ``nbd_server_remove [-f]`` *name*
1435 Stop exporting a block device through QEMU's NBD server
, which was
1436 previously started with ``nbd_server_add``
. The ``
-f``
1437 option forces the server to drop the export immediately even
if
1438 clients are connected
; otherwise the command fails unless there are no
1443 .name
= "nbd_server_stop",
1445 .params
= "nbd_server_stop",
1446 .help
= "stop serving block devices using the NBD protocol",
1447 .cmd
= hmp_nbd_server_stop
,
1451 Stop the QEMU embedded NBD server
.
1455 #
if defined(TARGET_I386
)
1459 .args_type
= "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1460 .params
= "[-b] cpu bank status mcgstatus addr misc",
1461 .help
= "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
1467 ``mce``
*cpu
* *bank
* *status
* *mcgstatus
* *addr
* *misc
*
1468 Inject an MCE on the given
CPU (x86 only
).
1473 .args_type
= "fdname:s",
1474 .params
= "getfd name",
1475 .help
= "receive a file descriptor via SCM rights and assign it a name",
1481 If a file descriptor is passed alongside
this command
using the SCM_RIGHTS
1482 mechanism on unix sockets
, it is stored
using the name
*fdname
* for
1483 later use by other monitor commands
.
1488 .args_type
= "fdname:s",
1489 .params
= "closefd name",
1490 .help
= "close a file descriptor previously passed via SCM rights",
1495 ``closefd``
*fdname
*
1496 Close the file descriptor previously assigned to
*fdname
* using the
1497 ``getfd`` command
. This is only needed
if the file descriptor was
never
1498 used by another monitor command
.
1502 .name
= "block_set_io_throttle",
1503 .args_type
= "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1504 .params
= "device bps bps_rd bps_wr iops iops_rd iops_wr",
1505 .help
= "change I/O throttle limits for a block drive",
1506 .cmd
= hmp_block_set_io_throttle
,
1510 ``block_set_io_throttle``
*device
* *bps
* *bps_rd
* *bps_wr
* *iops
* *iops_rd
* *iops_wr
*
1511 Change I
/O throttle limits
for a block drive to
1512 *bps
* *bps_rd
* *bps_wr
* *iops
* *iops_rd
* *iops_wr
*.
1513 *device
* can be a block device name
, a qdev ID or a QOM path
.
1517 .name
= "set_password",
1518 .args_type
= "protocol:s,password:s,display:-ds,connected:s?",
1519 .params
= "protocol password [-d display] [action-if-connected]",
1520 .help
= "set spice/vnc password",
1521 .cmd
= hmp_set_password
,
1525 ``set_password
[ vnc | spice
] password
[ -d display
] [ action
-if-connected
]``
1526 Change spice
/vnc password
. *display
* can be used with
'vnc' to specify
1527 which display to set the password on
. *action
-if-connected
* specifies
1528 what should happen
in case a connection is established
: *fail
* makes
1529 the password change fail
. *disconnect
* changes the password and
1530 disconnects the client
. *keep
* changes the password and keeps the
1531 connection up
. *keep
* is the
default.
1535 .name
= "expire_password",
1536 .args_type
= "protocol:s,time:s,display:-ds",
1537 .params
= "protocol time [-d display]",
1538 .help
= "set spice/vnc password expire-time",
1539 .cmd
= hmp_expire_password
,
1543 ``expire_password
[ vnc | spice
] expire
-time
[ -d display
]``
1544 Specify when a password
for spice
/vnc becomes invalid
.
1545 *display
* behaves the same as
in ``set_password``
.
1546 *expire
-time
* accepts
:
1549 Invalidate password instantly
.
1551 Password stays valid forever
.
1553 Password stays valid
for *nsec
* seconds starting now
.
1555 Password is invalidated at the given time
. *nsec
* are the seconds
1556 passed since
1970, i
.e
. unix epoch
.
1561 .name
= "chardev-add",
1562 .args_type
= "args:s",
1564 .help
= "add chardev",
1565 .cmd
= hmp_chardev_add
,
1566 .command_completion
= chardev_add_completion
,
1570 ``chardev
-add``
*args
*
1571 chardev
-add accepts the same parameters as the
-chardev command line
switch.
1575 .name
= "chardev-change",
1576 .args_type
= "id:s,args:s",
1577 .params
= "id args",
1578 .help
= "change chardev",
1579 .cmd
= hmp_chardev_change
,
1583 ``chardev
-change``
*args
*
1584 chardev
-change accepts existing chardev
*id
* and then the same arguments
1585 as the
-chardev command line
switch (except
for "id").
1589 .name
= "chardev-remove",
1590 .args_type
= "id:s",
1592 .help
= "remove chardev",
1593 .cmd
= hmp_chardev_remove
,
1594 .command_completion
= chardev_remove_completion
,
1598 ``chardev
-remove``
*id
*
1599 Removes the chardev
*id
*.
1603 .name
= "chardev-send-break",
1604 .args_type
= "id:s",
1606 .help
= "send a break on chardev",
1607 .cmd
= hmp_chardev_send_break
,
1608 .command_completion
= chardev_remove_completion
,
1612 ``chardev
-send
-break``
*id
*
1613 Send a
break on the chardev
*id
*.
1618 .args_type
= "qdev:-d,device:B,command:s",
1619 .params
= "[-d] [device] \"[command]\"",
1620 .help
= "run a qemu-io command on a block device\n\t\t\t"
1621 "-d: [device] is a device ID rather than a "
1622 "drive ID or node name",
1627 ``qemu
-io``
*device
* *command
*
1628 Executes a qemu
-io command on the given block device
.
1633 .args_type
= "path:s?",
1635 .help
= "list QOM properties",
1636 .cmd
= hmp_qom_list
,
1641 ``qom
-list``
[*path
*]
1642 Print QOM properties of object at location
*path
*
1647 .args_type
= "path:s,property:s",
1648 .params
= "path property",
1649 .help
= "print QOM property",
1655 ``qom
-get``
*path
* *property
*
1656 Print QOM property
*property
* of object at location
*path
*
1661 .args_type
= "json:-j,path:s,property:s,value:S",
1662 .params
= "[-j] path property value",
1663 .help
= "set QOM property.\n\t\t\t"
1664 "-j: the value is specified in json format.",
1670 ``qom
-set``
*path
* *property
* *value
*
1671 Set QOM property
*property
* of object at location
*path
* to value
*value
*
1675 .name
= "replay_break",
1676 .args_type
= "icount:l",
1678 .help
= "set breakpoint at the specified instruction count",
1679 .cmd
= hmp_replay_break
,
1683 ``replay_break``
*icount
*
1684 Set replay breakpoint at instruction count
*icount
*.
1685 Execution stops when the specified instruction is reached
.
1686 There can be at most one breakpoint
. When breakpoint is set
, any prior
1687 one is removed
. The breakpoint may be set only
in replay mode and only
1688 "in the future", i
.e
. at instruction counts greater than the current one
.
1689 The current instruction count can be observed with ``info replay``
.
1693 .name
= "replay_delete_break",
1696 .help
= "remove replay breakpoint",
1697 .cmd
= hmp_replay_delete_break
,
1701 ``replay_delete_break``
1702 Remove replay breakpoint which was previously set with ``replay_break``
.
1703 The command is ignored when there are no replay breakpoints
.
1707 .name
= "replay_seek",
1708 .args_type
= "icount:l",
1710 .help
= "replay execution to the specified instruction count",
1711 .cmd
= hmp_replay_seek
,
1715 ``replay_seek``
*icount
*
1716 Automatically proceed to the instruction count
*icount
*, when
1717 replaying the execution
. The command automatically loads nearest
1718 snapshot and replays the execution to find the desired instruction
.
1719 When there is no preceding snapshot or the execution is not replayed
,
1720 then the command fails
.
1721 *icount
* for the reference may be observed with ``info replay`` command
.
1726 .args_type
= "item:s?",
1727 .params
= "[subcommand]",
1728 .help
= "show various information about the system state",
1729 .cmd
= hmp_info_help
,
1730 .sub_table
= hmp_info_cmds
,
1735 ``calc_dirty_rate``
*second
*
1736 Start a round of dirty rate measurement with the period specified
in *second
*.
1737 The result of the dirty rate measurement may be observed with ``info
1738 dirty_rate`` command
.
1742 .name
= "calc_dirty_rate",
1743 .args_type
= "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?",
1744 .params
= "[-r] [-b] second [sample_pages_per_GB]",
1745 .help
= "start a round of guest dirty rate measurement (using -r to"
1746 "\n\t\t\t specify dirty ring as the method of calculation and"
1747 "\n\t\t\t -b to specify dirty bitmap as method of calculation)",
1748 .cmd
= hmp_calc_dirty_rate
,