Next: , Previous: pcsys_keys, Up: QEMU PC System emulator


3.5 QEMU Monitor

The QEMU monitor is used to give complex commands to the QEMU emulator. You can use it to:

3.5.1 Commands

The following commands are available:

help or ? [cmd]
Show the help for all commands or just for command cmd.
commit
Commit changes to the disk images (if -snapshot is used).
info subcommand
Show various information about the system state.
info network
show the various VLANs and the associated devices
info block
show the block devices
info registers
show the cpu registers
info history
show the command line history
info pci
show emulated PCI device
info usb
show USB devices plugged on the virtual USB hub
info usbhost
show all USB host devices
info capture
show information about active capturing
info snapshots
show list of VM snapshots
info mice
show which guest mouse is receiving events

q or quit
Quit the emulator.
eject [-f] device
Eject a removable medium (use -f to force it).
change device setting
Change the configuration of a device.
change diskdevice filename
Change the medium for a removable disk device to point to filename. eg
          (qemu) change cdrom /path/to/some.iso
     

change vnc display,options
Change the configuration of the VNC server. The valid syntax for display and options are described at sec_invocation. eg
          (qemu) change vnc localhost:1
     

change vnc password
Change the password associated with the VNC server. The monitor will prompt for the new password to be entered. VNC passwords are only significant upto 8 letters. eg.
          (qemu) change vnc password
          Password: ********
     

screendump filename
Save screen into PPM image filename.
mouse_move dx dy [dz]
Move the active mouse to the specified coordinates dx dy with optional scroll axis dz.
mouse_button val
Change the active mouse button state val (1=L, 2=M, 4=R).
mouse_set index
Set which mouse device receives events at given index, index can be obtained with
     info mice

wavcapture filename [frequency [bits [channels]]]
Capture audio into filename. Using sample rate frequency bits per sample bits and number of channels channels.

Defaults:


stopcapture index
Stop capture with a given index, index can be obtained with
     info capture

log item1[,...]
Activate logging of the specified items to /tmp/qemu.log.
savevm [tag|id]
Create a snapshot of the whole virtual machine. If tag is provided, it is used as human readable identifier. If there is already a snapshot with the same tag or ID, it is replaced. More info at vm_snapshots.
loadvm tag|id
Set the whole virtual machine to the snapshot identified by the tag tag or the unique snapshot ID id.
delvm tag|id
Delete the snapshot identified by tag or id.
stop
Stop emulation.
c or cont
Resume emulation.
gdbserver [port]
Start gdbserver session (default port=1234)
x/fmt addr
Virtual memory dump starting at addr.
xp /fmt addr
Physical memory dump starting at addr.

fmt is a format which tells the command how to format the data. Its syntax is: /{count}{format}{size}

count
is the number of items to be dumped.
format
can be x (hex), d (signed decimal), u (unsigned decimal), o (octal), c (char) or i (asm instruction).
size
can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86, h or w can be specified with the i format to respectively select 16 or 32 bit code instruction size.

Examples:


p or print/fmt expr
Print expression value. Only the format part of fmt is used.
sendkey keys
Send keys to the emulator. Use - to press several keys simultaneously. Example:
     sendkey ctrl-alt-f1

This command is useful to send keys that your graphical user interface intercepts at low level, such as ctrl-alt-f1 in X Window.

system_reset
Reset the system.
usb_add devname
Add the USB device devname. For details of available devices see usb_devices
usb_del devname
Remove the USB device devname from the QEMU virtual USB hub. devname has the syntax bus.addr. Use the monitor command info usb to see the devices you can remove.

3.5.2 Integer expressions

The monitor understands integers expressions for every integer argument. You can use register names to get the value of specifics CPU registers by prefixing them with $.