📄 qemu-doc.texi
字号:
\input texinfo @c -*- texinfo -*-@c %**start of header@setfilename qemu-doc.info@settitle QEMU Emulator User Documentation@exampleindent 0@paragraphindent 0@c %**end of header@iftex@titlepage@sp 7@center @titlefont{QEMU Emulator}@sp 1@center @titlefont{User Documentation}@sp 3@end titlepage@end iftex@ifnottex@node Top@top@menu* Introduction::* Installation::* QEMU PC System emulator::* QEMU System emulator for non PC targets::* QEMU User space emulator::* compilation:: Compilation from the sources* Index::@end menu@end ifnottex@contents@node Introduction@chapter Introduction@menu* intro_features:: Features@end menu@node intro_features@section FeaturesQEMU is a FAST! processor emulator using dynamic translation toachieve good emulation speed.QEMU has two operating modes:@itemize @minus@itemFull system emulation. In this mode, QEMU emulates a full system (forexample a PC), including one or several processors and variousperipherals. It can be used to launch different Operating Systemswithout rebooting the PC or to debug system code.@itemUser mode emulation. In this mode, QEMU can launchprocesses compiled for one CPU on another CPU. It can be used tolaunch the Wine Windows API emulator (@url{http://www.winehq.org}) orto ease cross-compilation and cross-debugging.@end itemizeQEMU can run without an host kernel driver and yet gives acceptableperformance.For system emulation, the following hardware targets are supported:@itemize@item PC (x86 or x86_64 processor)@item ISA PC (old style PC without PCI bus)@item PREP (PowerPC processor)@item G3 BW PowerMac (PowerPC processor)@item Mac99 PowerMac (PowerPC processor, in progress)@item Sun4m/Sun4c/Sun4d (32-bit Sparc processor)@item Sun4u (64-bit Sparc processor, in progress)@item Malta board (32-bit and 64-bit MIPS processors)@item ARM Integrator/CP (ARM)@item ARM Versatile baseboard (ARM)@item ARM RealView Emulation baseboard (ARM)@item Spitz, Akita, Borzoi and Terrier PDAs (PXA270 processor)@item Luminary Micro LM3S811EVB (ARM Cortex-M3)@item Luminary Micro LM3S6965EVB (ARM Cortex-M3)@item Freescale MCF5208EVB (ColdFire V2).@item Arnewsh MCF5206 evaluation board (ColdFire V2).@item Palm Tungsten|E PDA (OMAP310 processor)@end itemizeFor user emulation, x86, PowerPC, ARM, 32-bit MIPS, Sparc32/64 and ColdFire(m68k) CPUs are supported.@node Installation@chapter InstallationIf you want to compile QEMU yourself, see @ref{compilation}.@menu* install_linux:: Linux* install_windows:: Windows* install_mac:: Macintosh@end menu@node install_linux@section LinuxIf a precompiled package is available for your distribution - you justhave to install it. Otherwise, see @ref{compilation}.@node install_windows@section WindowsDownload the experimental binary installer at@url{http://www.free.oszoo.org/@/download.html}.@node install_mac@section Mac OS XDownload the experimental binary installer at@url{http://www.free.oszoo.org/@/download.html}.@node QEMU PC System emulator@chapter QEMU PC System emulator@menu* pcsys_introduction:: Introduction* pcsys_quickstart:: Quick Start* sec_invocation:: Invocation* pcsys_keys:: Keys* pcsys_monitor:: QEMU Monitor* disk_images:: Disk Images* pcsys_network:: Network emulation* direct_linux_boot:: Direct Linux Boot* pcsys_usb:: USB emulation* vnc_security:: VNC security* gdb_usage:: GDB usage* pcsys_os_specific:: Target OS specific information@end menu@node pcsys_introduction@section Introduction@c man begin DESCRIPTIONThe QEMU PC System emulator simulates thefollowing peripherals:@itemize @minus@itemi440FX host PCI bridge and PIIX3 PCI to ISA bridge@itemCirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESAextensions (hardware level, including all non standard modes).@itemPS/2 mouse and keyboard@item2 PCI IDE interfaces with hard disk and CD-ROM support@itemFloppy disk@itemPCI/ISA PCI network adapters@itemSerial ports@itemCreative SoundBlaster 16 sound card@itemENSONIQ AudioPCI ES1370 sound card@itemAdlib(OPL2) - Yamaha YM3812 compatible chip@itemPCI UHCI USB controller and a virtual USB hub.@end itemizeSMP is supported with up to 255 CPUs.Note that adlib is only available when QEMU was configured with-enable-adlibQEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPLVGA BIOS.QEMU uses YM3812 emulation by Tatsuyuki Satoh.@c man end@node pcsys_quickstart@section Quick StartDownload and uncompress the linux image (@file{linux.img}) and type:@exampleqemu linux.img@end exampleLinux should boot and give you a prompt.@node sec_invocation@section Invocation@example@c man begin SYNOPSISusage: qemu [options] [@var{disk_image}]@c man end@end example@c man begin OPTIONS@var{disk_image} is a raw hard disk image for IDE hard disk 0.General options:@table @option@item -M @var{machine}Select the emulated @var{machine} (@code{-M ?} for list)@item -fda @var{file}@item -fdb @var{file}Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). You canuse the host floppy by using @file{/dev/fd0} as filename (@pxref{host_drives}).@item -hda @var{file}@item -hdb @var{file}@item -hdc @var{file}@item -hdd @var{file}Use @var{file} as hard disk 0, 1, 2 or 3 image (@pxref{disk_images}).@item -cdrom @var{file}Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and@option{-cdrom} at the same time). You can use the host CD-ROM byusing @file{/dev/cdrom} as filename (@pxref{host_drives}).@item -drive @var{option}[,@var{option}[,@var{option}[,...]]]Define a new drive. Valid options are:@table @code@item file=@var{file}This option defines which disk image (@pxref{disk_images}) to use withthis drive.@item if=@var{interface}This option defines on which type on interface the drive is connected.Available types are: ide, scsi, sd, mtd, floppy, pflash.@item bus=@var{bus},unit=@var{unit}These options define where is connected the drive by defining the bus number andthe unit id.@item index=@var{index}This option defines where is connected the drive by using an index in the listof available connectors of a given interface type.@item media=@var{media}This option defines the type of the media: disk or cdrom.@item cyls=@var{c},heads=@var{h},secs=@var{s}[,trans=@var{t}]These options have the same definition as they have in @option{-hdachs}.@item snapshot=@var{snapshot}@var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}).@item cache=@var{cache}@var{cache} is "on" or "off" and allows to disable host cache to access data.@end tableInstead of @option{-cdrom} you can use:@exampleqemu -drive file=file,index=2,media=cdrom@end exampleInstead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you canuse:@exampleqemu -drive file=file,index=0,media=diskqemu -drive file=file,index=1,media=diskqemu -drive file=file,index=2,media=diskqemu -drive file=file,index=3,media=disk@end exampleYou can connect a CDROM to the slave of ide0:@exampleqemu -drive file=file,if=ide,index=1,media=cdrom@end exampleIf you don't specify the "file=" argument, you define an empty drive:@exampleqemu -drive if=ide,index=1,media=cdrom@end exampleYou can connect a SCSI disk with unit ID 6 on the bus #0:@exampleqemu -drive file=file,if=scsi,bus=0,unit=6@end exampleInstead of @option{-fda}, @option{-fdb}, you can use:@exampleqemu -drive file=file,index=0,if=floppyqemu -drive file=file,index=1,if=floppy@end exampleBy default, @var{interface} is "ide" and @var{index} is automaticallyincremented:@exampleqemu -drive file=a -drive file=b"@end exampleis interpreted like:@exampleqemu -hda a -hdb b@end example@item -boot [a|c|d|n]Boot on floppy (a), hard disk (c), CD-ROM (d), or Etherboot (n). Hard disk bootis the default.@item -snapshotWrite to temporary files instead of disk image files. In this case,the raw disk image you use is not written back. You can however forcethe write back by pressing @key{C-a s} (@pxref{disk_images}).@item -no-fd-bootchkDisable boot signature checking for floppy disks in Bochs BIOS. It maybe needed to boot from old floppy disks.@item -m @var{megs}Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.@item -smp @var{n}Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUsto 4.@item -audio-helpWill show the audio subsystem help: list of drivers, tunableparameters.@item -soundhw @var{card1}[,@var{card2},...] or -soundhw allEnable audio and selected sound hardware. Use ? to print allavailable sound hardware.@exampleqemu -soundhw sb16,adlib hdaqemu -soundhw es1370 hdaqemu -soundhw all hdaqemu -soundhw ?@end example@item -localtimeSet the real time clock to local time (the default is to UTCtime). This option is needed to have correct date in MS-DOS orWindows.@item -startdate @var{date}Set the initial date of the real time clock. Valid format for@var{date} are: @code{now} or @code{2006-06-17T16:01:21} or@code{2006-06-17}. The default value is @code{now}.@item -pidfile @var{file}Store the QEMU process PID in @var{file}. It is useful if you launch QEMUfrom a script.@item -daemonizeDaemonize the QEMU process after initialization. QEMU will not detach fromstandard IO until it is ready to receive connections on any of its devices.This option is a useful way for external programs to launch QEMU without havingto cope with initialization race conditions.@item -win2k-hackUse it when installing Windows 2000 to avoid a disk full bug. AfterWindows 2000 is installed, you no longer need this option (this optionslows down the IDE transfers).@item -option-rom @var{file}Load the contents of @var{file} as an option ROM.This option is useful to load things like EtherBoot.@item -name @var{name}Sets the @var{name} of the guest.This name will be display in the SDL window caption.The @var{name} will also be used for the VNC server.@end tableDisplay options:@table @option@item -nographicNormally, QEMU uses SDL to display the VGA output. With this option,you can totally disable graphical output so that QEMU is a simplecommand line application. The emulated serial port is redirected onthe console. Therefore, you can still use QEMU to debug a Linux kernelwith a serial console.@item -no-frameDo not use decorations for SDL windows and start them using the wholeavailable screen space. This makes the using QEMU in a dedicated desktopworkspace more convenient.@item -full-screenStart in full screen.@item -vnc @var{display}[,@var{option}[,@var{option}[,...]]]Normally, QEMU uses SDL to display the VGA output. With this option,you can have QEMU listen on VNC display @var{display} and redirect the VGAdisplay over the VNC session. It is very useful to enable the usbtablet device when using this option (option @option{-usbdevicetablet}). When using the VNC display, you must use the @option{-k}parameter to set the keyboard layout if you are not using en-us. Validsyntax for the @var{display} is@table @code
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -