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
12 { "help|?", "s?", help_cmd
, "[cmd]", "show the help" },
14 @item help or ?
[@
var{cmd
}]
15 Show the help
for all commands or just
for command @
var{cmd
}.
18 { "commit", "s", do_commit
,
19 "device|all", "commit changes to the disk images (if -snapshot is used) or backing files" },
22 Commit changes to the disk
images (if -snapshot is used
) or backing files
.
25 { "info", "s?", do_info
,
26 "[subcommand]", "show various information about the system state" },
28 @item info @
var{subcommand
}
29 Show various information about the system state
.
33 show the version of QEMU
35 show the various VLANs and the associated devices
37 show the character devices
39 show the block devices
41 show block device statistics
43 show the cpu registers
45 show infos
for each CPU
47 show the command line history
49 show the interrupts
statistics (if available
)
51 show
i8259 (PIC
) state
53 show emulated PCI device info
55 show virtual to physical memory
mappings (i386 only
)
57 show the active virtual memory
mappings (i386 only
)
59 show state of
HPET (i386 only
)
61 show KQEMU information
65 show USB devices plugged on the virtual USB hub
67 show all USB host devices
69 show profiling information
71 show information about active capturing
73 show list of VM snapshots
75 show the current VM
status (running|paused
)
77 show guest PCMCIA status
79 show which guest mouse is receiving events
81 show the vnc server status
83 show the current VM name
85 show the current VM UUID
89 show user network stack connection states
93 show balloon information
99 { "q|quit", "", do_quit
,
100 "", "quit the emulator" },
106 { "eject", "-fB", do_eject
,
107 "[-f] device", "eject a removable medium (use -f to force it)" },
109 @item eject
[-f
] @
var{device
}
110 Eject a removable
medium (use
-f to force it
).
113 { "change", "BFs?", do_change
,
114 "device filename [format]", "change a removable medium, optional format" },
116 @item change @
var{device
} @
var{setting
}
118 Change the configuration of a device
.
121 @item change @
var{diskdevice
} @
var{filename
} [@
var{format
}]
122 Change the medium
for a removable disk device to point to @
var{filename
}. eg
125 (qemu
) change ide1
-cd0
/path
/to
/some
.iso
128 @
var{format
} is optional
.
130 @item change vnc @
var{display
},@
var{options
}
131 Change the configuration of the VNC server
. The valid syntax
for @
var{display
}
132 and @
var{options
} are described at @ref
{sec_invocation
}. eg
135 (qemu
) change vnc localhost
:1
138 @item change vnc password
[@
var{password
}]
140 Change the password associated with the VNC server
. If the
new password is not
141 supplied
, the monitor will prompt
for it to be entered
. VNC passwords are only
142 significant up to
8 letters
. eg
145 (qemu
) change vnc password
152 { "screendump", "F", do_screen_dump
,
153 "filename", "save screen into PPM image 'filename'" },
155 @item screendump @
var{filename
}
156 Save screen into PPM image @
var{filename
}.
159 { "logfile", "F", do_logfile
,
160 "filename", "output logs to 'filename'" },
162 @item logfile @
var{filename
}
163 Output logs to @
var{filename
}.
166 { "log", "s", do_log
,
167 "item1[,...]", "activate logging of the specified items to '/tmp/qemu.log'" },
169 @item log @
var{item1
}[,...]
170 Activate logging of the specified items to @file
{/tmp
/qemu
.log
}.
173 { "savevm", "s?", do_savevm
,
174 "[tag|id]", "save a VM snapshot. If no tag or id are provided, a new snapshot is created" },
176 @item savevm
[@
var{tag
}|@
var{id
}]
177 Create a snapshot of the whole virtual machine
. If @
var{tag
} is
178 provided
, it is used as human readable identifier
. If there is already
179 a snapshot with the same tag or ID
, it is replaced
. More info at
183 { "loadvm", "s", do_loadvm
,
184 "tag|id", "restore a VM snapshot from its tag or id" },
186 @item loadvm @
var{tag
}|@
var{id
}
187 Set the whole virtual machine to the snapshot identified by the tag
188 @
var{tag
} or the unique snapshot ID @
var{id
}.
191 { "delvm", "s", do_delvm
,
192 "tag|id", "delete a VM snapshot from its tag or id" },
194 @item delvm @
var{tag
}|@
var{id
}
195 Delete the snapshot identified by @
var{tag
} or @
var{id
}.
198 { "singlestep", "s?", do_singlestep
,
199 "[on|off]", "run emulation in singlestep mode or switch to normal mode", },
201 @item singlestep
[off
]
202 Run the emulation
in single step mode
.
203 If called with option off
, the emulation returns to normal mode
.
206 { "stop", "", do_stop
,
207 "", "stop emulation", },
213 { "c|cont", "", do_cont
,
214 "", "resume emulation", },
220 { "gdbserver", "s?", do_gdbserver
,
221 "[device]", "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", },
223 @item gdbserver
[@
var{port
}]
224 Start gdbserver
session (default @
var{port
}=1234)
227 { "x", "/l", do_memory_dump
,
228 "/fmt addr", "virtual memory dump starting at 'addr'", },
230 @item x
/fmt @
var{addr
}
231 Virtual memory dump starting at @
var{addr
}.
234 { "xp", "/l", do_physical_memory_dump
,
235 "/fmt addr", "physical memory dump starting at 'addr'", },
237 @item xp
/@
var{fmt
} @
var{addr
}
238 Physical memory dump starting at @
var{addr
}.
240 @
var{fmt
} is a format which tells the command how to format the
241 data
. Its syntax is
: @option
{/@
{count@
}@
{format@
}@
{size@
}}
245 is the number of items to be dumped
.
248 can be
x (hex
), d (signed decimal
), u (unsigned decimal
), o (octal
),
249 c (char
) or
i (asm instruction
).
252 can be
b (8 bits
), h (16 bits
), w (32 bits
) or
g (64 bits
). On x86
,
253 @code
{h
} or @code
{w
} can be specified with the @code
{i
} format to
254 respectively select
16 or
32 bit code instruction size
.
261 Dump
10 instructions at the current instruction pointer
:
266 0x90107065: lea
0x0(%esi
,1),%esi
267 0x90107069: lea
0x0(%edi
,1),%edi
269 0x90107071: jmp
0x90107080
277 Dump
80 16 bit values at the start of the video memory
.
279 (qemu
) xp
/80hx
0xb8000
280 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
281 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
282 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
283 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
284 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
285 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
286 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
287 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
288 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
289 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
294 { "p|print", "/l", do_print
,
295 "/fmt expr", "print expression value (use $reg for CPU register access)", },
297 @item p or print
/@
var{fmt
} @
var{expr
}
299 Print expression value
. Only the @
var{format
} part of @
var{fmt
} is
303 { "i", "/ii.", do_ioport_read
,
304 "/fmt addr", "I/O port read" },
309 { "o", "/ii", do_ioport_write
,
310 "/fmt addr value", "I/O port write" },
315 { "sendkey", "si?", do_sendkey
,
316 "keys [hold_ms]", "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)" },
318 @item sendkey @
var{keys
}
320 Send @
var{keys
} to the emulator
. @
var{keys
} could be the name of the
321 key or @code
{#
} followed by the raw value
in either decimal or hexadecimal
322 format
. Use @code
{-} to press several keys simultaneously
. Example
:
327 This command is useful to send keys that your graphical user
interface
328 intercepts at low level
, such as @code
{ctrl
-alt
-f1
} in X Window
.
331 { "system_reset", "", do_system_reset
,
332 "", "reset the system" },
339 { "system_powerdown", "", do_system_powerdown
,
340 "", "send system power down event" },
342 @item system_powerdown
344 Power down the
system (if supported
).
347 { "sum", "ii", do_sum
,
348 "addr size", "compute the checksum of a memory region" },
350 @item sum @
var{addr
} @
var{size
}
352 Compute the checksum of a memory region
.
355 { "usb_add", "s", do_usb_add
,
356 "device", "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')" },
358 @item usb_add @
var{devname
}
360 Add the USB device @
var{devname
}. For details of available devices see
364 { "usb_del", "s", do_usb_del
,
365 "device", "remove USB device 'bus.addr'" },
367 @item usb_del @
var{devname
}
369 Remove the USB device @
var{devname
} from the QEMU virtual USB
370 hub
. @
var{devname
} has the syntax @code
{bus
.addr
}. Use the monitor
371 command @code
{info usb
} to see the devices you can remove
.
374 { "cpu", "i", do_cpu_set
,
375 "index", "set the default CPU" },
380 { "mouse_move", "sss?", do_mouse_move
,
381 "dx dy [dz]", "send mouse move events" },
383 @item mouse_move @
var{dx
} @
var{dy
} [@
var{dz
}]
384 Move the active mouse to the specified coordinates @
var{dx
} @
var{dy
}
385 with optional scroll axis @
var{dz
}.
388 { "mouse_button", "i", do_mouse_button
,
389 "state", "change mouse button state (1=L, 2=M, 4=R)" },
391 @item mouse_button @
var{val
}
392 Change the active mouse button state @
var{val
} (1=L
, 2=M
, 4=R
).
395 { "mouse_set", "i", do_mouse_set
,
396 "index", "set which mouse device receives events" },
398 @item mouse_set @
var{index
}
399 Set which mouse device receives events at given @
var{index
}, index
407 { "wavcapture", "si?i?i?", do_wav_capture
,
408 "path [frequency [bits [channels]]]",
409 "capture audio to a wave file (default frequency=44100 bits=16 channels=2)" },
412 @item wavcapture @
var{filename
} [@
var{frequency
} [@
var{bits
} [@
var{channels
}]]]
413 Capture audio into @
var{filename
}. Using sample rate @
var{frequency
}
414 bits per sample @
var{bits
} and number of channels @
var{channels
}.
418 @item Sample rate
= 44100 Hz
- CD quality
420 @item Number of channels
= 2 - Stereo
425 { "stopcapture", "i", do_stop_capture
,
426 "capture index", "stop capture" },
429 @item stopcapture @
var{index
}
430 Stop capture with a given @
var{index
}, index can be obtained with
436 { "memsave", "lis", do_memory_save
,
437 "addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", },
439 @item memsave @
var{addr
} @
var{size
} @
var{file
}
440 save to disk virtual memory dump starting at @
var{addr
} of size @
var{size
}.
443 { "pmemsave", "lis", do_physical_memory_save
,
444 "addr size file", "save to disk physical memory dump starting at 'addr' of size 'size'", },
446 @item pmemsave @
var{addr
} @
var{size
} @
var{file
}
447 save to disk physical memory dump starting at @
var{addr
} of size @
var{size
}.
450 { "boot_set", "s", do_boot_set
,
451 "bootdevice", "define new values for the boot device list" },
453 @item boot_set @
var{bootdevicelist
}
455 Define
new values
for the boot device list
. Those values will
override
456 the values specified on the command line through the @code
{-boot
} option
.
458 The values that can be specified
here depend on the machine type
, but are
459 the same that can be specified
in the @code
{-boot
} command line option
.
462 #
if defined(TARGET_I386
)
463 { "nmi", "i", do_inject_nmi
,
464 "cpu", "inject an NMI on the given CPU", },
468 Inject an NMI on the given
CPU (x86 only
).
471 { "migrate", "-ds", do_migrate
,
472 "[-d] uri", "migrate to URI (using -d to not wait for completion)" },
474 @item migrate
[-d
] @
var{uri
}
475 Migrate to @
var{uri
} (using -d to not wait
for completion
).
478 { "migrate_cancel", "", do_migrate_cancel
,
479 "", "cancel the current VM migration" },
482 Cancel the current VM migration
.
485 { "migrate_set_speed", "s", do_migrate_set_speed
,
486 "value", "set maximum speed (in bytes) for migrations" },
488 @item migrate_set_speed @
var{value
}
489 Set maximum speed to @
var{value
} (in bytes
) for migrations
.
492 { "migrate_set_downtime", "s", do_migrate_set_downtime
,
493 "value", "set maximum tolerated downtime (in seconds) for migrations" },
496 @item migrate_set_downtime @
var{second
}
497 Set maximum tolerated
downtime (in seconds
) for migration
.
500 #
if defined(TARGET_I386
)
501 { "drive_add", "ss", drive_hot_add
, "[[<domain>:]<bus>:]<slot>\n"
502 "[file=file][,if=type][,bus=n]\n"
503 "[,unit=m][,media=d][index=i]\n"
504 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
505 "[snapshot=on|off][,cache=on|off]",
506 "add drive to PCI storage controller" },
510 Add drive to PCI storage controller
.
513 #
if defined(TARGET_I386
)
514 { "pci_add", "sss?", pci_device_hot_add
, "auto|[[<domain>:]<bus>:]<slot> nic|storage|host [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]... [host=02:00.0[,name=string][,dma=none]", "hot-add PCI device" },
521 #
if defined(TARGET_I386
)
522 { "pci_del", "s", pci_device_hot_remove
, "[[<domain>:]<bus>:]<slot>", "hot remove PCI device" },
526 Hot remove PCI device
.
529 { "host_net_add", "ss?", net_host_device_add
,
530 "tap|user|socket|vde|dump [options]", "add host VLAN client" },
533 Add host VLAN client
.
536 { "host_net_remove", "is", net_host_device_remove
,
537 "vlan_id name", "remove host VLAN client" },
539 @item host_net_remove
540 Remove host VLAN client
.
544 { "hostfwd_add", "ss?s?", net_slirp_hostfwd_add
,
545 "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
546 "redirect TCP or UDP connections from host to guest (requires -net user)" },
547 { "hostfwd_remove", "ss?s?", net_slirp_hostfwd_remove
,
548 "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
549 "remove host-to-guest TCP or UDP redirection" },
553 Redirect TCP or UDP connections from host to
guest (requires
-net user
).
556 { "balloon", "i", do_balloon
,
557 "target", "request VM to change it's memory allocation (in MB)" },
559 @item balloon @
var{value
}
560 Request VM to change its memory allocation to @
var{value
} (in MB
).
563 { "set_link", "ss", do_set_link
,
564 "name up|down", "change the link status of a network adapter" },
566 @item set_link @
var{name
} [up|down
]
567 Set link @
var{name
} up or down
.
570 { "watchdog_action", "s", do_watchdog_action
,
571 "[reset|shutdown|poweroff|pause|debug|none]", "change watchdog action" },
573 @item watchdog_action
574 Change watchdog action
.
577 { "acl_show", "s", do_acl_show
, "aclname",
578 "list rules in the access control list" },
580 @item acl_show @
var{aclname
}
581 List all the matching rules
in the access control list
, and the
default
582 policy
. There are currently two named access control lists
,
583 @
var{vnc
.x509dname
} and @
var{vnc
.username
} matching on the x509 client
584 certificate distinguished name
, and SASL username respectively
.
587 { "acl_policy", "ss", do_acl_policy
, "aclname allow|deny",
588 "set default access control list policy" },
590 @item acl_policy @
var{aclname
} @code
{allow|deny
}
591 Set the
default access control list policy
, used
in the event that
592 none of the explicit rules match
. The
default policy at startup is
596 { "acl_add", "sssi?", do_acl_add
, "aclname match allow|deny [index]",
597 "add a match rule to the access control list" },
599 @item acl_allow @
var{aclname
} @
var{match
} @code
{allow|deny
} [@
var{index
}]
600 Add a match rule to the access control list
, allowing or denying access
.
601 The match will normally be an exact username or x509 distinguished name
,
602 but can optionally include wildcard globs
. eg @code
{*@@EXAMPLE
.COM
} to
603 allow all users
in the @code
{EXAMPLE
.COM
} kerberos realm
. The match will
604 normally be appended to the end of the ACL
, but can be inserted
605 earlier
in the list
if the optional @
var{index
} parameter is supplied
.
608 { "acl_remove", "ss", do_acl_remove
, "aclname match",
609 "remove a match rule from the access control list" },
611 @item acl_remove @
var{aclname
} @
var{match
}
612 Remove the specified match rule from the access control list
.
615 { "acl_reset", "s", do_acl_reset
, "aclname",
616 "reset the access control list" },
618 @item acl_remove @
var{aclname
} @
var{match
}
619 Remove all matches from the access control list
, and set the
default
620 policy back to @code
{deny
}.
623 #
if defined(TARGET_I386
)
624 { "mce", "iillll", do_inject_mce
, "cpu bank status mcgstatus addr misc", "inject a MCE on the given CPU"},
627 @item mce @
var{cpu
} @
var{bank
} @
var{status
} @
var{mcgstatus
} @
var{addr
} @
var{misc
}
628 Inject an MCE on the given
CPU (x86 only
).
631 { "getfd", "s", do_getfd
, "getfd name",
632 "receive a file descriptor via SCM rights and assign it a name" },
634 @item getfd @
var{fdname
}
635 If a file descriptor is passed alongside
this command
using the SCM_RIGHTS
636 mechanism on unix sockets
, it is stored
using the name @
var{fdname
} for
637 later use by other monitor commands
.
640 { "closefd", "s", do_closefd
, "closefd name",
641 "close a file descriptor previously passed via SCM rights" },
643 @item closefd @
var{fdname
}
644 Close the file descriptor previously assigned to @
var{fdname
} using the
645 @code
{getfd
} command
. This is only needed
if the file descriptor was
never
646 used by another monitor command
.
649 { "cpu_set", "is", do_cpu_set_nr
,
650 "cpu [online|offline]", "change cpu state" },
652 @item cpu_set @
var{cpu
} [online|offline
]
653 Set CPU @
var{cpu
} online or offline
.