📄 qemu-doc.texi
字号:
This option can be used several times to simulate up to 3 parallelports.Use @code{-parallel none} to disable all parallel ports.@item -monitor @var{dev}Redirect the monitor to host device @var{dev} (same devices as theserial port).The default device is @code{vc} in graphical mode and @code{stdio} innon graphical mode.@item -echr numeric_ascii_valueChange the escape character used for switching to the monitor when usingmonitor and serial sharing. The default is @code{0x01} when using the@code{-nographic} option. @code{0x01} is equal to pressing@code{Control-a}. You can select a different character from the asciicontrol keys where 1 through 26 map to Control-a through Control-z. Forinstance you could use the either of the following to change the escapecharacter to Control-t.@table @code@item -echr 0x14@item -echr 20@end table@item -sWait gdb connection to port 1234 (@pxref{gdb_usage}).@item -p @var{port}Change gdb connection port. @var{port} can be either a decimal numberto specify a TCP port, or a host device (same devices as the serial port).@item -SDo not start CPU at startup (you must type 'c' in the monitor).@item -dOutput log in /tmp/qemu.log@item -hdachs @var{c},@var{h},@var{s},[,@var{t}]Force hard disk 0 physical geometry (1 <= @var{c} <= 16383, 1 <=@var{h} <= 16, 1 <= @var{s} <= 63) and optionally force the BIOStranslation mode (@var{t}=none, lba or auto). Usually QEMU can guessall those parameters. This option is useful for old MS-DOS diskimages.@item -L pathSet the directory for the BIOS, VGA BIOS and keymaps.@item -std-vgaSimulate a standard VGA card with Bochs VBE extensions (default isCirrus Logic GD5446 PCI VGA). If your guest OS supports the VESA 2.0VBE extensions (e.g. Windows XP) and if you want to use highresolution modes (>= 1280x1024x16) then you should use this option.@item -no-acpiDisable ACPI (Advanced Configuration and Power Interface) support. Useit if your guest OS complains about ACPI problems (PC target machineonly).@item -no-rebootExit instead of rebooting.@item -loadvm fileStart right away with a saved state (@code{loadvm} in monitor)@item -semihostingEnable semihosting syscall emulation (ARM and M68K target machines only).On ARM this implements the "Angel" interface.On M68K this implements the "ColdFire GDB" interface used by libgloss.Note that this allows guest direct access to the host filesystem,so should only be used with trusted guest OS.@end table@c man end@node pcsys_keys@section Keys@c man begin OPTIONSDuring the graphical emulation, you can use the following keys:@table @key@item Ctrl-Alt-fToggle full screen@item Ctrl-Alt-nSwitch to virtual console 'n'. Standard console mappings are:@table @emph@item 1Target system display@item 2Monitor@item 3Serial port@end table@item Ctrl-AltToggle mouse and keyboard grab.@end tableIn the virtual consoles, you can use @key{Ctrl-Up}, @key{Ctrl-Down},@key{Ctrl-PageUp} and @key{Ctrl-PageDown} to move in the back log.During emulation, if you are using the @option{-nographic} option, use@key{Ctrl-a h} to get terminal commands:@table @key@item Ctrl-a hPrint this help@item Ctrl-a xExit emulator@item Ctrl-a sSave disk data back to file (if -snapshot)@item Ctrl-a ttoggle console timestamps@item Ctrl-a bSend break (magic sysrq in Linux)@item Ctrl-a cSwitch between console and monitor@item Ctrl-a Ctrl-aSend Ctrl-a@end table@c man end@ignore@c man begin SEEALSOThe HTML documentation of QEMU for more precise information and Linuxuser mode emulator invocation.@c man end@c man begin AUTHORFabrice Bellard@c man end@end ignore@node pcsys_monitor@section QEMU MonitorThe QEMU monitor is used to give complex commands to the QEMUemulator. You can use it to:@itemize @minus@itemRemove or insert removable media images(such as CD-ROM or floppies).@itemFreeze/unfreeze the Virtual Machine (VM) and save or restore its statefrom a disk file.@item Inspect the VM state without an external debugger.@end itemize@subsection CommandsThe following commands are available:@table @option@item help or ? [@var{cmd}]Show the help for all commands or just for command @var{cmd}.@item commitCommit changes to the disk images (if -snapshot is used).@item info @var{subcommand}Show various information about the system state.@table @option@item info networkshow the various VLANs and the associated devices@item info blockshow the block devices@item info registersshow the cpu registers@item info historyshow the command line history@item info pcishow emulated PCI device@item info usbshow USB devices plugged on the virtual USB hub@item info usbhostshow all USB host devices@item info captureshow information about active capturing@item info snapshotsshow list of VM snapshots@item info miceshow which guest mouse is receiving events@end table@item q or quitQuit the emulator.@item eject [-f] @var{device}Eject a removable medium (use -f to force it).@item change @var{device} @var{setting}Change the configuration of a device.@table @option@item change @var{diskdevice} @var{filename}Change the medium for a removable disk device to point to @var{filename}. eg@example(qemu) change cdrom /path/to/some.iso@end example@item change vnc @var{display},@var{options}Change the configuration of the VNC server. The valid syntax for @var{display}and @var{options} are described at @ref{sec_invocation}. eg@example(qemu) change vnc localhost:1@end example@item change vnc passwordChange the password associated with the VNC server. The monitor will prompt forthe new password to be entered. VNC passwords are only significant upto 8 letters.eg.@example(qemu) change vnc passwordPassword: ********@end example@end table@item screendump @var{filename}Save screen into PPM image @var{filename}.@item mouse_move @var{dx} @var{dy} [@var{dz}]Move the active mouse to the specified coordinates @var{dx} @var{dy}with optional scroll axis @var{dz}.@item mouse_button @var{val}Change the active mouse button state @var{val} (1=L, 2=M, 4=R).@item mouse_set @var{index}Set which mouse device receives events at given @var{index}, indexcan be obtained with@exampleinfo mice@end example@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]Capture audio into @var{filename}. Using sample rate @var{frequency}bits per sample @var{bits} and number of channels @var{channels}.Defaults:@itemize @minus@item Sample rate = 44100 Hz - CD quality@item Bits = 16@item Number of channels = 2 - Stereo@end itemize@item stopcapture @var{index}Stop capture with a given @var{index}, index can be obtained with@exampleinfo capture@end example@item log @var{item1}[,...]Activate logging of the specified items to @file{/tmp/qemu.log}.@item savevm [@var{tag}|@var{id}]Create a snapshot of the whole virtual machine. If @var{tag} isprovided, it is used as human readable identifier. If there is alreadya snapshot with the same tag or ID, it is replaced. More info at@ref{vm_snapshots}.@item loadvm @var{tag}|@var{id}Set the whole virtual machine to the snapshot identified by the tag@var{tag} or the unique snapshot ID @var{id}.@item delvm @var{tag}|@var{id}Delete the snapshot identified by @var{tag} or @var{id}.@item stopStop emulation.@item c or contResume emulation.@item gdbserver [@var{port}]Start gdbserver session (default @var{port}=1234)@item x/fmt @var{addr}Virtual memory dump starting at @var{addr}.@item xp /@var{fmt} @var{addr}Physical memory dump starting at @var{addr}.@var{fmt} is a format which tells the command how to format thedata. Its syntax is: @option{/@{count@}@{format@}@{size@}}@table @var@item countis the number of items to be dumped.@item formatcan be x (hex), d (signed decimal), u (unsigned decimal), o (octal),c (char) or i (asm instruction).@item sizecan be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,@code{h} or @code{w} can be specified with the @code{i} format torespectively select 16 or 32 bit code instruction size.@end tableExamples:@itemize@itemDump 10 instructions at the current instruction pointer:@example(qemu) x/10i $eip0x90107063: ret0x90107064: sti0x90107065: lea 0x0(%esi,1),%esi0x90107069: lea 0x0(%edi,1),%edi0x90107070: ret0x90107071: jmp 0x901070800x90107073: nop0x90107074: nop0x90107075: nop0x90107076: nop@end example@itemDump 80 16 bit values at the start of the video memory.@smallexample(qemu) xp/80hx 0xb80000x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b420x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b410x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b720x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b730x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b200x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x07200x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x07200x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x07200x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x07200x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720@end smallexample@end itemize@item p or print/@var{fmt} @var{expr}Print expression value. Only the @var{format} part of @var{fmt} isused.@item sendkey @var{keys}Send @var{keys} to the emulator. Use @code{-} to press several keyssimultaneously. Example:@examplesendkey ctrl-alt-f1@end exampleThis command is useful to send keys that your graphical user interfaceintercepts at low level, such as @code{ctrl-alt-f1} in X Window.@item system_resetReset the system.@item usb_add @var{devname}Add the USB device @var{devname}. For details of available devices see@ref{usb_devices}@item usb_del @var{devname}Remove the USB device @var{devname} from the QEMU virtual USBhub. @var{devname} has the syntax @code{bus.addr}. Use the monitorcommand @code{info usb} to see the devices you can remove.@end table@subsection Integer expressionsThe monitor understands integers expressions for every integerargument. You can use register names to get the value of specificsCPU registers by prefixing them with @emph{$}.@node disk_images@section Disk ImagesSince version 0.6.1, QEMU supports many disk image formats, includinggrowable disk images (their size increase as non empty sectors arewritten), compressed and encrypted disk images. Version 0.8.3 addedthe new qcow2 disk image format which is essential to support VMsnapshots.@menu* disk_images_quickstart:: Quick start for disk image creation* disk_images_snapshot_mode:: Snapshot mode* vm_snapshots:: VM snapshots* qemu_img_invocation:: qemu-img Invocation* host_drives:: Using host drives* disk_images_fat_images:: Virtual FAT disk images@end menu
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -