Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 0891a76a8d65a484c555df08ea9dde48 > files > 15

qemu-common-0.13.0-0.7.rc1.fc14.x86_64.rpm

<html lang="en">
<head>
<title>QEMU Emulator User Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="QEMU Emulator User Documentation">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<a name="Top"></a>

<h2 class="unnumbered">QEMU Emulator User Documentation</h2>

<div class="contents">
<h2>Table of Contents</h2>
<ul>
<li><a name="toc_Top" href="#Top">QEMU Emulator User Documentation</a>
<li><a name="toc_Introduction" href="#Introduction">1 Introduction</a>
<ul>
<li><a href="#intro_005ffeatures">1.1 Features</a>
</li></ul>
<li><a name="toc_Installation" href="#Installation">2 Installation</a>
<ul>
<li><a href="#install_005flinux">2.1 Linux</a>
<li><a href="#install_005fwindows">2.2 Windows</a>
<li><a href="#install_005fmac">2.3 Mac OS X</a>
</li></ul>
<li><a name="toc_QEMU-PC-System-emulator" href="#QEMU-PC-System-emulator">3 QEMU PC System emulator</a>
<ul>
<li><a href="#pcsys_005fintroduction">3.1 Introduction</a>
<li><a href="#pcsys_005fquickstart">3.2 Quick Start</a>
<li><a href="#sec_005finvocation">3.3 Invocation</a>
<li><a href="#pcsys_005fkeys">3.4 Keys</a>
<li><a href="#pcsys_005fmonitor">3.5 QEMU Monitor</a>
<ul>
<li><a href="#pcsys_005fmonitor">3.5.1 Commands</a>
<li><a href="#pcsys_005fmonitor">3.5.2 Integer expressions</a>
</li></ul>
<li><a href="#disk_005fimages">3.6 Disk Images</a>
<ul>
<li><a href="#disk_005fimages_005fquickstart">3.6.1 Quick start for disk image creation</a>
<li><a href="#disk_005fimages_005fsnapshot_005fmode">3.6.2 Snapshot mode</a>
<li><a href="#vm_005fsnapshots">3.6.3 VM snapshots</a>
<li><a href="#qemu_005fimg_005finvocation">3.6.4 <code>qemu-img</code> Invocation</a>
<li><a href="#qemu_005fnbd_005finvocation">3.6.5 <code>qemu-nbd</code> Invocation</a>
<li><a href="#host_005fdrives">3.6.6 Using host drives</a>
<ul>
<li><a href="#host_005fdrives">3.6.6.1 Linux</a>
<li><a href="#host_005fdrives">3.6.6.2 Windows</a>
<li><a href="#host_005fdrives">3.6.6.3 Mac OS X</a>
</li></ul>
<li><a href="#disk_005fimages_005ffat_005fimages">3.6.7 Virtual FAT disk images</a>
<li><a href="#disk_005fimages_005fnbd">3.6.8 NBD access</a>
</li></ul>
<li><a href="#pcsys_005fnetwork">3.7 Network emulation</a>
<ul>
<li><a href="#pcsys_005fnetwork">3.7.1 VLANs</a>
<li><a href="#pcsys_005fnetwork">3.7.2 Using TAP network interfaces</a>
<ul>
<li><a href="#pcsys_005fnetwork">3.7.2.1 Linux host</a>
<li><a href="#pcsys_005fnetwork">3.7.2.2 Windows host</a>
</li></ul>
<li><a href="#pcsys_005fnetwork">3.7.3 Using the user mode network stack</a>
<li><a href="#pcsys_005fnetwork">3.7.4 Connecting VLANs between QEMU instances</a>
</li></ul>
<li><a href="#direct_005flinux_005fboot">3.8 Direct Linux Boot</a>
<li><a href="#pcsys_005fusb">3.9 USB emulation</a>
<ul>
<li><a href="#usb_005fdevices">3.9.1 Connecting USB devices</a>
<li><a href="#host_005fusb_005fdevices">3.9.2 Using host USB devices on a Linux host</a>
</li></ul>
<li><a href="#vnc_005fsecurity">3.10 VNC security</a>
<ul>
<li><a href="#vnc_005fsec_005fnone">3.10.1 Without passwords</a>
<li><a href="#vnc_005fsec_005fpassword">3.10.2 With passwords</a>
<li><a href="#vnc_005fsec_005fcertificate">3.10.3 With x509 certificates</a>
<li><a href="#vnc_005fsec_005fcertificate_005fverify">3.10.4 With x509 certificates and client verification</a>
<li><a href="#vnc_005fsec_005fcertificate_005fpw">3.10.5 With x509 certificates, client verification and passwords</a>
<li><a href="#vnc_005fsec_005fsasl">3.10.6 With SASL authentication</a>
<li><a href="#vnc_005fsec_005fcertificate_005fsasl">3.10.7 With x509 certificates and SASL authentication</a>
<li><a href="#vnc_005fgenerate_005fcert">3.10.8 Generating certificates for VNC</a>
<ul>
<li><a href="#vnc_005fgenerate_005fca">3.10.8.1 Setup the Certificate Authority</a>
<li><a href="#vnc_005fgenerate_005fserver">3.10.8.2 Issuing server certificates</a>
<li><a href="#vnc_005fgenerate_005fclient">3.10.8.3 Issuing client certificates</a>
</li></ul>
<li><a href="#vnc_005fsetup_005fsasl">3.10.9 Configuring SASL mechanisms</a>
</li></ul>
<li><a href="#gdb_005fusage">3.11 GDB usage</a>
<li><a href="#pcsys_005fos_005fspecific">3.12 Target OS specific information</a>
<ul>
<li><a href="#pcsys_005fos_005fspecific">3.12.1 Linux</a>
<li><a href="#pcsys_005fos_005fspecific">3.12.2 Windows</a>
<ul>
<li><a href="#pcsys_005fos_005fspecific">3.12.2.1 SVGA graphic modes support</a>
<li><a href="#pcsys_005fos_005fspecific">3.12.2.2 CPU usage reduction</a>
<li><a href="#pcsys_005fos_005fspecific">3.12.2.3 Windows 2000 disk full problem</a>
<li><a href="#pcsys_005fos_005fspecific">3.12.2.4 Windows 2000 shutdown</a>
<li><a href="#pcsys_005fos_005fspecific">3.12.2.5 Share a directory between Unix and Windows</a>
<li><a href="#pcsys_005fos_005fspecific">3.12.2.6 Windows XP security problem</a>
</li></ul>
<li><a href="#pcsys_005fos_005fspecific">3.12.3 MS-DOS and FreeDOS</a>
<ul>
<li><a href="#pcsys_005fos_005fspecific">3.12.3.1 CPU usage reduction</a>
</li></ul>
</li></ul>
</li></ul>
<li><a name="toc_QEMU-System-emulator-for-non-PC-targets" href="#QEMU-System-emulator-for-non-PC-targets">4 QEMU System emulator for non PC targets</a>
<ul>
<li><a href="#PowerPC-System-emulator">4.1 PowerPC System emulator</a>
<li><a href="#Sparc32-System-emulator">4.2 Sparc32 System emulator</a>
<li><a href="#Sparc64-System-emulator">4.3 Sparc64 System emulator</a>
<li><a href="#MIPS-System-emulator">4.4 MIPS System emulator</a>
<li><a href="#ARM-System-emulator">4.5 ARM System emulator</a>
<li><a href="#ColdFire-System-emulator">4.6 ColdFire System emulator</a>
<li><a href="#Cris-System-emulator">4.7 Cris System emulator</a>
<li><a href="#Microblaze-System-emulator">4.8 Microblaze System emulator</a>
<li><a href="#SH4-System-emulator">4.9 SH4 System emulator</a>
</li></ul>
<li><a name="toc_QEMU-User-space-emulator" href="#QEMU-User-space-emulator">5 QEMU User space emulator</a>
<ul>
<li><a href="#Supported-Operating-Systems">5.1 Supported Operating Systems</a>
<li><a href="#Linux-User-space-emulator">5.2 Linux User space emulator</a>
<ul>
<li><a href="#Quick-Start">5.2.1 Quick Start</a>
<li><a href="#Wine-launch">5.2.2 Wine launch</a>
<li><a href="#Command-line-options">5.2.3 Command line options</a>
<li><a href="#Other-binaries">5.2.4 Other binaries</a>
</li></ul>
<li><a href="#Mac-OS-X_002fDarwin-User-space-emulator">5.3 Mac OS X/Darwin User space emulator</a>
<ul>
<li><a href="#Mac-OS-X_002fDarwin-Status">5.3.1 Mac OS X/Darwin Status</a>
<li><a href="#Mac-OS-X_002fDarwin-Quick-Start">5.3.2 Quick Start</a>
<li><a href="#Mac-OS-X_002fDarwin-Command-line-options">5.3.3 Command line options</a>
</li></ul>
<li><a href="#BSD-User-space-emulator">5.4 BSD User space emulator</a>
<ul>
<li><a href="#BSD-Status">5.4.1 BSD Status</a>
<li><a href="#BSD-Quick-Start">5.4.2 Quick Start</a>
<li><a href="#BSD-Command-line-options">5.4.3 Command line options</a>
</li></ul>
</li></ul>
<li><a name="toc_compilation" href="#compilation">6 Compilation from the sources</a>
<ul>
<li><a href="#Linux_002fUnix">6.1 Linux/Unix</a>
<ul>
<li><a href="#Linux_002fUnix">6.1.1 Compilation</a>
</li></ul>
<li><a href="#Windows">6.2 Windows</a>
<li><a href="#Cross-compilation-for-Windows-with-Linux">6.3 Cross compilation for Windows with Linux</a>
<li><a href="#Mac-OS-X">6.4 Mac OS X</a>
<li><a href="#Make-targets">6.5 Make targets</a>
</li></ul>
<li><a name="toc_License" href="#License">Appendix A License</a>
<li><a name="toc_Index" href="#Index">Appendix B Index</a>
<ul>
<li><a href="#Concept-Index">B.1 Concept Index</a>
<li><a href="#Function-Index">B.2 Function Index</a>
<li><a href="#Keystroke-Index">B.3 Keystroke Index</a>
<li><a href="#Program-Index">B.4 Program Index</a>
<li><a href="#Data-Type-Index">B.5 Data Type Index</a>
<li><a href="#Variable-Index">B.6 Variable Index</a>
</li></ul>
</li></ul>
</div>

<p><a name="Introduction"></a>

<h2 class="chapter">1 Introduction</h2>

<p><a name="intro_features"></a>
<a name="intro_005ffeatures"></a>

<h3 class="section">1.1 Features</h3>

<p>QEMU is a FAST! processor emulator using dynamic translation to
achieve good emulation speed.

<p>QEMU has two operating modes:

     
<a name="index-operating-modes-1"></a>
<ul>
<li><a name="index-system-emulation-2"></a>Full system emulation. In this mode, QEMU emulates a full system (for
example a PC), including one or several processors and various
peripherals. It can be used to launch different Operating Systems
without rebooting the PC or to debug system code.

     <li><a name="index-user-mode-emulation-3"></a>User mode emulation. In this mode, QEMU can launch
processes compiled for one CPU on another CPU. It can be used to
launch the Wine Windows API emulator (<a href="http://www.winehq.org">http://www.winehq.org</a>) or
to ease cross-compilation and cross-debugging.

</ul>

<p>QEMU can run without an host kernel driver and yet gives acceptable
performance.

<p>For system emulation, the following hardware targets are supported:
     
<a name="index-emulated-target-systems-4"></a>
<a name="index-supported-target-systems-5"></a>
<ul><li>PC (x86 or x86_64 processor)
<li>ISA PC (old style PC without PCI bus)
<li>PREP (PowerPC processor)
<li>G3 Beige PowerMac (PowerPC processor)
<li>Mac99 PowerMac (PowerPC processor, in progress)
<li>Sun4m/Sun4c/Sun4d (32-bit Sparc processor)
<li>Sun4u/Sun4v (64-bit Sparc processor, in progress)
<li>Malta board (32-bit and 64-bit MIPS processors)
<li>MIPS Magnum (64-bit MIPS processor)
<li>ARM Integrator/CP (ARM)
<li>ARM Versatile baseboard (ARM)
<li>ARM RealView Emulation/Platform baseboard (ARM)
<li>Spitz, Akita, Borzoi, Terrier and Tosa PDAs (PXA270 processor)
<li>Luminary Micro LM3S811EVB (ARM Cortex-M3)
<li>Luminary Micro LM3S6965EVB (ARM Cortex-M3)
<li>Freescale MCF5208EVB (ColdFire V2). 
<li>Arnewsh MCF5206 evaluation board (ColdFire V2). 
<li>Palm Tungsten|E PDA (OMAP310 processor)
<li>N800 and N810 tablets (OMAP2420 processor)
<li>MusicPal (MV88W8618 ARM processor)
<li>Gumstix "Connex" and "Verdex" motherboards (PXA255/270). 
<li>Siemens SX1 smartphone (OMAP310 processor)
<li>Syborg SVP base model (ARM Cortex-A8). 
<li>AXIS-Devboard88 (CRISv32 ETRAX-FS). 
<li>Petalogix Spartan 3aDSP1800 MMU ref design (MicroBlaze). 
</ul>

<p><a name="index-supported-user-mode-targets-6"></a>For user emulation, x86 (32 and 64 bit), PowerPC (32 and 64 bit),
ARM, MIPS (32 bit only), Sparc (32 and 64 bit),
Alpha, ColdFire(m68k), CRISv32 and MicroBlaze CPUs are supported.

<p><a name="Installation"></a>

<h2 class="chapter">2 Installation</h2>

<p>If you want to compile QEMU yourself, see <a href="#compilation">compilation</a>.

<p><a name="install_linux"></a>
<a name="install_005flinux"></a>

<h3 class="section">2.1 Linux</h3>

<p><a name="index-installation-_0028Linux_0029-7"></a>
If a precompiled package is available for your distribution - you just
have to install it. Otherwise, see <a href="#compilation">compilation</a>.

<p><a name="install_windows"></a>
<a name="install_005fwindows"></a>

<h3 class="section">2.2 Windows</h3>

<p><a name="index-installation-_0028Windows_0029-8"></a>
Download the experimental binary installer at
<a href="http://www.free.oszoo.org/download.html">http://www.free.oszoo.org/download.html</a>. 
TODO (no longer available)

<p><a name="install_mac"></a>
<a name="install_005fmac"></a>

<h3 class="section">2.3 Mac OS X</h3>

<p>Download the experimental binary installer at
<a href="http://www.free.oszoo.org/download.html">http://www.free.oszoo.org/download.html</a>. 
TODO (no longer available)

<p><a name="QEMU-PC-System-emulator"></a>

<h2 class="chapter">3 QEMU PC System emulator</h2>

<p><a name="index-system-emulation-_0028PC_0029-9"></a>

<p><a name="pcsys_introduction"></a>
<a name="pcsys_005fintroduction"></a>

<h3 class="section">3.1 Introduction</h3>

<!-- man begin DESCRIPTION -->
<p>The QEMU PC System emulator simulates the
following peripherals:

     <ul>
<li>i440FX host PCI bridge and PIIX3 PCI to ISA bridge
<li>Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA
extensions (hardware level, including all non standard modes). 
<li>PS/2 mouse and keyboard
<li>2 PCI IDE interfaces with hard disk and CD-ROM support
<li>Floppy disk
<li>PCI and ISA network adapters
<li>Serial ports
<li>Creative SoundBlaster 16 sound card
<li>ENSONIQ AudioPCI ES1370 sound card
<li>Intel 82801AA AC97 Audio compatible sound card
<li>Adlib(OPL2) - Yamaha YM3812 compatible chip
<li>Gravis Ultrasound GF1 sound card
<li>CS4231A compatible sound card
<li>PCI UHCI USB controller and a virtual USB hub. 
</ul>

<p>SMP is supported with up to 255 CPUs.

<p>Note that adlib, gus and cs4231a are only available when QEMU was
configured with &ndash;audio-card-list option containing the name(s) of
required card(s).

<p>QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
VGA BIOS.

<p>QEMU uses YM3812 emulation by Tatsuyuki Satoh.

<p>QEMU uses GUS emulation(GUSEMU32 <a href="http://www.deinmeister.de/gusemu/">http://www.deinmeister.de/gusemu/</a>)
by Tibor "TS" Schütz.

<p>Not that, by default, GUS shares IRQ(7) with parallel ports and so
qemu must be told to not have parallel ports to have working GUS

<pre class="example">qemu dos.img -soundhw gus -parallel none
</pre>
<p>Alternatively:
<pre class="example">qemu dos.img -device gus,irq=5
</pre>
<p>Or some other unclaimed IRQ.

<p>CS4231A is the chip used in Windows Sound System and GUSMAX products

<!-- man end -->
<p><a name="pcsys_quickstart"></a>
<a name="pcsys_005fquickstart"></a>

<h3 class="section">3.2 Quick Start</h3>

<p><a name="index-quick-start-10"></a>
Download and uncompress the linux image (<samp><span class="file">linux.img</span></samp>) and type:

<pre class="example">qemu linux.img
</pre>
<p>Linux should boot and give you a prompt.

<p><a name="sec_invocation"></a>
<a name="sec_005finvocation"></a>

<h3 class="section">3.3 Invocation</h3>

<pre class="example"><!-- man begin SYNOPSIS -->
usage: qemu [options] [<var>disk_image</var>]
<!-- man end -->
</pre>
<!-- man begin OPTIONS -->
<p><var>disk_image</var> is a raw hard disk image for IDE hard disk 0. Some
targets do not need a disk image.

<p>Standard options:
     <dl>
<dt><samp><span class="option">-h</span></samp><dd><a name="index-g_t_002dh-11"></a>Display help and exit
<br><dt><samp><span class="option">-version</span></samp><dd><a name="index-g_t_002dversion-12"></a>Display version information and exit
<br><dt><samp><span class="option">-M </span><var>machine</var></samp><dd><a name="index-g_t_002dM-13"></a>Select the emulated <var>machine</var> (<code>-M ?</code> for list)
<br><dt><samp><span class="option">-cpu </span><var>model</var></samp><dd><a name="index-g_t_002dcpu-14"></a>Select CPU model (-cpu ? for list and additional feature selection)
<br><dt><samp><span class="option">-smp </span><var>n</var><span class="option">[,cores=</span><var>cores</var><span class="option">][,threads=</span><var>threads</var><span class="option">][,sockets=</span><var>sockets</var><span class="option">][,maxcpus=</span><var>maxcpus</var><span class="option">]</span></samp><dd><a name="index-g_t_002dsmp-15"></a>Simulate an SMP system with <var>n</var> CPUs. On the PC target, up to 255
CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
to 4. 
For the PC target, the number of <var>cores</var> per socket, the number
of <var>threads</var> per cores and the total number of <var>sockets</var> can be
specified. Missing values will be computed. If any on the three values is
given, the total number of CPUs <var>n</var> can be omitted. <var>maxcpus</var>
specifies the maximum number of hotpluggable CPUs. 
<br><dt><samp><span class="option">-numa </span><var>opts</var></samp><dd><a name="index-g_t_002dnuma-16"></a>Simulate a multi node NUMA system. If mem and cpus are omitted, resources
are split equally. 
<br><dt><samp><span class="option">-fda </span><var>file</var></samp><br><dt><samp><span class="option">-fdb </span><var>file</var></samp><dd><a name="index-g_t_002dfda-17"></a><a name="index-g_t_002dfdb-18"></a>Use <var>file</var> as floppy disk 0/1 image (see <a href="#disk_005fimages">disk_images</a>). You can
use the host floppy by using <samp><span class="file">/dev/fd0</span></samp> as filename (see <a href="#host_005fdrives">host_drives</a>). 
<br><dt><samp><span class="option">-hda </span><var>file</var></samp><br><dt><samp><span class="option">-hdb </span><var>file</var></samp><br><dt><samp><span class="option">-hdc </span><var>file</var></samp><br><dt><samp><span class="option">-hdd </span><var>file</var></samp><dd><a name="index-g_t_002dhda-19"></a><a name="index-g_t_002dhdb-20"></a><a name="index-g_t_002dhdc-21"></a><a name="index-g_t_002dhdd-22"></a>Use <var>file</var> as hard disk 0, 1, 2 or 3 image (see <a href="#disk_005fimages">disk_images</a>). 
<br><dt><samp><span class="option">-cdrom </span><var>file</var></samp><dd><a name="index-g_t_002dcdrom-23"></a>Use <var>file</var> as CD-ROM image (you cannot use <samp><span class="option">-hdc</span></samp> and
<samp><span class="option">-cdrom</span></samp> at the same time). You can use the host CD-ROM by
using <samp><span class="file">/dev/cdrom</span></samp> as filename (see <a href="#host_005fdrives">host_drives</a>). 
<br><dt><samp><span class="option">-drive </span><var>option</var><span class="option">[,</span><var>option</var><span class="option">[,</span><var>option</var><span class="option">[,...]]]</span></samp><dd><a name="index-g_t_002ddrive-24"></a>
Define a new drive. Valid options are:

          <dl>
<dt><samp><span class="option">file=</span><var>file</var></samp><dd>This option defines which disk image (see <a href="#disk_005fimages">disk_images</a>) to use with
this drive. If the filename contains comma, you must double it
(for instance, "file=my,,file" to use file "my,file"). 
<br><dt><samp><span class="option">if=</span><var>interface</var></samp><dd>This option defines on which type on interface the drive is connected. 
Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio. 
<br><dt><samp><span class="option">bus=</span><var>bus</var><span class="option">,unit=</span><var>unit</var></samp><dd>These options define where is connected the drive by defining the bus number and
the unit id. 
<br><dt><samp><span class="option">index=</span><var>index</var></samp><dd>This option defines where is connected the drive by using an index in the list
of available connectors of a given interface type. 
<br><dt><samp><span class="option">media=</span><var>media</var></samp><dd>This option defines the type of the media: disk or cdrom. 
<br><dt><samp><span class="option">cyls=</span><var>c</var><span class="option">,heads=</span><var>h</var><span class="option">,secs=</span><var>s</var><span class="option">[,trans=</span><var>t</var><span class="option">]</span></samp><dd>These options have the same definition as they have in <samp><span class="option">-hdachs</span></samp>. 
<br><dt><samp><span class="option">snapshot=</span><var>snapshot</var></samp><dd><var>snapshot</var> is "on" or "off" and allows to enable snapshot for given drive (see <samp><span class="option">-snapshot</span></samp>). 
<br><dt><samp><span class="option">cache=</span><var>cache</var></samp><dd><var>cache</var> is "none", "writeback", "unsafe", or "writethrough" and controls how the host cache is used to access block data. 
<br><dt><samp><span class="option">aio=</span><var>aio</var></samp><dd><var>aio</var> is "threads", or "native" and selects between pthread based disk I/O and native Linux AIO. 
<br><dt><samp><span class="option">format=</span><var>format</var></samp><dd>Specify which disk <var>format</var> will be used rather than detecting
the format.  Can be used to specifiy format=raw to avoid interpreting
an untrusted format header. 
<br><dt><samp><span class="option">serial=</span><var>serial</var></samp><dd>This option specifies the serial number to assign to the device. 
<br><dt><samp><span class="option">addr=</span><var>addr</var></samp><dd>Specify the controller's PCI address (if=virtio only). 
<br><dt><samp><span class="option">boot=</span><var>boot</var></samp><dd><var>boot</var> is "on" or "off" and allows for booting from non-traditional interfaces, such as virtio. 
</dl>

     <p>By default, writethrough caching is used for all block device.  This means that
the host page cache will be used to read and write data but write notification
will be sent to the guest only when the data has been reported as written by
the storage subsystem.

     <p>Writeback caching will report data writes as completed as soon as the data is
present in the host page cache.  This is safe as long as you trust your host. 
If your host crashes or loses power, then the guest may experience data
corruption.

     <p>The host page cache can be avoided entirely with <samp><span class="option">cache=none</span></samp>.  This will
attempt to do disk IO directly to the guests memory.  QEMU may still perform
an internal copy of the data.

     <p>Some block drivers perform badly with <samp><span class="option">cache=writethrough</span></samp>, most notably,
qcow2.  If performance is more important than correctness,
<samp><span class="option">cache=writeback</span></samp> should be used with qcow2.

     <p>In case you don't care about data integrity over host failures, use
cache=unsafe. This option tells qemu that it never needs to write any data
to the disk but can instead keeps things in cache. If anything goes wrong,
like your host losing power, the disk storage getting disconnected accidently,
etc. you're image will most probably be rendered unusable.   When using
the <samp><span class="option">-snapshot</span></samp> option, unsafe caching is always used.

     <p>Instead of <samp><span class="option">-cdrom</span></samp> you can use:
     <pre class="example">     qemu -drive file=file,index=2,media=cdrom
</pre>
     <p>Instead of <samp><span class="option">-hda</span></samp>, <samp><span class="option">-hdb</span></samp>, <samp><span class="option">-hdc</span></samp>, <samp><span class="option">-hdd</span></samp>, you can
use:
     <pre class="example">     qemu -drive file=file,index=0,media=disk
     qemu -drive file=file,index=1,media=disk
     qemu -drive file=file,index=2,media=disk
     qemu -drive file=file,index=3,media=disk
</pre>
     <p>You can connect a CDROM to the slave of ide0:
     <pre class="example">     qemu -drive file=file,if=ide,index=1,media=cdrom
</pre>
     <p>If you don't specify the "file=" argument, you define an empty drive:
     <pre class="example">     qemu -drive if=ide,index=1,media=cdrom
</pre>
     <p>You can connect a SCSI disk with unit ID 6 on the bus #0:
     <pre class="example">     qemu -drive file=file,if=scsi,bus=0,unit=6
</pre>
     <p>Instead of <samp><span class="option">-fda</span></samp>, <samp><span class="option">-fdb</span></samp>, you can use:
     <pre class="example">     qemu -drive file=file,index=0,if=floppy
     qemu -drive file=file,index=1,if=floppy
</pre>
     <p>By default, <var>interface</var> is "ide" and <var>index</var> is automatically
incremented:
     <pre class="example">     qemu -drive file=a -drive file=b"
</pre>
     <p>is interpreted like:
     <pre class="example">     qemu -hda a -hdb b
</pre>
     <br><dt><samp><span class="option">-set</span></samp><dd><a name="index-g_t_002dset-25"></a>TODO
<br><dt><samp><span class="option">-global</span></samp><dd><a name="index-g_t_002dglobal-26"></a>TODO
<br><dt><samp><span class="option">-mtdblock </span><var>file</var></samp><dd><a name="index-g_t_002dmtdblock-27"></a>Use <var>file</var> as on-board Flash memory image. 
<br><dt><samp><span class="option">-sd </span><var>file</var></samp><dd><a name="index-g_t_002dsd-28"></a>Use <var>file</var> as SecureDigital card image. 
<br><dt><samp><span class="option">-pflash </span><var>file</var></samp><dd><a name="index-g_t_002dpflash-29"></a>Use <var>file</var> as a parallel flash image. 
<br><dt><samp><span class="option">-boot [order=</span><var>drives</var><span class="option">][,once=</span><var>drives</var><span class="option">][,menu=on|off]</span></samp><dd><a name="index-g_t_002dboot-30"></a>Specify boot order <var>drives</var> as a string of drive letters. Valid
drive letters depend on the target achitecture. The x86 PC uses: a, b
(floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot
from network adapter 1-4), hard disk boot is the default. To apply a
particular boot order only on the first startup, specify it via
<samp><span class="option">once</span></samp>.

     <p>Interactive boot menus/prompts can be enabled via <samp><span class="option">menu=on</span></samp> as far
as firmware/BIOS supports them. The default is non-interactive boot.

     <pre class="example">     # try to boot from network first, then from hard disk
     qemu -boot order=nc
     # boot from CD-ROM first, switch back to default order after reboot
     qemu -boot once=d
</pre>
     <p>Note: The legacy format '-boot <var>drives</var>' is still supported but its
use is discouraged as it may be removed from future versions. 
<br><dt><samp><span class="option">-snapshot</span></samp><dd><a name="index-g_t_002dsnapshot-31"></a>Write to temporary files instead of disk image files. In this case,
the raw disk image you use is not written back. You can however force
the write back by pressing &lt;C-a s&gt; (see <a href="#disk_005fimages">disk_images</a>). 
<br><dt><samp><span class="option">-m </span><var>megs</var></samp><dd><a name="index-g_t_002dm-32"></a>Set virtual RAM size to <var>megs</var> megabytes. Default is 128 MiB.  Optionally,
a suffix of &ldquo;M&rdquo; or &ldquo;G&rdquo; can be used to signify a value in megabytes or
gigabytes respectively. 
<br><dt><samp><span class="option">-mem-path </span><var>path</var></samp><dd>Allocate guest RAM from a temporarily created file in <var>path</var>. 
<br><dt><samp><span class="option">-mem-prealloc</span></samp><dd>Preallocate memory when using -mem-path. 
<br><dt><samp><span class="option">-k </span><var>language</var></samp><dd><a name="index-g_t_002dk-33"></a>Use keyboard layout <var>language</var> (for example <code>fr</code> for
French). This option is only needed where it is not easy to get raw PC
keycodes (e.g. on Macs, with some X11 servers or with a VNC
display). You don't normally need to use it on PC/Linux or PC/Windows
hosts.

     <p>The available layouts are:
     <pre class="example">     ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
     da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
     de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr
</pre>
     <p>The default is <code>en-us</code>. 
<br><dt><samp><span class="option">-audio-help</span></samp><dd><a name="index-g_t_002daudio_002dhelp-34"></a>Will show the audio subsystem help: list of drivers, tunable
parameters. 
<br><dt><samp><span class="option">-soundhw </span><var>card1</var><span class="option">[,</span><var>card2</var><span class="option">,...] or -soundhw all</span></samp><dd><a name="index-g_t_002dsoundhw-35"></a>Enable audio and selected sound hardware. Use ? to print all
available sound hardware.

     <pre class="example">     qemu -soundhw sb16,adlib disk.img
     qemu -soundhw es1370 disk.img
     qemu -soundhw ac97 disk.img
     qemu -soundhw all disk.img
     qemu -soundhw ?
</pre>
     <p>Note that Linux's i810_audio OSS kernel (for AC97) module might
require manually specifying clocking.

     <pre class="example">     modprobe i810_audio clocking=48000
</pre>
     </dl>
USB options:
     <dl>
<dt><samp><span class="option">-usb</span></samp><dd><a name="index-g_t_002dusb-36"></a>Enable the USB driver (will be the default soon)

     <br><dt><samp><span class="option">-usbdevice </span><var>devname</var></samp><dd><a name="index-g_t_002dusbdevice-37"></a>Add the USB device <var>devname</var>. See <a href="#usb_005fdevices">usb_devices</a>.

          <dl>
<dt><samp><span class="option">mouse</span></samp><dd>Virtual Mouse. This will override the PS/2 mouse emulation when activated.

          <br><dt><samp><span class="option">tablet</span></samp><dd>Pointer device that uses absolute coordinates (like a touchscreen). This
means qemu is able to report the mouse position without having to grab the
mouse. Also overrides the PS/2 mouse emulation when activated.

          <br><dt><samp><span class="option">disk:[format=</span><var>format</var><span class="option">]:</span><var>file</var></samp><dd>Mass storage device based on file. The optional <var>format</var> argument
will be used rather than detecting the format. Can be used to specifiy
<code>format=raw</code> to avoid interpreting an untrusted format header.

          <br><dt><samp><span class="option">host:</span><var>bus</var><span class="option">.</span><var>addr</var></samp><dd>Pass through the host device identified by <var>bus</var>.<var>addr</var> (Linux only).

          <br><dt><samp><span class="option">host:</span><var>vendor_id</var><span class="option">:</span><var>product_id</var></samp><dd>Pass through the host device identified by <var>vendor_id</var>:<var>product_id</var>
(Linux only).

          <br><dt><samp><span class="option">serial:[vendorid=</span><var>vendor_id</var><span class="option">][,productid=</span><var>product_id</var><span class="option">]:</span><var>dev</var></samp><dd>Serial converter to host character device <var>dev</var>, see <code>-serial</code> for the
available devices.

          <br><dt><samp><span class="option">braille</span></samp><dd>Braille device.  This will use BrlAPI to display the braille output on a real
or fake device.

          <br><dt><samp><span class="option">net:</span><var>options</var></samp><dd>Network adapter that supports CDC ethernet and RNDIS protocols.

     </dl>
     <br><dt><samp><span class="option">-device </span><var>driver</var><span class="option">[,</span><var>prop</var><span class="option">[=</span><var>value</var><span class="option">][,...]]</span></samp><dd><a name="index-g_t_002ddevice-38"></a>Add device <var>driver</var>.  <var>prop</var>=<var>value</var> sets driver
properties.  Valid properties depend on the driver.  To get help on
possible drivers and properties, use <code>-device ?</code> and
<code>-device </code><var>driver</var><code>,?</code>. 
File system options:

     <p>The general form of a File system device option is:
          <dl>
<dt><samp><span class="option">-fsdev </span><var>fstype</var><span class="option"> ,id=</span><var>id</var><span class="option"> [,</span><var>options</var><span class="option">]</span></samp><dd><a name="index-g_t_002dfsdev-39"></a>Fstype is one of:
<samp><span class="option">local</span></samp>,
The specific Fstype will determine the applicable options.

          <p>Options to each backend are described below.

          <br><dt><samp><span class="option">-fsdev local ,id=</span><var>id</var><span class="option"> ,path=</span><var>path</var><span class="option"> ,security_model=</span><var>security_model</var></samp><dd>
Create a file-system-"device" for local-filesystem.

          <p><samp><span class="option">local</span></samp> is only available on Linux.

          <p><samp><span class="option">path</span></samp> specifies the path to be exported. <samp><span class="option">path</span></samp> is required.

          <p><samp><span class="option">security_model</span></samp> specifies the security model to be followed. 
<samp><span class="option">security_model</span></samp> is required.

     </dl>
     Virtual File system pass-through options:

     <p>The general form of a Virtual File system pass-through option is:
          <dl>
<dt><samp><span class="option">-virtfs </span><var>fstype</var><span class="option"> [,</span><var>options</var><span class="option">]</span></samp><dd><a name="index-g_t_002dvirtfs-40"></a>Fstype is one of:
<samp><span class="option">local</span></samp>,
The specific Fstype will determine the applicable options.

          <p>Options to each backend are described below.

          <br><dt><samp><span class="option">-virtfs local ,path=</span><var>path</var><span class="option"> ,mount_tag=</span><var>mount_tag</var><span class="option"> ,security_model=</span><var>security_model</var></samp><dd>
Create a Virtual file-system-pass through for local-filesystem.

          <p><samp><span class="option">local</span></samp> is only available on Linux.

          <p><samp><span class="option">path</span></samp> specifies the path to be exported. <samp><span class="option">path</span></samp> is required.

          <p><samp><span class="option">security_model</span></samp> specifies the security model to be followed. 
<samp><span class="option">security_model</span></samp> is required.

          <p><samp><span class="option">mount_tag</span></samp> specifies the tag with which the exported file is mounted. 
<samp><span class="option">mount_tag</span></samp> is required.

     </dl>

     <br><dt><samp><span class="option">-name </span><var>name</var></samp><dd><a name="index-g_t_002dname-41"></a>Sets the <var>name</var> of the guest. 
This name will be displayed in the SDL window caption. 
The <var>name</var> will also be used for the VNC server. 
Also optionally set the top visible process name in Linux. 
<br><dt><samp><span class="option">-uuid </span><var>uuid</var></samp><dd><a name="index-g_t_002duuid-42"></a>Set system UUID. 
</dl>

<p>Display options:
     <dl>
<dt><samp><span class="option">-nographic</span></samp><dd><a name="index-g_t_002dnographic-43"></a>Normally, QEMU uses SDL to display the VGA output. With this option,
you can totally disable graphical output so that QEMU is a simple
command line application. The emulated serial port is redirected on
the console. Therefore, you can still use QEMU to debug a Linux kernel
with a serial console. 
<br><dt><samp><span class="option">-curses</span></samp><dd><a name="index-curses-44"></a>Normally, QEMU uses SDL to display the VGA output.  With this option,
QEMU can display the VGA output when in text mode using a
curses/ncurses interface.  Nothing is displayed in graphical mode. 
<br><dt><samp><span class="option">-no-frame</span></samp><dd><a name="index-g_t_002dno_002dframe-45"></a>Do not use decorations for SDL windows and start them using the whole
available screen space. This makes the using QEMU in a dedicated desktop
workspace more convenient. 
<br><dt><samp><span class="option">-alt-grab</span></samp><dd><a name="index-g_t_002dalt_002dgrab-46"></a>Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). 
<br><dt><samp><span class="option">-ctrl-grab</span></samp><dd><a name="index-g_t_002dctrl_002dgrab-47"></a>Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). 
<br><dt><samp><span class="option">-no-quit</span></samp><dd><a name="index-g_t_002dno_002dquit-48"></a>Disable SDL window close capability. 
<br><dt><samp><span class="option">-sdl</span></samp><dd><a name="index-g_t_002dsdl-49"></a>Enable SDL. 
Use Spice. 
<br><dt><samp><span class="option">-portrait</span></samp><dd><a name="index-g_t_002dportrait-50"></a>Rotate graphical output 90 deg left (only PXA LCD). 
<br><dt><samp><span class="option">-vga </span><var>type</var></samp><dd><a name="index-g_t_002dvga-51"></a>Select type of VGA card to emulate. Valid values for <var>type</var> are
          <dl>
<dt><samp><span class="option">cirrus</span></samp><dd>Cirrus Logic GD5446 Video card. All Windows versions starting from
Windows 95 should recognize and use this graphic card. For optimal
performances, use 16 bit color depth in the guest and the host OS. 
(This one is the default)
<br><dt><samp><span class="option">std</span></samp><dd>Standard VGA card with Bochs VBE extensions.  If your guest OS
supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
to use high resolution modes (&gt;= 1280x1024x16) then you should use
this option. 
<br><dt><samp><span class="option">vmware</span></samp><dd>VMWare SVGA-II compatible adapter. Use it if you have sufficiently
recent XFree86/XOrg server or Windows guest with a driver for this
card. 
<br><dt><samp><span class="option">none</span></samp><dd>Disable VGA card. 
</dl>
     <br><dt><samp><span class="option">-full-screen</span></samp><dd><a name="index-g_t_002dfull_002dscreen-52"></a>Start in full screen. 
<br><dt><samp><span class="option">-g </span><var>width</var><span class="option">x</span><var>height</var><span class="option">[x</span><var>depth</var><span class="option">]</span></samp><dd><a name="index-g_t_002dg-53"></a>Set the initial graphical resolution and depth (PPC, SPARC only). 
<br><dt><samp><span class="option">-vnc </span><var>display</var><span class="option">[,</span><var>option</var><span class="option">[,</span><var>option</var><span class="option">[,...]]]</span></samp><dd><a name="index-g_t_002dvnc-54"></a>Normally, QEMU uses SDL to display the VGA output.  With this option,
you can have QEMU listen on VNC display <var>display</var> and redirect the VGA
display over the VNC session.  It is very useful to enable the usb
tablet device when using this option (option <samp><span class="option">-usbdevice
tablet</span></samp>). When using the VNC display, you must use the <samp><span class="option">-k</span></samp>
parameter to set the keyboard layout if you are not using en-us. Valid
syntax for the <var>display</var> is

          <dl>
<dt><samp><var>host</var><span class="option">:</span><var>d</var></samp><dd>
TCP connections will only be allowed from <var>host</var> on display <var>d</var>. 
By convention the TCP port is 5900+<var>d</var>. Optionally, <var>host</var> can
be omitted in which case the server will accept connections from any host.

          <br><dt><samp><span class="option">unix:</span><var>path</var></samp><dd>
Connections will be allowed over UNIX domain sockets where <var>path</var> is the
location of a unix socket to listen for connections on.

          <br><dt><samp><span class="option">none</span></samp><dd>
VNC is initialized but not started. The monitor <code>change</code> command
can be used to later start the VNC server.

     </dl>

     <p>Following the <var>display</var> value there may be one or more <var>option</var> flags
separated by commas. Valid options are

          <dl>
<dt><samp><span class="option">reverse</span></samp><dd>
Connect to a listening VNC client via a &ldquo;reverse&rdquo; connection. The
client is specified by the <var>display</var>. For reverse network
connections (<var>host</var>:<var>d</var>,<code>reverse</code>), the <var>d</var> argument
is a TCP port number, not a display number.

          <br><dt><samp><span class="option">password</span></samp><dd>
Require that password based authentication is used for client connections. 
The password must be set separately using the <code>change</code> command in the
<a href="#pcsys_005fmonitor">pcsys_monitor</a>

          <br><dt><samp><span class="option">tls</span></samp><dd>
Require that client use TLS when communicating with the VNC server. This
uses anonymous TLS credentials so is susceptible to a man-in-the-middle
attack. It is recommended that this option be combined with either the
<samp><span class="option">x509</span></samp> or <samp><span class="option">x509verify</span></samp> options.

          <br><dt><samp><span class="option">x509=</span><var>/path/to/certificate/dir</var></samp><dd>
Valid if <samp><span class="option">tls</span></samp> is specified. Require that x509 credentials are used
for negotiating the TLS session. The server will send its x509 certificate
to the client. It is recommended that a password be set on the VNC server
to provide authentication of the client when this is used. The path following
this option specifies where the x509 certificates are to be loaded from. 
See the <a href="#vnc_005fsecurity">vnc_security</a> section for details on generating certificates.

          <br><dt><samp><span class="option">x509verify=</span><var>/path/to/certificate/dir</var></samp><dd>
Valid if <samp><span class="option">tls</span></samp> is specified. Require that x509 credentials are used
for negotiating the TLS session. The server will send its x509 certificate
to the client, and request that the client send its own x509 certificate. 
The server will validate the client's certificate against the CA certificate,
and reject clients when validation fails. If the certificate authority is
trusted, this is a sufficient authentication mechanism. You may still wish
to set a password on the VNC server as a second authentication layer. The
path following this option specifies where the x509 certificates are to
be loaded from. See the <a href="#vnc_005fsecurity">vnc_security</a> section for details on generating
certificates.

          <br><dt><samp><span class="option">sasl</span></samp><dd>
Require that the client use SASL to authenticate with the VNC server. 
The exact choice of authentication method used is controlled from the
system / user's SASL configuration file for the 'qemu' service. This
is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
unprivileged user, an environment variable SASL_CONF_PATH can be used
to make it search alternate locations for the service config. 
While some SASL auth methods can also provide data encryption (eg GSSAPI),
it is recommended that SASL always be combined with the 'tls' and
'x509' settings to enable use of SSL and server certificates. This
ensures a data encryption preventing compromise of authentication
credentials. See the <a href="#vnc_005fsecurity">vnc_security</a> section for details on using
SASL authentication.

          <br><dt><samp><span class="option">acl</span></samp><dd>
Turn on access control lists for checking of the x509 client certificate
and SASL party. For x509 certs, the ACL check is made against the
certificate's distinguished name. This is something that looks like
<code>C=GB,O=ACME,L=Boston,CN=bob</code>. For SASL party, the ACL check is
made against the username, which depending on the SASL plugin, may
include a realm component, eg <code>bob</code> or <code>bob@EXAMPLE.COM</code>. 
When the <samp><span class="option">acl</span></samp> flag is set, the initial access list will be
empty, with a <code>deny</code> policy. Thus no one will be allowed to
use the VNC server until the ACLs have been loaded. This can be
achieved using the <code>acl</code> monitor command.

          <br><dt><samp><span class="option">lossy</span></samp><dd>
Enable lossy compression methods (gradient, JPEG, ...). If this
option is set, VNC client may receive lossy framebuffer updates
depending on its encoding settings. Enabling this option can save
a lot of bandwidth at the expense of quality.

     </dl>
     </dl>

<p>i386 target only:
     <dl>
<dt><samp><span class="option">-win2k-hack</span></samp><dd><a name="index-g_t_002dwin2k_002dhack-55"></a>Use it when installing Windows 2000 to avoid a disk full bug. After
Windows 2000 is installed, you no longer need this option (this option
slows down the IDE transfers). 
<br><dt><samp><span class="option">-no-fd-bootchk</span></samp><dd><a name="index-g_t_002dno_002dfd_002dbootchk-56"></a>Disable boot signature checking for floppy disks in Bochs BIOS. It may
be needed to boot from old floppy disks. 
TODO: check reference to Bochs BIOS. 
<br><dt><samp><span class="option">-no-acpi</span></samp><dd><a name="index-g_t_002dno_002dacpi-57"></a>Disable ACPI (Advanced Configuration and Power Interface) support. Use
it if your guest OS complains about ACPI problems (PC target machine
only). 
<br><dt><samp><span class="option">-no-hpet</span></samp><dd><a name="index-g_t_002dno_002dhpet-58"></a>Disable HPET support. 
<br><dt><samp><span class="option">-balloon none</span></samp><dd><a name="index-g_t_002dballoon-59"></a>Disable balloon device. 
<br><dt><samp><span class="option">-balloon virtio[,addr=</span><var>addr</var><span class="option">]</span></samp><dd>Enable virtio balloon device (default), optionally with PCI address
<var>addr</var>. 
<br><dt><samp><span class="option">-acpitable [sig=</span><var>str</var><span class="option">][,rev=</span><var>n</var><span class="option">][,oem_id=</span><var>str</var><span class="option">][,oem_table_id=</span><var>str</var><span class="option">][,oem_rev=</span><var>n</var><span class="option">] [,asl_compiler_id=</span><var>str</var><span class="option">][,asl_compiler_rev=</span><var>n</var><span class="option">][,data=</span><var>file1</var><span class="option">[:</span><var>file2</var><span class="option">]...]</span></samp><dd><a name="index-g_t_002dacpitable-60"></a>Add ACPI table with specified header fields and context from specified files. 
<br><dt><samp><span class="option">-smbios file=</span><var>binary</var></samp><dd><a name="index-g_t_002dsmbios-61"></a>Load SMBIOS entry from binary file.

     <br><dt><samp><span class="option">-smbios type=0[,vendor=</span><var>str</var><span class="option">][,version=</span><var>str</var><span class="option">][,date=</span><var>str</var><span class="option">][,release=</span><var>%d.%d</var><span class="option">]</span></samp><dd><a name="index-g_t_002dsmbios-62"></a>Specify SMBIOS type 0 fields

     <br><dt><samp><span class="option">-smbios type=1[,manufacturer=</span><var>str</var><span class="option">][,product=</span><var>str</var><span class="option">] [,version=</span><var>str</var><span class="option">][,serial=</span><var>str</var><span class="option">][,uuid=</span><var>uuid</var><span class="option">][,sku=</span><var>str</var><span class="option">] [,family=</span><var>str</var><span class="option">]</span></samp><dd>Specify SMBIOS type 1 fields

</dl>
Network options:
     <dl>
<dt><samp><span class="option">-net nic[,vlan=</span><var>n</var><span class="option">][,macaddr=</span><var>mac</var><span class="option">][,model=</span><var>type</var><span class="option">] [,name=</span><var>name</var><span class="option">][,addr=</span><var>addr</var><span class="option">][,vectors=</span><var>v</var><span class="option">]</span></samp><dd><a name="index-g_t_002dnet-63"></a>Create a new Network Interface Card and connect it to VLAN <var>n</var> (<var>n</var>
= 0 is the default). The NIC is an e1000 by default on the PC
target. Optionally, the MAC address can be changed to <var>mac</var>, the
device address set to <var>addr</var> (PCI cards only),
and a <var>name</var> can be assigned for use in monitor commands. 
Optionally, for PCI cards, you can specify the number <var>v</var> of MSI-X vectors
that the card should have; this option currently only affects virtio cards; set
<var>v</var> = 0 to disable MSI-X. If no <samp><span class="option">-net</span></samp> option is specified, a single
NIC is created.  Qemu can emulate several different models of network card. 
Valid values for <var>type</var> are
<code>virtio</code>, <code>i82551</code>, <code>i82557b</code>, <code>i82559er</code>,
<code>ne2k_pci</code>, <code>ne2k_isa</code>, <code>pcnet</code>, <code>rtl8139</code>,
<code>e1000</code>, <code>smc91c111</code>, <code>lance</code> and <code>mcf_fec</code>. 
Not all devices are supported on all targets.  Use -net nic,model=? 
for a list of available devices for your target.

     <br><dt><samp><span class="option">-net user[,</span><var>option</var><span class="option">][,</span><var>option</var><span class="option">][,...]</span></samp><dd>Use the user mode network stack which requires no administrator
privilege to run. Valid options are:

          <dl>
<dt><samp><span class="option">vlan=</span><var>n</var></samp><dd>Connect user mode stack to VLAN <var>n</var> (<var>n</var> = 0 is the default).

          <br><dt><samp><span class="option">name=</span><var>name</var></samp><dd>Assign symbolic name for use in monitor commands.

          <br><dt><samp><span class="option">net=</span><var>addr</var><span class="option">[/</span><var>mask</var><span class="option">]</span></samp><dd>Set IP network address the guest will see. Optionally specify the netmask,
either in the form a.b.c.d or as number of valid top-most bits. Default is
10.0.2.0/8.

          <br><dt><samp><span class="option">host=</span><var>addr</var></samp><dd>Specify the guest-visible address of the host. Default is the 2nd IP in the
guest network, i.e. x.x.x.2.

          <br><dt><samp><span class="option">restrict=y|yes|n|no</span></samp><dd>If this options is enabled, the guest will be isolated, i.e. it will not be
able to contact the host and no guest IP packets will be routed over the host
to the outside. This option does not affect explicitly set forwarding rule.

          <br><dt><samp><span class="option">hostname=</span><var>name</var></samp><dd>Specifies the client hostname reported by the builtin DHCP server.

          <br><dt><samp><span class="option">dhcpstart=</span><var>addr</var></samp><dd>Specify the first of the 16 IPs the built-in DHCP server can assign. Default
is the 16th to 31st IP in the guest network, i.e. x.x.x.16 to x.x.x.31.

          <br><dt><samp><span class="option">dns=</span><var>addr</var></samp><dd>Specify the guest-visible address of the virtual nameserver. The address must
be different from the host address. Default is the 3rd IP in the guest network,
i.e. x.x.x.3.

          <br><dt><samp><span class="option">tftp=</span><var>dir</var></samp><dd>When using the user mode network stack, activate a built-in TFTP
server. The files in <var>dir</var> will be exposed as the root of a TFTP server. 
The TFTP client on the guest must be configured in binary mode (use the command
<code>bin</code> of the Unix TFTP client).

          <br><dt><samp><span class="option">bootfile=</span><var>file</var></samp><dd>When using the user mode network stack, broadcast <var>file</var> as the BOOTP
filename. In conjunction with <samp><span class="option">tftp</span></samp>, this can be used to network boot
a guest from a local directory.

          <p>Example (using pxelinux):
          <pre class="example">          qemu -hda linux.img -boot n -net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
</pre>
          <br><dt><samp><span class="option">smb=</span><var>dir</var><span class="option">[,smbserver=</span><var>addr</var><span class="option">]</span></samp><dd>When using the user mode network stack, activate a built-in SMB
server so that Windows OSes can access to the host files in <samp><var>dir</var></samp>
transparently. The IP address of the SMB server can be set to <var>addr</var>. By
default the 4th IP in the guest network is used, i.e. x.x.x.4.

          <p>In the guest Windows OS, the line:
          <pre class="example">          10.0.2.4 smbserver
</pre>
          <p>must be added in the file <samp><span class="file">C:\WINDOWS\LMHOSTS</span></samp> (for windows 9x/Me)
or <samp><span class="file">C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS</span></samp> (Windows NT/2000).

          <p>Then <samp><var>dir</var></samp> can be accessed in <samp><span class="file">\\smbserver\qemu</span></samp>.

          <p>Note that a SAMBA server must be installed on the host OS in
<samp><span class="file">/usr/sbin/smbd</span></samp>. QEMU was tested successfully with smbd versions from
Red Hat 9, Fedora Core 3 and OpenSUSE 11.x.

          <br><dt><samp><span class="option">hostfwd=[tcp|udp]:[</span><var>hostaddr</var><span class="option">]:</span><var>hostport</var><span class="option">-[</span><var>guestaddr</var><span class="option">]:</span><var>guestport</var></samp><dd>Redirect incoming TCP or UDP connections to the host port <var>hostport</var> to
the guest IP address <var>guestaddr</var> on guest port <var>guestport</var>. If
<var>guestaddr</var> is not specified, its value is x.x.x.15 (default first address
given by the built-in DHCP server). By specifying <var>hostaddr</var>, the rule can
be bound to a specific host interface. If no connection type is set, TCP is
used. This option can be given multiple times.

          <p>For example, to redirect host X11 connection from screen 1 to guest
screen 0, use the following:

          <pre class="example">          # on the host
          qemu -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
          # this host xterm should open in the guest X11 server
          xterm -display :1
</pre>
          <p>To redirect telnet connections from host port 5555 to telnet port on
the guest, use the following:

          <pre class="example">          # on the host
          qemu -net user,hostfwd=tcp::5555-:23 [...]
          telnet localhost 5555
</pre>
          <p>Then when you use on the host <code>telnet localhost 5555</code>, you
connect to the guest telnet server.

          <br><dt><samp><span class="option">guestfwd=[tcp]:</span><var>server</var><span class="option">:</span><var>port</var><span class="option">-</span><var>dev</var></samp><dd>Forward guest TCP connections to the IP address <var>server</var> on port <var>port</var>
to the character device <var>dev</var>. This option can be given multiple times.

     </dl>

     <p>Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still
processed and applied to -net user. Mixing them with the new configuration
syntax gives undefined results. Their use for new applications is discouraged
as they will be removed from future versions.

     <br><dt><samp><span class="option">-net tap[,vlan=</span><var>n</var><span class="option">][,name=</span><var>name</var><span class="option">][,fd=</span><var>h</var><span class="option">][,ifname=</span><var>name</var><span class="option">] [,script=</span><var>file</var><span class="option">][,downscript=</span><var>dfile</var><span class="option">]</span></samp><dd>Connect the host TAP network interface <var>name</var> to VLAN <var>n</var>, use
the network script <var>file</var> to configure it and the network script
<var>dfile</var> to deconfigure it. If <var>name</var> is not provided, the OS
automatically provides one. <samp><span class="option">fd</span></samp>=<var>h</var> can be used to specify
the handle of an already opened host TAP interface. The default network
configure script is <samp><span class="file">/etc/qemu-ifup</span></samp> and the default network
deconfigure script is <samp><span class="file">/etc/qemu-ifdown</span></samp>. Use <samp><span class="option">script=no</span></samp>
or <samp><span class="option">downscript=no</span></samp> to disable script execution. Example:

     <pre class="example">     qemu linux.img -net nic -net tap
</pre>
     <p>More complicated example (two NICs, each one connected to a TAP device)
     <pre class="example">     qemu linux.img -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
     -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
</pre>
     <br><dt><samp><span class="option">-net socket[,vlan=</span><var>n</var><span class="option">][,name=</span><var>name</var><span class="option">][,fd=</span><var>h</var><span class="option">] [,listen=[</span><var>host</var><span class="option">]:</span><var>port</var><span class="option">][,connect=</span><var>host</var><span class="option">:</span><var>port</var><span class="option">]</span></samp><dd>
Connect the VLAN <var>n</var> to a remote VLAN in another QEMU virtual
machine using a TCP socket connection. If <samp><span class="option">listen</span></samp> is
specified, QEMU waits for incoming connections on <var>port</var>
(<var>host</var> is optional). <samp><span class="option">connect</span></samp> is used to connect to
another QEMU instance using the <samp><span class="option">listen</span></samp> option. <samp><span class="option">fd</span></samp>=<var>h</var>
specifies an already opened TCP socket.

     <p>Example:
     <pre class="example">     # launch a first QEMU instance
     qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
     -net socket,listen=:1234
     # connect the VLAN 0 of this instance to the VLAN 0
     # of the first instance
     qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
     -net socket,connect=127.0.0.1:1234
</pre>
     <br><dt><samp><span class="option">-net socket[,vlan=</span><var>n</var><span class="option">][,name=</span><var>name</var><span class="option">][,fd=</span><var>h</var><span class="option">] [,mcast=</span><var>maddr</var><span class="option">:</span><var>port</var><span class="option">]</span></samp><dd>
Create a VLAN <var>n</var> shared with another QEMU virtual
machines using a UDP multicast socket, effectively making a bus for
every QEMU with same multicast address <var>maddr</var> and <var>port</var>. 
NOTES:
          <ol type=1 start=1>
<li>Several QEMU can be running on different hosts and share same bus (assuming
correct multicast setup for these hosts). 
<li>mcast support is compatible with User Mode Linux (argument <samp><span class="option">eth</span><var>N</var><span class="option">=mcast</span></samp>), see
<a href="http://user-mode-linux.sf.net">http://user-mode-linux.sf.net</a>. 
<li>Use <samp><span class="option">fd=h</span></samp> to specify an already opened UDP multicast socket.
          </ol>

     <p>Example:
     <pre class="example">     # launch one QEMU instance
     qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
     -net socket,mcast=230.0.0.1:1234
     # launch another QEMU instance on same "bus"
     qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
     -net socket,mcast=230.0.0.1:1234
     # launch yet another QEMU instance on same "bus"
     qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \
     -net socket,mcast=230.0.0.1:1234
</pre>
     <p>Example (User Mode Linux compat.):
     <pre class="example">     # launch QEMU instance (note mcast address selected
     # is UML's default)
     qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
     -net socket,mcast=239.192.168.1:1102
     # launch UML
     /path/to/linux ubd0=/path/to/root_fs eth0=mcast
</pre>
     <br><dt><samp><span class="option">-net vde[,vlan=</span><var>n</var><span class="option">][,name=</span><var>name</var><span class="option">][,sock=</span><var>socketpath</var><span class="option">] [,port=</span><var>n</var><span class="option">][,group=</span><var>groupname</var><span class="option">][,mode=</span><var>octalmode</var><span class="option">]</span></samp><dd>Connect VLAN <var>n</var> to PORT <var>n</var> of a vde switch running on host and
listening for incoming connections on <var>socketpath</var>. Use GROUP <var>groupname</var>
and MODE <var>octalmode</var> to change default ownership and permissions for
communication port. This option is available only if QEMU has been compiled
with vde support enabled.

     <p>Example:
     <pre class="example">     # launch vde switch
     vde_switch -F -sock /tmp/myswitch
     # launch QEMU instance
     qemu linux.img -net nic -net vde,sock=/tmp/myswitch
</pre>
     <br><dt><samp><span class="option">-net dump[,vlan=</span><var>n</var><span class="option">][,file=</span><var>file</var><span class="option">][,len=</span><var>len</var><span class="option">]</span></samp><dd>Dump network traffic on VLAN <var>n</var> to file <var>file</var> (<samp><span class="file">qemu-vlan0.pcap</span></samp> by default). 
At most <var>len</var> bytes (64k by default) per packet are stored. The file format is
libpcap, so it can be analyzed with tools such as tcpdump or Wireshark.

     <br><dt><samp><span class="option">-net none</span></samp><dd>Indicate that no network devices should be configured. It is used to
override the default configuration (<samp><span class="option">-net nic -net user</span></samp>) which
is activated if no <samp><span class="option">-net</span></samp> options are provided.

</dl>

<p>Character device options:

<p>The general form of a character device option is:
     <dl>
<dt><samp><span class="option">-chardev </span><var>backend</var><span class="option"> ,id=</span><var>id</var><span class="option"> [,mux=on|off] [,</span><var>options</var><span class="option">]</span></samp><dd><a name="index-g_t_002dchardev-64"></a>Backend is one of:
<samp><span class="option">null</span></samp>,
<samp><span class="option">socket</span></samp>,
<samp><span class="option">udp</span></samp>,
<samp><span class="option">msmouse</span></samp>,
<samp><span class="option">vc</span></samp>,
<samp><span class="option">file</span></samp>,
<samp><span class="option">pipe</span></samp>,
<samp><span class="option">console</span></samp>,
<samp><span class="option">serial</span></samp>,
<samp><span class="option">pty</span></samp>,
<samp><span class="option">stdio</span></samp>,
<samp><span class="option">braille</span></samp>,
<samp><span class="option">tty</span></samp>,
<samp><span class="option">parport</span></samp>. 
The specific backend will determine the applicable options.

     <p>All devices must have an id, which can be any string up to 127 characters long. 
It is used to uniquely identify this device in other command line directives.

     <p>A character device may be used in multiplexing mode by multiple front-ends. 
The key sequence of &lt;Control-a&gt; and &lt;c&gt; will rotate the input focus
between attached front-ends. Specify <samp><span class="option">mux=on</span></samp> to enable this mode.

     <p>Options to each backend are described below.

     <br><dt><samp><span class="option">-chardev null ,id=</span><var>id</var></samp><dd>A void device. This device will not emit any data, and will drop any data it
receives. The null backend does not take any options.

     <br><dt><samp><span class="option">-chardev socket ,id=</span><var>id</var><span class="option"> [</span><var>TCP options</var><span class="option"> or </span><var>unix options</var><span class="option">] [,server] [,nowait] [,telnet]</span></samp><dd>
Create a two-way stream socket, which can be either a TCP or a unix socket. A
unix socket will be created if <samp><span class="option">path</span></samp> is specified. Behaviour is
undefined if TCP options are specified for a unix socket.

     <p><samp><span class="option">server</span></samp> specifies that the socket shall be a listening socket.

     <p><samp><span class="option">nowait</span></samp> specifies that QEMU should not block waiting for a client to
connect to a listening socket.

     <p><samp><span class="option">telnet</span></samp> specifies that traffic on the socket should interpret telnet
escape sequences.

     <p>TCP and unix socket options are given below:

          <dl>
<dt><samp><span class="option">TCP options: port=</span><var>port</var><span class="option"> [,host=</span><var>host</var><span class="option">] [,to=</span><var>to</var><span class="option">] [,ipv4] [,ipv6] [,nodelay]</span></samp><dd>
<samp><span class="option">host</span></samp> for a listening socket specifies the local address to be bound. 
For a connecting socket species the remote host to connect to. <samp><span class="option">host</span></samp> is
optional for listening sockets. If not specified it defaults to <code>0.0.0.0</code>.

          <p><samp><span class="option">port</span></samp> for a listening socket specifies the local port to be bound. For a
connecting socket specifies the port on the remote host to connect to. 
<samp><span class="option">port</span></samp> can be given as either a port number or a service name. 
<samp><span class="option">port</span></samp> is required.

          <p><samp><span class="option">to</span></samp> is only relevant to listening sockets. If it is specified, and
<samp><span class="option">port</span></samp> cannot be bound, QEMU will attempt to bind to subsequent ports up
to and including <samp><span class="option">to</span></samp> until it succeeds. <samp><span class="option">to</span></samp> must be specified
as a port number.

          <p><samp><span class="option">ipv4</span></samp> and <samp><span class="option">ipv6</span></samp> specify that either IPv4 or IPv6 must be used. 
If neither is specified the socket may use either protocol.

          <p><samp><span class="option">nodelay</span></samp> disables the Nagle algorithm.

          <br><dt><samp><span class="option">unix options: path=</span><var>path</var></samp><dd>
<samp><span class="option">path</span></samp> specifies the local path of the unix socket. <samp><span class="option">path</span></samp> is
required.

     </dl>

     <br><dt><samp><span class="option">-chardev udp ,id=</span><var>id</var><span class="option"> [,host=</span><var>host</var><span class="option">] ,port=</span><var>port</var><span class="option"> [,localaddr=</span><var>localaddr</var><span class="option">] [,localport=</span><var>localport</var><span class="option">] [,ipv4] [,ipv6]</span></samp><dd>
Sends all traffic from the guest to a remote host over UDP.

     <p><samp><span class="option">host</span></samp> specifies the remote host to connect to. If not specified it
defaults to <code>localhost</code>.

     <p><samp><span class="option">port</span></samp> specifies the port on the remote host to connect to. <samp><span class="option">port</span></samp>
is required.

     <p><samp><span class="option">localaddr</span></samp> specifies the local address to bind to. If not specified it
defaults to <code>0.0.0.0</code>.

     <p><samp><span class="option">localport</span></samp> specifies the local port to bind to. If not specified any
available local port will be used.

     <p><samp><span class="option">ipv4</span></samp> and <samp><span class="option">ipv6</span></samp> specify that either IPv4 or IPv6 must be used. 
If neither is specified the device may use either protocol.

     <br><dt><samp><span class="option">-chardev msmouse ,id=</span><var>id</var></samp><dd>
Forward QEMU's emulated msmouse events to the guest. <samp><span class="option">msmouse</span></samp> does not
take any options.

     <br><dt><samp><span class="option">-chardev vc ,id=</span><var>id</var><span class="option"> [[,width=</span><var>width</var><span class="option">] [,height=</span><var>height</var><span class="option">]] [[,cols=</span><var>cols</var><span class="option">] [,rows=</span><var>rows</var><span class="option">]]</span></samp><dd>
Connect to a QEMU text console. <samp><span class="option">vc</span></samp> may optionally be given a specific
size.

     <p><samp><span class="option">width</span></samp> and <samp><span class="option">height</span></samp> specify the width and height respectively of
the console, in pixels.

     <p><samp><span class="option">cols</span></samp> and <samp><span class="option">rows</span></samp> specify that the console be sized to fit a text
console with the given dimensions.

     <br><dt><samp><span class="option">-chardev file ,id=</span><var>id</var><span class="option"> ,path=</span><var>path</var></samp><dd>
Log all traffic received from the guest to a file.

     <p><samp><span class="option">path</span></samp> specifies the path of the file to be opened. This file will be
created if it does not already exist, and overwritten if it does. <samp><span class="option">path</span></samp>
is required.

     <br><dt><samp><span class="option">-chardev pipe ,id=</span><var>id</var><span class="option"> ,path=</span><var>path</var></samp><dd>
Create a two-way connection to the guest. The behaviour differs slightly between
Windows hosts and other hosts:

     <p>On Windows, a single duplex pipe will be created at
<samp><span class="file">\\.pipe\</span><samp><span class="option">path</span></samp></samp>.

     <p>On other hosts, 2 pipes will be created called <samp><samp><span class="option">path</span></samp><span class="file">.in</span></samp> and
<samp><samp><span class="option">path</span></samp><span class="file">.out</span></samp>. Data written to <samp><samp><span class="option">path</span></samp><span class="file">.in</span></samp> will be
received by the guest. Data written by the guest can be read from
<samp><samp><span class="option">path</span></samp><span class="file">.out</span></samp>. QEMU will not create these fifos, and requires them to
be present.

     <p><samp><span class="option">path</span></samp> forms part of the pipe path as described above. <samp><span class="option">path</span></samp> is
required.

     <br><dt><samp><span class="option">-chardev console ,id=</span><var>id</var></samp><dd>
Send traffic from the guest to QEMU's standard output. <samp><span class="option">console</span></samp> does not
take any options.

     <p><samp><span class="option">console</span></samp> is only available on Windows hosts.

     <br><dt><samp><span class="option">-chardev serial ,id=</span><var>id</var><span class="option"> ,path=</span><samp><span class="option">path</span></samp></samp><dd>
Send traffic from the guest to a serial device on the host.

     <p><samp><span class="option">serial</span></samp> is
only available on Windows hosts.

     <p><samp><span class="option">path</span></samp> specifies the name of the serial device to open.

     <br><dt><samp><span class="option">-chardev pty ,id=</span><var>id</var></samp><dd>
Create a new pseudo-terminal on the host and connect to it. <samp><span class="option">pty</span></samp> does
not take any options.

     <p><samp><span class="option">pty</span></samp> is not available on Windows hosts.

     <br><dt><samp><span class="option">-chardev stdio ,id=</span><var>id</var><span class="option"> [,signal=on|off]</span></samp><dd>Connect to standard input and standard output of the qemu process.

     <p><samp><span class="option">signal</span></samp> controls if signals are enabled on the terminal, that includes
exiting QEMU with the key sequence &lt;Control-c&gt;. This option is enabled by
default, use <samp><span class="option">signal=off</span></samp> to disable it.

     <p><samp><span class="option">stdio</span></samp> is not available on Windows hosts.

     <br><dt><samp><span class="option">-chardev braille ,id=</span><var>id</var></samp><dd>
Connect to a local BrlAPI server. <samp><span class="option">braille</span></samp> does not take any options.

     <br><dt><samp><span class="option">-chardev tty ,id=</span><var>id</var><span class="option"> ,path=</span><var>path</var></samp><dd>
Connect to a local tty device.

     <p><samp><span class="option">tty</span></samp> is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and
DragonFlyBSD hosts.

     <p><samp><span class="option">path</span></samp> specifies the path to the tty. <samp><span class="option">path</span></samp> is required.

     <br><dt><samp><span class="option">-chardev parport ,id=</span><var>id</var><span class="option"> ,path=</span><var>path</var></samp><dd>
<samp><span class="option">parport</span></samp> is only available on Linux, FreeBSD and DragonFlyBSD hosts.

     <p>Connect to a local parallel port.

     <p><samp><span class="option">path</span></samp> specifies the path to the parallel port device. <samp><span class="option">path</span></samp> is
required.

</dl>

<p>Bluetooth(R) options:
     <dl>
<dt><samp><span class="option">-bt hci[...]</span></samp><dd><a name="index-g_t_002dbt-65"></a>Defines the function of the corresponding Bluetooth HCI.  -bt options
are matched with the HCIs present in the chosen machine type.  For
example when emulating a machine with only one HCI built into it, only
the first <code>-bt hci[...]</code> option is valid and defines the HCI's
logic.  The Transport Layer is decided by the machine type.  Currently
the machines <code>n800</code> and <code>n810</code> have one HCI and all other
machines have none.

     <p><a name="bt_002dhcis"></a>The following three types are recognized:

          <dl>
<dt><samp><span class="option">-bt hci,null</span></samp><dd>(default) The corresponding Bluetooth HCI assumes no internal logic
and will not respond to any HCI commands or emit events.

          <br><dt><samp><span class="option">-bt hci,host[:</span><var>id</var><span class="option">]</span></samp><dd>(<code>bluez</code> only) The corresponding HCI passes commands / events
to / from the physical HCI identified by the name <var>id</var> (default:
<code>hci0</code>) on the computer running QEMU.  Only available on <code>bluez</code>
capable systems like Linux.

          <br><dt><samp><span class="option">-bt hci[,vlan=</span><var>n</var><span class="option">]</span></samp><dd>Add a virtual, standard HCI that will participate in the Bluetooth
scatternet <var>n</var> (default <code>0</code>).  Similarly to <samp><span class="option">-net</span></samp>
VLANs, devices inside a bluetooth network <var>n</var> can only communicate
with other devices in the same network (scatternet). 
</dl>

     <br><dt><samp><span class="option">-bt vhci[,vlan=</span><var>n</var><span class="option">]</span></samp><dd>(Linux-host only) Create a HCI in scatternet <var>n</var> (default 0) attached
to the host bluetooth stack instead of to the emulated target.  This
allows the host and target machines to participate in a common scatternet
and communicate.  Requires the Linux <code>vhci</code> driver installed.  Can
be used as following:

     <pre class="example">     qemu [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
</pre>
     <br><dt><samp><span class="option">-bt device:</span><var>dev</var><span class="option">[,vlan=</span><var>n</var><span class="option">]</span></samp><dd>Emulate a bluetooth device <var>dev</var> and place it in network <var>n</var>
(default <code>0</code>).  QEMU can only emulate one type of bluetooth devices
currently:

          <dl>
<dt><samp><span class="option">keyboard</span></samp><dd>Virtual wireless keyboard implementing the HIDP bluetooth profile. 
</dl>
     </dl>

<p>Linux/Multiboot boot specific:

<p>When using these options, you can use a given Linux or Multiboot
kernel without installing it in the disk image. It can be useful
for easier testing of various kernels.

     <dl>
<dt><samp><span class="option">-kernel </span><var>bzImage</var></samp><dd><a name="index-g_t_002dkernel-66"></a>Use <var>bzImage</var> as kernel image. The kernel can be either a Linux kernel
or in multiboot format. 
<br><dt><samp><span class="option">-append </span><var>cmdline</var></samp><dd><a name="index-g_t_002dappend-67"></a>Use <var>cmdline</var> as kernel command line
<br><dt><samp><span class="option">-initrd </span><var>file</var></samp><dd><a name="index-g_t_002dinitrd-68"></a>Use <var>file</var> as initial ram disk.

     <br><dt><samp><span class="option">-initrd "</span><var>file1</var><span class="option"> arg=foo,</span><var>file2</var><span class="option">"</span></samp><dd>
This syntax is only available with multiboot.

     <p>Use <var>file1</var> and <var>file2</var> as modules and pass arg=foo as parameter to the
first module. 
</dl>

<p>Debug/Expert options:
     <dl>
<dt><samp><span class="option">-serial </span><var>dev</var></samp><dd><a name="index-g_t_002dserial-69"></a>Redirect the virtual serial port to host character device
<var>dev</var>. The default device is <code>vc</code> in graphical mode and
<code>stdio</code> in non graphical mode.

     <p>This option can be used several times to simulate up to 4 serial
ports.

     <p>Use <code>-serial none</code> to disable all serial ports.

     <p>Available character devices are:
          <dl>
<dt><samp><span class="option">vc[:</span><var>W</var><span class="option">x</span><var>H</var><span class="option">]</span></samp><dd>Virtual console. Optionally, a width and height can be given in pixel with
          <pre class="example">          vc:800x600
</pre>
          <p>It is also possible to specify width or height in characters:
          <pre class="example">          vc:80Cx24C
</pre>
          <br><dt><samp><span class="option">pty</span></samp><dd>[Linux only] Pseudo TTY (a new PTY is automatically allocated)
<br><dt><samp><span class="option">none</span></samp><dd>No device is allocated. 
<br><dt><samp><span class="option">null</span></samp><dd>void device
<br><dt><samp><span class="option">/dev/XXX</span></samp><dd>[Linux only] Use host tty, e.g. <samp><span class="file">/dev/ttyS0</span></samp>. The host serial port
parameters are set according to the emulated ones. 
<br><dt><samp><span class="option">/dev/parport</span><var>N</var></samp><dd>[Linux only, parallel port only] Use host parallel port
<var>N</var>. Currently SPP and EPP parallel port features can be used. 
<br><dt><samp><span class="option">file:</span><var>filename</var></samp><dd>Write output to <var>filename</var>. No character can be read. 
<br><dt><samp><span class="option">stdio</span></samp><dd>[Unix only] standard input/output
<br><dt><samp><span class="option">pipe:</span><var>filename</var></samp><dd>name pipe <var>filename</var>
<br><dt><samp><span class="option">COM</span><var>n</var></samp><dd>[Windows only] Use host serial port <var>n</var>
<br><dt><samp><span class="option">udp:[</span><var>remote_host</var><span class="option">]:</span><var>remote_port</var><span class="option">[@[</span><var>src_ip</var><span class="option">]:</span><var>src_port</var><span class="option">]</span></samp><dd>This implements UDP Net Console. 
When <var>remote_host</var> or <var>src_ip</var> are not specified
they default to <code>0.0.0.0</code>. 
When not using a specified <var>src_port</var> a random port is automatically chosen.

          <p>If you just want a simple readonly console you can use <code>netcat</code> or
<code>nc</code>, by starting qemu with: <code>-serial udp::4555</code> and nc as:
<code>nc -u -l -p 4555</code>. Any time qemu writes something to that port it
will appear in the netconsole session.

          <p>If you plan to send characters back via netconsole or you want to stop
and start qemu a lot of times, you should have qemu use the same
source port each time by using something like <code>-serial
udp::4555@:4556</code> to qemu. Another approach is to use a patched
version of netcat which can listen to a TCP port and send and receive
characters via udp.  If you have a patched version of netcat which
activates telnet remote echo and single char transfer, then you can
use the following options to step up a netcat redirector to allow
telnet on port 5555 to access the qemu port.
               <dl>
<dt><code>Qemu Options:</code><dd>-serial udp::4555@:4556
<br><dt><code>netcat options:</code><dd>-u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
<br><dt><code>telnet options:</code><dd>localhost 5555
</dl>

          <br><dt><samp><span class="option">tcp:[</span><var>host</var><span class="option">]:</span><var>port</var><span class="option">[,</span><var>server</var><span class="option">][,nowait][,nodelay]</span></samp><dd>The TCP Net Console has two modes of operation.  It can send the serial
I/O to a location or wait for a connection from a location.  By default
the TCP Net Console is sent to <var>host</var> at the <var>port</var>.  If you use
the <var>server</var> option QEMU will wait for a client socket application
to connect to the port before continuing, unless the <code>nowait</code>
option was specified.  The <code>nodelay</code> option disables the Nagle buffering
algorithm.  If <var>host</var> is omitted, 0.0.0.0 is assumed. Only
one TCP connection at a time is accepted. You can use <code>telnet</code> to
connect to the corresponding character device.
               <dl>
<dt><code>Example to send tcp console to 192.168.0.2 port 4444</code><dd>-serial tcp:192.168.0.2:4444
<br><dt><code>Example to listen and wait on port 4444 for connection</code><dd>-serial tcp::4444,server
<br><dt><code>Example to not wait and listen on ip 192.168.0.100 port 4444</code><dd>-serial tcp:192.168.0.100:4444,server,nowait
</dl>

          <br><dt><samp><span class="option">telnet:</span><var>host</var><span class="option">:</span><var>port</var><span class="option">[,server][,nowait][,nodelay]</span></samp><dd>The telnet protocol is used instead of raw tcp sockets.  The options
work the same as if you had specified <code>-serial tcp</code>.  The
difference is that the port acts like a telnet server or client using
telnet option negotiation.  This will also allow you to send the
MAGIC_SYSRQ sequence if you use a telnet that supports sending the break
sequence.  Typically in unix telnet you do it with Control-] and then
type "send break" followed by pressing the enter key.

          <br><dt><samp><span class="option">unix:</span><var>path</var><span class="option">[,server][,nowait]</span></samp><dd>A unix domain socket is used instead of a tcp socket.  The option works the
same as if you had specified <code>-serial tcp</code> except the unix domain socket
<var>path</var> is used for connections.

          <br><dt><samp><span class="option">mon:</span><var>dev_string</var></samp><dd>This is a special option to allow the monitor to be multiplexed onto
another serial port.  The monitor is accessed with key sequence of
&lt;Control-a&gt; and then pressing &lt;c&gt;. See monitor access
<a href="#pcsys_005fkeys">pcsys_keys</a> in the -nographic section for more keys. 
<var>dev_string</var> should be any one of the serial devices specified
above.  An example to multiplex the monitor onto a telnet server
listening on port 4444 would be:
               <dl>
<dt><code>-serial mon:telnet::4444,server,nowait</code><dd></dl>

          <br><dt><samp><span class="option">braille</span></samp><dd>Braille device.  This will use BrlAPI to display the braille output on a real
or fake device.

          <br><dt><samp><span class="option">msmouse</span></samp><dd>Three button serial mouse. Configure the guest to use Microsoft protocol. 
</dl>
     <br><dt><samp><span class="option">-parallel </span><var>dev</var></samp><dd><a name="index-g_t_002dparallel-70"></a>Redirect the virtual parallel port to host device <var>dev</var> (same
devices as the serial port). On Linux hosts, <samp><span class="file">/dev/parportN</span></samp> can
be used to use hardware devices connected on the corresponding host
parallel port.

     <p>This option can be used several times to simulate up to 3 parallel
ports.

     <p>Use <code>-parallel none</code> to disable all parallel ports. 
<br><dt><samp><span class="option">-monitor </span><var>dev</var></samp><dd><a name="index-g_t_002dmonitor-71"></a>Redirect the monitor to host device <var>dev</var> (same devices as the
serial port). 
The default device is <code>vc</code> in graphical mode and <code>stdio</code> in
non graphical mode. 
<br><dt><samp><span class="option">-qmp </span><var>dev</var></samp><dd><a name="index-g_t_002dqmp-72"></a>Like -monitor but opens in 'control' mode. 
<br><dt><samp><span class="option">-mon chardev=[name][,mode=readline|control][,default]</span></samp><dd><a name="index-g_t_002dmon-73"></a>Setup monitor on chardev <var>name</var>. 
<br><dt><samp><span class="option">-debugcon </span><var>dev</var></samp><dd><a name="index-g_t_002ddebugcon-74"></a>Redirect the debug console to host device <var>dev</var> (same devices as the
serial port).  The debug console is an I/O port which is typically port
0xe9; writing to that I/O port sends output to this device. 
The default device is <code>vc</code> in graphical mode and <code>stdio</code> in
non graphical mode. 
<br><dt><samp><span class="option">-pidfile </span><var>file</var></samp><dd><a name="index-g_t_002dpidfile-75"></a>Store the QEMU process PID in <var>file</var>. It is useful if you launch QEMU
from a script. 
<br><dt><samp><span class="option">-singlestep</span></samp><dd><a name="index-g_t_002dsinglestep-76"></a>Run the emulation in single step mode. 
<br><dt><samp><span class="option">-S</span></samp><dd><a name="index-g_t_002dS-77"></a>Do not start CPU at startup (you must type 'c' in the monitor). 
<br><dt><samp><span class="option">-gdb </span><var>dev</var></samp><dd><a name="index-g_t_002dgdb-78"></a>Wait for gdb connection on device <var>dev</var> (see <a href="#gdb_005fusage">gdb_usage</a>). Typical
connections will likely be TCP-based, but also UDP, pseudo TTY, or even
stdio are reasonable use case. The latter is allowing to start qemu from
within gdb and establish the connection via a pipe:
     <pre class="example">     (gdb) target remote | exec qemu -gdb stdio ...
</pre>
     <br><dt><samp><span class="option">-s</span></samp><dd><a name="index-g_t_002ds-79"></a>Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
(see <a href="#gdb_005fusage">gdb_usage</a>). 
<br><dt><samp><span class="option">-d</span></samp><dd><a name="index-g_t_002dd-80"></a>Output log in /tmp/qemu.log
<br><dt><samp><span class="option">-hdachs </span><var>c</var><span class="option">,</span><var>h</var><span class="option">,</span><var>s</var><span class="option">,[,</span><var>t</var><span class="option">]</span></samp><dd><a name="index-g_t_002dhdachs-81"></a>Force hard disk 0 physical geometry (1 &lt;= <var>c</var> &lt;= 16383, 1 &lt;=
<var>h</var> &lt;= 16, 1 &lt;= <var>s</var> &lt;= 63) and optionally force the BIOS
translation mode (<var>t</var>=none, lba or auto). Usually QEMU can guess
all those parameters. This option is useful for old MS-DOS disk
images. 
<br><dt><samp><span class="option">-L  </span><var>path</var></samp><dd><a name="index-g_t_002dL-82"></a>Set the directory for the BIOS, VGA BIOS and keymaps. 
<br><dt><samp><span class="option">-bios </span><var>file</var></samp><dd><a name="index-g_t_002dbios-83"></a>Set the filename for the BIOS. 
<br><dt><samp><span class="option">-enable-kvm</span></samp><dd><a name="index-g_t_002denable_002dkvm-84"></a>Enable KVM full virtualization support. This option is only available
if KVM support is enabled when compiling. 
<br><dt><samp><span class="option">-xen-domid </span><var>id</var></samp><dd><a name="index-g_t_002dxen_002ddomid-85"></a>Specify xen guest domain <var>id</var> (XEN only). 
<br><dt><samp><span class="option">-xen-create</span></samp><dd><a name="index-g_t_002dxen_002dcreate-86"></a>Create domain using xen hypercalls, bypassing xend. 
Warning: should not be used when xend is in use (XEN only). 
<br><dt><samp><span class="option">-xen-attach</span></samp><dd><a name="index-g_t_002dxen_002dattach-87"></a>Attach to existing xen domain. 
xend will use this when starting qemu (XEN only). 
<br><dt><samp><span class="option">-no-reboot</span></samp><dd><a name="index-g_t_002dno_002dreboot-88"></a>Exit instead of rebooting. 
<br><dt><samp><span class="option">-no-shutdown</span></samp><dd><a name="index-g_t_002dno_002dshutdown-89"></a>Don't exit QEMU on guest shutdown, but instead only stop the emulation. 
This allows for instance switching to monitor to commit changes to the
disk image. 
<br><dt><samp><span class="option">-loadvm </span><var>file</var></samp><dd><a name="index-g_t_002dloadvm-90"></a>Start right away with a saved state (<code>loadvm</code> in monitor)
<br><dt><samp><span class="option">-daemonize</span></samp><dd><a name="index-g_t_002ddaemonize-91"></a>Daemonize the QEMU process after initialization.  QEMU will not detach from
standard 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 having
to cope with initialization race conditions. 
<br><dt><samp><span class="option">-option-rom </span><var>file</var></samp><dd><a name="index-g_t_002doption_002drom-92"></a>Load the contents of <var>file</var> as an option ROM. 
This option is useful to load things like EtherBoot. 
<br><dt><samp><span class="option">-clock </span><var>method</var></samp><dd><a name="index-g_t_002dclock-93"></a>Force the use of the given methods for timer alarm. To see what timers
are available use -clock ?.

     <br><dt><samp><span class="option">-rtc [base=utc|localtime|</span><var>date</var><span class="option">][,clock=host|vm][,driftfix=none|slew]</span></samp><dd><a name="index-g_t_002drtc-94"></a>Specify <samp><span class="option">base</span></samp> as <code>utc</code> or <code>localtime</code> to let the RTC start at the current
UTC or local time, respectively. <code>localtime</code> is required for correct date in
MS-DOS or Windows. To start at a specific point in time, provide <var>date</var> in the
format <code>2006-06-17T16:01:21</code> or <code>2006-06-17</code>. The default base is UTC.

     <p>By default the RTC is driven by the host system time. This allows to use the
RTC as accurate reference clock inside the guest, specifically if the host
time is smoothly following an accurate external reference clock, e.g. via NTP. 
If you want to isolate the guest time from the host, even prevent it from
progressing during suspension, you can set <samp><span class="option">clock</span></samp> to <code>vm</code> instead.

     <p>Enable <samp><span class="option">driftfix</span></samp> (i386 targets only) if you experience time drift problems,
specifically with Windows' ACPI HAL. This option will try to figure out how
many timer interrupts were not processed by the Windows guest and will
re-inject them. 
<br><dt><samp><span class="option">-icount [</span><var>N</var><span class="option">|auto]</span></samp><dd><a name="index-g_t_002dicount-95"></a>Enable virtual instruction counter.  The virtual cpu will execute one
instruction every 2^<var>N</var> ns of virtual time.  If <code>auto</code> is specified
then the virtual cpu speed will be automatically adjusted to keep virtual
time within a few seconds of real time.

     <p>Note that while this option can give deterministic behavior, it does not
provide cycle accurate emulation.  Modern CPUs contain superscalar out of
order cores with complex cache hierarchies.  The number of instructions
executed often has little or no correlation with actual performance. 
<br><dt><samp><span class="option">-watchdog </span><var>model</var></samp><dd><a name="index-g_t_002dwatchdog-96"></a>Create a virtual hardware watchdog device.  Once enabled (by a guest
action), the watchdog must be periodically polled by an agent inside
the guest or else the guest will be restarted.

     <p>The <var>model</var> is the model of hardware watchdog to emulate.  Choices
for model are: <code>ib700</code> (iBASE 700) which is a very simple ISA
watchdog with a single timer, or <code>i6300esb</code> (Intel 6300ESB I/O
controller hub) which is a much more featureful PCI-based dual-timer
watchdog.  Choose a model for which your guest has drivers.

     <p>Use <code>-watchdog ?</code> to list available hardware models.  Only one
watchdog can be enabled for a guest. 
<br><dt><samp><span class="option">-watchdog-action </span><var>action</var></samp><dd>
The <var>action</var> controls what QEMU will do when the watchdog timer
expires. 
The default is
<code>reset</code> (forcefully reset the guest). 
Other possible actions are:
<code>shutdown</code> (attempt to gracefully shutdown the guest),
<code>poweroff</code> (forcefully poweroff the guest),
<code>pause</code> (pause the guest),
<code>debug</code> (print a debug message and continue), or
<code>none</code> (do nothing).

     <p>Note that the <code>shutdown</code> action requires that the guest responds
to ACPI signals, which it may not be able to do in the sort of
situations where the watchdog would have expired, and thus
<code>-watchdog-action shutdown</code> is not recommended for production use.

     <p>Examples:

          <dl>
<dt><code>-watchdog i6300esb -watchdog-action pause</code><br><dt><code>-watchdog ib700</code><dd></dl>

     <br><dt><samp><span class="option">-echr </span><var>numeric_ascii_value</var></samp><dd><a name="index-g_t_002dechr-97"></a>Change the escape character used for switching to the monitor when using
monitor and serial sharing.  The default is <code>0x01</code> when using the
<code>-nographic</code> option.  <code>0x01</code> is equal to pressing
<code>Control-a</code>.  You can select a different character from the ascii
control keys where 1 through 26 map to Control-a through Control-z.  For
instance you could use the either of the following to change the escape
character to Control-t.
          <dl>
<dt><code>-echr 0x14</code><br><dt><code>-echr 20</code><dd></dl>
     <br><dt><samp><span class="option">-virtioconsole </span><var>c</var></samp><dd><a name="index-g_t_002dvirtioconsole-98"></a>Set virtio console.

     <p>This option is maintained for backward compatibility.

     <p>Please use <code>-device virtconsole</code> for the new way of invocation. 
<br><dt><samp><span class="option">-show-cursor</span></samp><dd><a name="index-g_t_002dshow_002dcursor-99"></a>Show cursor. 
<br><dt><samp><span class="option">-tb-size </span><var>n</var></samp><dd><a name="index-g_t_002dtb_002dsize-100"></a>Set TB size. 
<br><dt><samp><span class="option">-incoming </span><var>port</var></samp><dd><a name="index-g_t_002dincoming-101"></a>Prepare for incoming migration, listen on <var>port</var>. 
<br><dt><samp><span class="option">-nodefaults</span></samp><dd><a name="index-g_t_002dnodefaults-102"></a>Don't create default devices. 
<br><dt><samp><span class="option">-chroot </span><var>dir</var></samp><dd><a name="index-g_t_002dchroot-103"></a>Immediately before starting guest execution, chroot to the specified
directory.  Especially useful in combination with -runas. 
<br><dt><samp><span class="option">-runas </span><var>user</var></samp><dd><a name="index-g_t_002drunas-104"></a>Immediately before starting guest execution, drop root privileges, switching
to the specified user. 
<br><dt><samp><span class="option">-prom-env </span><var>variable</var><span class="option">=</span><var>value</var></samp><dd><a name="index-g_t_002dprom_002denv-105"></a>Set OpenBIOS nvram <var>variable</var> to given <var>value</var> (PPC, SPARC only). 
<br><dt><samp><span class="option">-semihosting</span></samp><dd><a name="index-g_t_002dsemihosting-106"></a>Semihosting mode (ARM, M68K only). 
<br><dt><samp><span class="option">-old-param</span></samp><dd><a name="index-g_t_002dold_002dparam-_0028ARM_0029-107"></a>Old param mode (ARM only). 
<br><dt><samp><span class="option">-readconfig </span><var>file</var></samp><dd><a name="index-g_t_002dreadconfig-108"></a>Read device configuration from <var>file</var>. 
<br><dt><samp><span class="option">-writeconfig </span><var>file</var></samp><dd><a name="index-g_t_002dwriteconfig-109"></a>Write device configuration to <var>file</var>. 
<br><dt><samp><span class="option">-nodefconfig</span></samp><dd><a name="index-g_t_002dnodefconfig-110"></a>Normally QEMU loads a configuration file from <var>sysconfdir</var>/qemu.conf and
<var>sysconfdir</var>/target-<var>ARCH</var>.conf on startup.  The <code>-nodefconfig</code>
option will prevent QEMU from loading these configuration files at startup. 
</dl>

<!-- man end -->
<p><a name="pcsys_keys"></a>
<a name="pcsys_005fkeys"></a>

<h3 class="section">3.4 Keys</h3>

<!-- man begin OPTIONS -->
<p>During the graphical emulation, you can use the following keys:
     <dl>
<dt>&lt;Ctrl-Alt-f&gt;<dd><a name="index-Ctrl_002dAlt_002df-111"></a>Toggle full screen

     <br><dt>&lt;Ctrl-Alt-u&gt;<dd><a name="index-Ctrl_002dAlt_002du-112"></a>Restore the screen's un-scaled dimensions

     <br><dt>&lt;Ctrl-Alt-n&gt;<dd><a name="index-Ctrl_002dAlt_002dn-113"></a>Switch to virtual console 'n'. Standard console mappings are:
          <dl>
<dt><em>1</em><dd>Target system display
<br><dt><em>2</em><dd>Monitor
<br><dt><em>3</em><dd>Serial port
</dl>

     <br><dt>&lt;Ctrl-Alt&gt;<dd><a name="index-Ctrl_002dAlt-114"></a>Toggle mouse and keyboard grab. 
</dl>

<p><a name="index-Ctrl_002dUp-115"></a><a name="index-Ctrl_002dDown-116"></a><a name="index-Ctrl_002dPageUp-117"></a><a name="index-Ctrl_002dPageDown-118"></a>In the virtual consoles, you can use &lt;Ctrl-Up&gt;, &lt;Ctrl-Down&gt;,
&lt;Ctrl-PageUp&gt; and &lt;Ctrl-PageDown&gt; to move in the back log.

<p><a name="index-Ctrl_002da-h-119"></a>During emulation, if you are using the <samp><span class="option">-nographic</span></samp> option, use
&lt;Ctrl-a h&gt; to get terminal commands:

     <dl>
<dt>&lt;Ctrl-a h&gt;<dd><a name="index-Ctrl_002da-h-120"></a><br><dt>&lt;Ctrl-a ?&gt;<dd><a name="index-Ctrl_002da-_003f-121"></a>Print this help
<br><dt>&lt;Ctrl-a x&gt;<dd><a name="index-Ctrl_002da-x-122"></a>Exit emulator
<br><dt>&lt;Ctrl-a s&gt;<dd><a name="index-Ctrl_002da-s-123"></a>Save disk data back to file (if -snapshot)
<br><dt>&lt;Ctrl-a t&gt;<dd><a name="index-Ctrl_002da-t-124"></a>Toggle console timestamps
<br><dt>&lt;Ctrl-a b&gt;<dd><a name="index-Ctrl_002da-b-125"></a>Send break (magic sysrq in Linux)
<br><dt>&lt;Ctrl-a c&gt;<dd><a name="index-Ctrl_002da-c-126"></a>Switch between console and monitor
<br><dt>&lt;Ctrl-a Ctrl-a&gt;<dd><a name="index-Ctrl_002da-a-127"></a>Send Ctrl-a
</dl>
<!-- man end -->

<p><a name="pcsys_monitor"></a>
<a name="pcsys_005fmonitor"></a>

<h3 class="section">3.5 QEMU Monitor</h3>

<p><a name="index-QEMU-monitor-128"></a>
The QEMU monitor is used to give complex commands to the QEMU
emulator. You can use it to:

     <ul>
<li>Remove or insert removable media images
(such as CD-ROM or floppies).

     <li>Freeze/unfreeze the Virtual Machine (VM) and save or restore its state
from a disk file.

     <li>Inspect the VM state without an external debugger.

</ul>

<h4 class="subsection">3.5.1 Commands</h4>

<p>The following commands are available:

     <dl>
<dt><samp><span class="option">help or ? [</span><var>cmd</var><span class="option">]</span></samp><dd><a name="index-help-129"></a>Show the help for all commands or just for command <var>cmd</var>. 
<br><dt><samp><span class="option">commit</span></samp><dd><a name="index-commit-130"></a>Commit changes to the disk images (if -snapshot is used) or backing files. 
<br><dt><samp><span class="option">q or quit</span></samp><dd><a name="index-quit-131"></a>Quit the emulator. 
<br><dt><samp><span class="option">eject [-f] </span><var>device</var></samp><dd><a name="index-eject-132"></a>Eject a removable medium (use -f to force it). 
<br><dt><samp><span class="option">change </span><var>device</var> <var>setting</var></samp><dd><a name="index-change-133"></a>
Change the configuration of a device.

          <dl>
<dt><samp><span class="option">change </span><var>diskdevice</var> <var>filename</var><span class="option"> [</span><var>format</var><span class="option">]</span></samp><dd>Change the medium for a removable disk device to point to <var>filename</var>. eg

          <pre class="example">          (qemu) change ide1-cd0 /path/to/some.iso
</pre>
          <p><var>format</var> is optional.

          <br><dt><samp><span class="option">change vnc </span><var>display</var><span class="option">,</span><var>options</var></samp><dd>Change the configuration of the VNC server. The valid syntax for <var>display</var>
and <var>options</var> are described at <a href="#sec_005finvocation">sec_invocation</a>. eg

          <pre class="example">          (qemu) change vnc localhost:1
</pre>
          <br><dt><samp><span class="option">change vnc password [</span><var>password</var><span class="option">]</span></samp><dd>
Change the password associated with the VNC server. If the new password is not
supplied, the monitor will prompt for it to be entered. VNC passwords are only
significant up to 8 letters. eg

          <pre class="example">          (qemu) change vnc password
          Password: ********
</pre>
          </dl>
     <br><dt><samp><span class="option">screendump </span><var>filename</var></samp><dd><a name="index-screendump-134"></a>Save screen into PPM image <var>filename</var>. 
<br><dt><samp><span class="option">logfile </span><var>filename</var></samp><dd><a name="index-logfile-135"></a>Output logs to <var>filename</var>. 
<br><dt><samp><span class="option">log </span><var>item1</var><span class="option">[,...]</span></samp><dd><a name="index-log-136"></a>Activate logging of the specified items to <samp><span class="file">/tmp/qemu.log</span></samp>. 
<br><dt><samp><span class="option">savevm [</span><var>tag</var><span class="option">|</span><var>id</var><span class="option">]</span></samp><dd><a name="index-savevm-137"></a>Create a snapshot of the whole virtual machine. If <var>tag</var> 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
<a href="#vm_005fsnapshots">vm_snapshots</a>. 
<br><dt><samp><span class="option">loadvm </span><var>tag</var><span class="option">|</span><var>id</var></samp><dd><a name="index-loadvm-138"></a>Set the whole virtual machine to the snapshot identified by the tag
<var>tag</var> or the unique snapshot ID <var>id</var>. 
<br><dt><samp><span class="option">delvm </span><var>tag</var><span class="option">|</span><var>id</var></samp><dd><a name="index-delvm-139"></a>Delete the snapshot identified by <var>tag</var> or <var>id</var>. 
<br><dt><samp><span class="option">singlestep [off]</span></samp><dd><a name="index-singlestep-140"></a>Run the emulation in single step mode. 
If called with option off, the emulation returns to normal mode. 
<br><dt><samp><span class="option">stop</span></samp><dd><a name="index-stop-141"></a>Stop emulation. 
<br><dt><samp><span class="option">c or cont</span></samp><dd><a name="index-cont-142"></a>Resume emulation. 
<br><dt><samp><span class="option">gdbserver [</span><var>port</var><span class="option">]</span></samp><dd><a name="index-gdbserver-143"></a>Start gdbserver session (default <var>port</var>=1234)
<br><dt><samp><span class="option">x/fmt </span><var>addr</var></samp><dd><a name="index-x-144"></a>Virtual memory dump starting at <var>addr</var>. 
<br><dt><samp><span class="option">xp /</span><var>fmt</var> <var>addr</var></samp><dd><a name="index-xp-145"></a>Physical memory dump starting at <var>addr</var>.

     <p><var>fmt</var> is a format which tells the command how to format the
data. Its syntax is: <samp><span class="option">/{count}{format}{size}</span></samp>

          <dl>
<dt><var>count</var><dd>is the number of items to be dumped.

          <br><dt><var>format</var><dd>can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
c (char) or i (asm instruction).

          <br><dt><var>size</var><dd>can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
<code>h</code> or <code>w</code> can be specified with the <code>i</code> format to
respectively select 16 or 32 bit code instruction size.

     </dl>

     <p>Examples:
          <ul>
<li>Dump 10 instructions at the current instruction pointer:
          <pre class="example">          (qemu) x/10i $eip
          0x90107063:  ret
          0x90107064:  sti
          0x90107065:  lea    0x0(%esi,1),%esi
          0x90107069:  lea    0x0(%edi,1),%edi
          0x90107070:  ret
          0x90107071:  jmp    0x90107080
          0x90107073:  nop
          0x90107074:  nop
          0x90107075:  nop
          0x90107076:  nop
</pre>
          <li>Dump 80 16 bit values at the start of the video memory.
          <pre class="smallexample">          (qemu) xp/80hx 0xb8000
          0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
          0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
          0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
          0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
          0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
          0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
          0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
          0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
          0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
          0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
</pre>
          </ul>
     <br><dt><samp><span class="option">p or print/</span><var>fmt</var> <var>expr</var></samp><dd><a name="index-print-146"></a>
Print expression value. Only the <var>format</var> part of <var>fmt</var> is
used. 
Read I/O port. 
Write to I/O port. 
<br><dt><samp><span class="option">sendkey </span><var>keys</var></samp><dd><a name="index-sendkey-147"></a>
Send <var>keys</var> to the emulator. <var>keys</var> could be the name of the
key or <code>#</code> followed by the raw value in either decimal or hexadecimal
format. Use <code>-</code> to press several keys simultaneously. Example:
     <pre class="example">     sendkey ctrl-alt-f1
</pre>
     <p>This command is useful to send keys that your graphical user interface
intercepts at low level, such as <code>ctrl-alt-f1</code> in X Window. 
<br><dt><samp><span class="option">system_reset</span></samp><dd><a name="index-system_005freset-148"></a>
Reset the system. 
<br><dt><samp><span class="option">system_powerdown</span></samp><dd><a name="index-system_005fpowerdown-149"></a>
Power down the system (if supported). 
<br><dt><samp><span class="option">sum </span><var>addr</var> <var>size</var></samp><dd><a name="index-sum-150"></a>
Compute the checksum of a memory region. 
<br><dt><samp><span class="option">usb_add </span><var>devname</var></samp><dd><a name="index-usb_005fadd-151"></a>
Add the USB device <var>devname</var>.  For details of available devices see
<a href="#usb_005fdevices">usb_devices</a>
<br><dt><samp><span class="option">usb_del </span><var>devname</var></samp><dd><a name="index-usb_005fdel-152"></a>
Remove the USB device <var>devname</var> from the QEMU virtual USB
hub. <var>devname</var> has the syntax <code>bus.addr</code>. Use the monitor
command <code>info usb</code> to see the devices you can remove. 
<br><dt><samp><span class="option">device_add </span><var>config</var></samp><dd><a name="index-device_005fadd-153"></a>
Add device. 
<br><dt><samp><span class="option">device_del </span><var>id</var></samp><dd><a name="index-device_005fdel-154"></a>
Remove device <var>id</var>. 
<br><dt><samp><span class="option">cpu </span><var>index</var></samp><dd><a name="index-cpu-155"></a>Set the default CPU. 
<br><dt><samp><span class="option">mouse_move </span><var>dx</var> <var>dy</var><span class="option"> [</span><var>dz</var><span class="option">]</span></samp><dd><a name="index-mouse_005fmove-156"></a>Move the active mouse to the specified coordinates <var>dx</var> <var>dy</var>
with optional scroll axis <var>dz</var>. 
<br><dt><samp><span class="option">mouse_button </span><var>val</var></samp><dd><a name="index-mouse_005fbutton-157"></a>Change the active mouse button state <var>val</var> (1=L, 2=M, 4=R). 
<br><dt><samp><span class="option">mouse_set </span><var>index</var></samp><dd><a name="index-mouse_005fset-158"></a>Set which mouse device receives events at given <var>index</var>, index
can be obtained with
     <pre class="example">     info mice
</pre>
     <br><dt><samp><span class="option">wavcapture </span><var>filename</var><span class="option"> [</span><var>frequency</var><span class="option"> [</span><var>bits</var><span class="option"> [</span><var>channels</var><span class="option">]]]</span></samp><dd><a name="index-wavcapture-159"></a>Capture audio into <var>filename</var>. Using sample rate <var>frequency</var>
bits per sample <var>bits</var> and number of channels <var>channels</var>.

     <p>Defaults:
          <ul>
<li>Sample rate = 44100 Hz - CD quality
<li>Bits = 16
<li>Number of channels = 2 - Stereo
</ul>
     <br><dt><samp><span class="option">stopcapture </span><var>index</var></samp><dd><a name="index-stopcapture-160"></a>Stop capture with a given <var>index</var>, index can be obtained with
     <pre class="example">     info capture
</pre>
     <br><dt><samp><span class="option">memsave </span><var>addr</var> <var>size</var> <var>file</var></samp><dd><a name="index-memsave-161"></a>save to disk virtual memory dump starting at <var>addr</var> of size <var>size</var>. 
<br><dt><samp><span class="option">pmemsave </span><var>addr</var> <var>size</var> <var>file</var></samp><dd><a name="index-pmemsave-162"></a>save to disk physical memory dump starting at <var>addr</var> of size <var>size</var>. 
<br><dt><samp><span class="option">boot_set </span><var>bootdevicelist</var></samp><dd><a name="index-boot_005fset-163"></a>
Define new values for the boot device list. Those values will override
the values specified on the command line through the <code>-boot</code> option.

     <p>The values that can be specified here depend on the machine type, but are
the same that can be specified in the <code>-boot</code> command line option. 
<br><dt><samp><span class="option">nmi </span><var>cpu</var></samp><dd><a name="index-nmi-164"></a>Inject an NMI on the given CPU (x86 only). 
<br><dt><samp><span class="option">migrate [-d] [-b] [-i] </span><var>uri</var></samp><dd><a name="index-migrate-165"></a>Migrate to <var>uri</var> (using -d to not wait for completion). 
-b for migration with full copy of disk
-i for migration with incremental copy of disk (base image is shared)
<br><dt><samp><span class="option">migrate_cancel</span></samp><dd><a name="index-migrate_005fcancel-166"></a>Cancel the current VM migration. 
<br><dt><samp><span class="option">migrate_set_speed </span><var>value</var></samp><dd><a name="index-migrate_005fset_005fspeed-167"></a>Set maximum speed to <var>value</var> (in bytes) for migrations. 
<br><dt><samp><span class="option">migrate_set_downtime </span><var>second</var></samp><dd><a name="index-migrate_005fset_005fdowntime-168"></a>Set maximum tolerated downtime (in seconds) for migration. 
<br><dt><samp><span class="option">drive_add</span></samp><dd><a name="index-drive_005fadd-169"></a>Add drive to PCI storage controller. 
<br><dt><samp><span class="option">pci_add</span></samp><dd><a name="index-pci_005fadd-170"></a>Hot-add PCI device. 
<br><dt><samp><span class="option">pci_del</span></samp><dd><a name="index-pci_005fdel-171"></a>Hot remove PCI device. 
<br><dt><samp><span class="option">host_net_add</span></samp><dd><a name="index-host_005fnet_005fadd-172"></a>Add host VLAN client. 
<br><dt><samp><span class="option">host_net_remove</span></samp><dd><a name="index-host_005fnet_005fremove-173"></a>Remove host VLAN client. 
<br><dt><samp><span class="option">netdev_add</span></samp><dd><a name="index-netdev_005fadd-174"></a>Add host network device. 
<br><dt><samp><span class="option">netdev_del</span></samp><dd><a name="index-netdev_005fdel-175"></a>Remove host network device. 
<br><dt><samp><span class="option">hostfwd_add</span></samp><dd><a name="index-hostfwd_005fadd-176"></a>Redirect TCP or UDP connections from host to guest (requires -net user). 
<br><dt><samp><span class="option">hostfwd_remove</span></samp><dd><a name="index-hostfwd_005fremove-177"></a>Remove host-to-guest TCP or UDP redirection. 
<br><dt><samp><span class="option">balloon </span><var>value</var></samp><dd><a name="index-balloon-178"></a>Request VM to change its memory allocation to <var>value</var> (in MB). 
<br><dt><samp><span class="option">set_link </span><var>name</var><span class="option"> [on|off]</span></samp><dd><a name="index-set_005flink-179"></a>Switch link <var>name</var> on (i.e. up) or off (i.e. down). 
<br><dt><samp><span class="option">watchdog_action</span></samp><dd><a name="index-watchdog_005faction-180"></a>Change watchdog action. 
<br><dt><samp><span class="option">acl_show </span><var>aclname</var></samp><dd><a name="index-acl_005fshow-181"></a>List all the matching rules in the access control list, and the default
policy. There are currently two named access control lists,
<var>vnc.x509dname</var> and <var>vnc.username</var> matching on the x509 client
certificate distinguished name, and SASL username respectively. 
<br><dt><samp><span class="option">acl_policy </span><var>aclname</var> <code>allow|deny</code></samp><dd><a name="index-acl_005fpolicy-182"></a>Set the default access control list policy, used in the event that
none of the explicit rules match. The default policy at startup is
always <code>deny</code>. 
<br><dt><samp><span class="option">acl_add </span><var>aclname</var> <var>match</var> <code>allow|deny</code><span class="option"> [</span><var>index</var><span class="option">]</span></samp><dd><a name="index-acl_005fadd-183"></a>Add a match rule to the access control list, allowing or denying access. 
The match will normally be an exact username or x509 distinguished name,
but can optionally include wildcard globs. eg <code>*@EXAMPLE.COM</code> to
allow all users in the <code>EXAMPLE.COM</code> kerberos realm. The match will
normally be appended to the end of the ACL, but can be inserted
earlier in the list if the optional <var>index</var> parameter is supplied. 
<br><dt><samp><span class="option">acl_remove </span><var>aclname</var> <var>match</var></samp><dd><a name="index-acl_005fremove-184"></a>Remove the specified match rule from the access control list. 
<br><dt><samp><span class="option">acl_reset </span><var>aclname</var></samp><dd><a name="index-acl_005freset-185"></a>Remove all matches from the access control list, and set the default
policy back to <code>deny</code>. 
<br><dt><samp><span class="option">mce </span><var>cpu</var> <var>bank</var> <var>status</var> <var>mcgstatus</var> <var>addr</var> <var>misc</var></samp><dd><a name="index-mce-_0028x86_0029-186"></a>Inject an MCE on the given CPU (x86 only). 
<br><dt><samp><span class="option">getfd </span><var>fdname</var></samp><dd><a name="index-getfd-187"></a>If a file descriptor is passed alongside this command using the SCM_RIGHTS
mechanism on unix sockets, it is stored using the name <var>fdname</var> for
later use by other monitor commands. 
<br><dt><samp><span class="option">closefd </span><var>fdname</var></samp><dd><a name="index-closefd-188"></a>Close the file descriptor previously assigned to <var>fdname</var> using the
<code>getfd</code> command. This is only needed if the file descriptor was never
used by another monitor command. 
<br><dt><samp><span class="option">block_passwd </span><var>device</var> <var>password</var></samp><dd><a name="index-block_005fpasswd-189"></a>Set the encrypted device <var>device</var> password to <var>password</var>
<br><dt><samp><span class="option">cpu_set </span><var>cpu</var><span class="option"> [online|offline]</span></samp><dd>Set CPU <var>cpu</var> online or offline. 
<br><dt><samp><span class="option">qmp_capabilities</span></samp><dd><a name="index-qmp_005fcapabilities-190"></a>Enable the specified QMP capabilities
<br><dt><samp><span class="option">info </span><var>subcommand</var></samp><dd><a name="index-info-191"></a>Show various information about the system state.

          <dl>
<dt><samp><span class="option">info version</span></samp><dd>show the version of QEMU
<br><dt><samp><span class="option">info commands</span></samp><dd>list QMP available commands
<br><dt><samp><span class="option">info network</span></samp><dd>show the various VLANs and the associated devices
<br><dt><samp><span class="option">info chardev</span></samp><dd>show the character devices
<br><dt><samp><span class="option">info block</span></samp><dd>show the block devices
<br><dt><samp><span class="option">info blockstats</span></samp><dd>show block device statistics
<br><dt><samp><span class="option">info registers</span></samp><dd>show the cpu registers
<br><dt><samp><span class="option">info cpus</span></samp><dd>show infos for each CPU
<br><dt><samp><span class="option">info history</span></samp><dd>show the command line history
<br><dt><samp><span class="option">info irq</span></samp><dd>show the interrupts statistics (if available)
<br><dt><samp><span class="option">info pic</span></samp><dd>show i8259 (PIC) state
<br><dt><samp><span class="option">info pci</span></samp><dd>show emulated PCI device info
<br><dt><samp><span class="option">info tlb</span></samp><dd>show virtual to physical memory mappings (i386 only)
<br><dt><samp><span class="option">info mem</span></samp><dd>show the active virtual memory mappings (i386 only)
<br><dt><samp><span class="option">info jit</span></samp><dd>show dynamic compiler info
<br><dt><samp><span class="option">info kvm</span></samp><dd>show KVM information
<br><dt><samp><span class="option">info numa</span></samp><dd>show NUMA information
<br><dt><samp><span class="option">info kvm</span></samp><dd>show KVM information
<br><dt><samp><span class="option">info usb</span></samp><dd>show USB devices plugged on the virtual USB hub
<br><dt><samp><span class="option">info usbhost</span></samp><dd>show all USB host devices
<br><dt><samp><span class="option">info profile</span></samp><dd>show profiling information
<br><dt><samp><span class="option">info capture</span></samp><dd>show information about active capturing
<br><dt><samp><span class="option">info snapshots</span></samp><dd>show list of VM snapshots
<br><dt><samp><span class="option">info status</span></samp><dd>show the current VM status (running|paused)
<br><dt><samp><span class="option">info pcmcia</span></samp><dd>show guest PCMCIA status
<br><dt><samp><span class="option">info mice</span></samp><dd>show which guest mouse is receiving events
<br><dt><samp><span class="option">info vnc</span></samp><dd>show the vnc server status
<br><dt><samp><span class="option">info name</span></samp><dd>show the current VM name
<br><dt><samp><span class="option">info uuid</span></samp><dd>show the current VM UUID
<br><dt><samp><span class="option">info cpustats</span></samp><dd>show CPU statistics
<br><dt><samp><span class="option">info usernet</span></samp><dd>show user network stack connection states
<br><dt><samp><span class="option">info migrate</span></samp><dd>show migration status
<br><dt><samp><span class="option">info balloon</span></samp><dd>show balloon information
<br><dt><samp><span class="option">info qtree</span></samp><dd>show device tree
<br><dt><samp><span class="option">info qdm</span></samp><dd>show qdev device model list
<br><dt><samp><span class="option">info roms</span></samp><dd>show roms
</dl>
     </dl>

<h4 class="subsection">3.5.2 Integer expressions</h4>

<p>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 <em>$</em>.

<p><a name="disk_images"></a>
<a name="disk_005fimages"></a>

<h3 class="section">3.6 Disk Images</h3>

<p>Since version 0.6.1, QEMU supports many disk image formats, including
growable disk images (their size increase as non empty sectors are
written), compressed and encrypted disk images. Version 0.8.3 added
the new qcow2 disk image format which is essential to support VM
snapshots.

<p><a name="disk_images_quickstart"></a>
<a name="disk_005fimages_005fquickstart"></a>

<h4 class="subsection">3.6.1 Quick start for disk image creation</h4>

<p>You can create a disk image with the command:
<pre class="example">qemu-img create myimage.img mysize
</pre>
<p>where <var>myimage.img</var> is the disk image filename and <var>mysize</var> is its
size in kilobytes. You can add an <code>M</code> suffix to give the size in
megabytes and a <code>G</code> suffix for gigabytes.

<p>See <a href="#qemu_005fimg_005finvocation">qemu_img_invocation</a> for more information.

<p><a name="disk_images_snapshot_mode"></a>
<a name="disk_005fimages_005fsnapshot_005fmode"></a>

<h4 class="subsection">3.6.2 Snapshot mode</h4>

<p>If you use the option <samp><span class="option">-snapshot</span></samp>, all disk images are
considered as read only. When sectors in written, they are written in
a temporary file created in <samp><span class="file">/tmp</span></samp>. You can however force the
write back to the raw disk images by using the <code>commit</code> monitor
command (or &lt;C-a s&gt; in the serial console).

<p><a name="vm_snapshots"></a>
<a name="vm_005fsnapshots"></a>

<h4 class="subsection">3.6.3 VM snapshots</h4>

<p>VM snapshots are snapshots of the complete virtual machine including
CPU state, RAM, device state and the content of all the writable
disks. In order to use VM snapshots, you must have at least one non
removable and writable block device using the <code>qcow2</code> disk image
format. Normally this device is the first virtual hard drive.

<p>Use the monitor command <code>savevm</code> to create a new VM snapshot or
replace an existing one. A human readable name can be assigned to each
snapshot in addition to its numerical ID.

<p>Use <code>loadvm</code> to restore a VM snapshot and <code>delvm</code> to remove
a VM snapshot. <code>info snapshots</code> lists the available snapshots
with their associated information:

<pre class="example">(qemu) info snapshots
Snapshot devices: hda
Snapshot list (from hda):
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         start                   41M 2006-08-06 12:38:02   00:00:14.954
2                                 40M 2006-08-06 12:43:29   00:00:18.633
3         msys                    40M 2006-08-06 12:44:04   00:00:23.514
</pre>
<p>A VM snapshot is made of a VM state info (its size is shown in
<code>info snapshots</code>) and a snapshot of every writable disk image. 
The VM state info is stored in the first <code>qcow2</code> non removable
and writable block device. The disk image snapshots are stored in
every disk image. The size of a snapshot in a disk image is difficult
to evaluate and is not shown by <code>info snapshots</code> because the
associated disk sectors are shared among all the snapshots to save
disk space (otherwise each snapshot would need a full copy of all the
disk images).

<p>When using the (unrelated) <code>-snapshot</code> option
(<a href="#disk_005fimages_005fsnapshot_005fmode">disk_images_snapshot_mode</a>), you can always make VM snapshots,
but they are deleted as soon as you exit QEMU.

<p>VM snapshots currently have the following known limitations:
     <ul>
<li>They cannot cope with removable devices if they are removed or
inserted after a snapshot is done. 
<li>A few device drivers still have incomplete snapshot support so their
state is not saved or restored properly (in particular USB). 
</ul>

<p><a name="qemu_img_invocation"></a>
<a name="qemu_005fimg_005finvocation"></a>

<h4 class="subsection">3.6.4 <code>qemu-img</code> Invocation</h4>

<pre class="example"><!-- man begin SYNOPSIS -->
usage: qemu-img command [command options]
<!-- man end -->
</pre>
<!-- man begin OPTIONS -->
<p>The following commands are supported:

     <dl>
<dt><samp><span class="option">check [-f </span><var>fmt</var><span class="option">] </span><var>filename</var></samp><br><dt><samp><span class="option">create [-f </span><var>fmt</var><span class="option">] [-o </span><var>options</var><span class="option">] </span><var>filename</var><span class="option"> [</span><var>size</var><span class="option">]</span></samp><br><dt><samp><span class="option">commit [-f </span><var>fmt</var><span class="option">] </span><var>filename</var></samp><br><dt><samp><span class="option">convert [-c] [-f </span><var>fmt</var><span class="option">] [-O </span><var>output_fmt</var><span class="option">] [-o </span><var>options</var><span class="option">] </span><var>filename</var><span class="option"> [</span><var>filename2</var><span class="option"> [...]] </span><var>output_filename</var></samp><br><dt><samp><span class="option">info [-f </span><var>fmt</var><span class="option">] </span><var>filename</var></samp><br><dt><samp><span class="option">snapshot [-l | -a </span><var>snapshot</var><span class="option"> | -c </span><var>snapshot</var><span class="option"> | -d </span><var>snapshot</var><span class="option">] </span><var>filename</var></samp><br><dt><samp><span class="option">rebase [-f </span><var>fmt</var><span class="option">] [-u] -b </span><var>backing_file</var><span class="option"> [-F </span><var>backing_fmt</var><span class="option">] </span><var>filename</var></samp><br><dt><samp><span class="option">resize </span><var>filename</var><span class="option"> [+ | -]</span><var>size</var></samp><dd></dl>

<p>Command parameters:
     <dl>
<dt><var>filename</var><dd> is a disk image filename
<br><dt><var>fmt</var><dd>is the disk image format. It is guessed automatically in most cases. See below
for a description of the supported disk formats.

     <br><dt><var>size</var><dd>is the disk image size in bytes. Optional suffixes <code>k</code> or <code>K</code>
(kilobyte, 1024) <code>M</code> (megabyte, 1024k) and <code>G</code> (gigabyte, 1024M)
and T (terabyte, 1024G) are supported.  <code>b</code> is ignored.

     <br><dt><var>output_filename</var><dd>is the destination disk image filename

     <br><dt><var>output_fmt</var><dd> is the destination format
<br><dt><var>options</var><dd>is a comma separated list of format specific options in a
name=value format. Use <code>-o ?</code> for an overview of the options supported
by the used format or see the format descriptions below for details.

     <br><dt><var>-c</var><dd>indicates that target image must be compressed (qcow format only)
<br><dt><var>-h</var><dd>with or without a command shows help and lists the supported formats
</dl>

<p>Parameters to snapshot subcommand:

     <dl>
<dt><samp><span class="option">snapshot</span></samp><dd>is the name of the snapshot to create, apply or delete
<br><dt><samp><span class="option">-a</span></samp><dd>applies a snapshot (revert disk to saved state)
<br><dt><samp><span class="option">-c</span></samp><dd>creates a snapshot
<br><dt><samp><span class="option">-d</span></samp><dd>deletes a snapshot
<br><dt><samp><span class="option">-l</span></samp><dd>lists all snapshots in the given image
</dl>

<p>Command description:

     <dl>
<dt><samp><span class="option">create [-f </span><var>fmt</var><span class="option">] [-o </span><var>options</var><span class="option">] </span><var>filename</var><span class="option"> [</span><var>size</var><span class="option">]</span></samp><dd>
Create the new disk image <var>filename</var> of size <var>size</var> and format
<var>fmt</var>. Depending on the file format, you can add one or more <var>options</var>
that enable additional features of this format.

     <p>If the option <var>backing_file</var> is specified, then the image will record
only the differences from <var>backing_file</var>. No size needs to be specified in
this case. <var>backing_file</var> will never be modified unless you use the
<code>commit</code> monitor command (or qemu-img commit).

     <p>The size can also be specified using the <var>size</var> option with <code>-o</code>,
it doesn't need to be specified separately in this case.

     <br><dt><samp><span class="option">commit [-f </span><var>fmt</var><span class="option">] </span><var>filename</var></samp><dd>
Commit the changes recorded in <var>filename</var> in its base image.

     <br><dt><samp><span class="option">convert [-c] [-f </span><var>fmt</var><span class="option">] [-O </span><var>output_fmt</var><span class="option">] [-o </span><var>options</var><span class="option">] </span><var>filename</var><span class="option"> [</span><var>filename2</var><span class="option"> [...]] </span><var>output_filename</var></samp><dd>
Convert the disk image <var>filename</var> to disk image <var>output_filename</var>
using format <var>output_fmt</var>. It can be optionally compressed (<code>-c</code>
option) or use any format specific options like encryption (<code>-o</code> option).

     <p>Only the formats <code>qcow</code> and <code>qcow2</code> support compression. The
compression is read-only. It means that if a compressed sector is
rewritten, then it is rewritten as uncompressed data.

     <p>Image conversion is also useful to get smaller image when using a
growable format such as <code>qcow</code> or <code>cow</code>: the empty sectors
are detected and suppressed from the destination image.

     <p>You can use the <var>backing_file</var> option to force the output image to be
created as a copy on write image of the specified base image; the
<var>backing_file</var> should have the same content as the input's base image,
however the path, image format, etc may differ.

     <br><dt><samp><span class="option">info [-f </span><var>fmt</var><span class="option">] </span><var>filename</var></samp><dd>
Give information about the disk image <var>filename</var>. Use it in
particular to know the size reserved on disk which can be different
from the displayed size. If VM snapshots are stored in the disk image,
they are displayed too.

     <br><dt><samp><span class="option">snapshot [-l | -a </span><var>snapshot</var><span class="option"> | -c </span><var>snapshot</var><span class="option"> | -d </span><var>snapshot</var><span class="option"> ] </span><var>filename</var></samp><dd>
List, apply, create or delete snapshots in image <var>filename</var>.

     <br><dt><samp><span class="option">resize </span><var>filename</var><span class="option"> [+ | -]</span><var>size</var></samp><dd>
Change the disk image as if it had been created with <var>size</var>.

     <p>Before using this command to shrink a disk image, you MUST use file system and
partitioning tools inside the VM to reduce allocated file systems and partition
sizes accordingly.  Failure to do so will result in data loss!

     <p>After using this command to grow a disk image, you must use file system and
partitioning tools inside the VM to actually begin using the new space on the
device. 
</dl>

<p>Supported image file formats:

     <dl>
<dt><samp><span class="option">raw</span></samp><dd>
Raw disk image format (default). This format has the advantage of
being simple and easily exportable to all other emulators. If your
file system supports <em>holes</em> (for example in ext2 or ext3 on
Linux or NTFS on Windows), then only the written sectors will reserve
space. Use <code>qemu-img info</code> to know the real size used by the
image or <code>ls -ls</code> on Unix/Linux.

     <br><dt><samp><span class="option">host_device</span></samp><dd>
Host device format. This format should be used instead of raw when
converting to block devices or other devices where "holes" are not
supported.

     <br><dt><samp><span class="option">qcow2</span></samp><dd>QEMU image format, the most versatile format. Use it to have smaller
images (useful if your filesystem does not supports holes, for example
on Windows), optional AES encryption, zlib based compression and
support of multiple VM snapshots.

     <p>Supported options:
          <dl>
<dt><code>backing_file</code><dd>File name of a base image (see <samp><span class="option">create</span></samp> subcommand)
<br><dt><code>backing_fmt</code><dd>Image format of the base image
<br><dt><code>encryption</code><dd>If this option is set to <code>on</code>, the image is encrypted.

          <p>Encryption uses the AES format which is very secure (128 bit keys). Use
a long password (16 characters) to get maximum protection.

          <br><dt><code>cluster_size</code><dd>Changes the qcow2 cluster size (must be between 512 and 2M). Smaller cluster
sizes can improve the image file size whereas larger cluster sizes generally
provide better performance.

          <br><dt><code>preallocation</code><dd>Preallocation mode (allowed values: off, metadata). An image with preallocated
metadata is initially larger but can improve performance when the image needs
to grow.

     </dl>

     <br><dt><samp><span class="option">qcow</span></samp><dd>Old QEMU image format. Left for compatibility.

     <p>Supported options:
          <dl>
<dt><code>backing_file</code><dd>File name of a base image (see <samp><span class="option">create</span></samp> subcommand)
<br><dt><code>encryption</code><dd>If this option is set to <code>on</code>, the image is encrypted. 
</dl>

     <br><dt><samp><span class="option">cow</span></samp><dd>User Mode Linux Copy On Write image format. Used to be the only growable
image format in QEMU. It is supported only for compatibility with
previous versions. It does not work on win32. 
<br><dt><samp><span class="option">vdi</span></samp><dd>VirtualBox 1.1 compatible image format. 
<br><dt><samp><span class="option">vmdk</span></samp><dd>VMware 3 and 4 compatible image format.

     <p>Supported options:
          <dl>
<dt><code>backing_fmt</code><dd>Image format of the base image
<br><dt><code>compat6</code><dd>Create a VMDK version 6 image (instead of version 4)
</dl>

     <br><dt><samp><span class="option">vpc</span></samp><dd>VirtualPC compatible image format (VHD).

     <br><dt><samp><span class="option">cloop</span></samp><dd>Linux Compressed Loop image, useful only to reuse directly compressed
CD-ROM images present for example in the Knoppix CD-ROMs. 
</dl>

<!-- man end -->
<p><a name="qemu_nbd_invocation"></a>
<a name="qemu_005fnbd_005finvocation"></a>

<h4 class="subsection">3.6.5 <code>qemu-nbd</code> Invocation</h4>

<pre class="example"><!-- man begin SYNOPSIS -->
usage: qemu-nbd [OPTION]...  <var>filename</var>
<!-- man end -->
</pre>
<!-- man begin DESCRIPTION -->
<p>Export Qemu disk image using NBD protocol.

<!-- man end -->
<!-- man begin OPTIONS -->
     <dl>
<dt><samp><var>filename</var></samp><dd> is a disk image filename
<br><dt><samp><span class="option">-p, --port=</span><var>port</var></samp><dd>  port to listen on (default &lsquo;<samp><span class="samp">1024</span></samp>&rsquo;)
<br><dt><samp><span class="option">-o, --offset=</span><var>offset</var></samp><dd>  offset into the image
<br><dt><samp><span class="option">-b, --bind=</span><var>iface</var></samp><dd>  interface to bind to (default &lsquo;<samp><span class="samp">0.0.0.0</span></samp>&rsquo;)
<br><dt><samp><span class="option">-k, --socket=</span><var>path</var></samp><dd>  Use a unix socket with path <var>path</var>
<br><dt><samp><span class="option">-r, --read-only</span></samp><dd>  export read-only
<br><dt><samp><span class="option">-P, --partition=</span><var>num</var></samp><dd>  only expose partition <var>num</var>
<br><dt><samp><span class="option">-s, --snapshot</span></samp><dd>  use snapshot file
<br><dt><samp><span class="option">-n, --nocache</span></samp><dd>  disable host cache
<br><dt><samp><span class="option">-c, --connect=</span><var>dev</var></samp><dd>  connect <var>filename</var> to NBD device <var>dev</var>
<br><dt><samp><span class="option">-d, --disconnect</span></samp><dd>  disconnect the specified device
<br><dt><samp><span class="option">-e, --shared=</span><var>num</var></samp><dd>  device can be shared by <var>num</var> clients (default &lsquo;<samp><span class="samp">1</span></samp>&rsquo;)
<br><dt><samp><span class="option">-t, --persistent</span></samp><dd>  don't exit on the last connection
<br><dt><samp><span class="option">-v, --verbose</span></samp><dd>  display extra debugging information
<br><dt><samp><span class="option">-h, --help</span></samp><dd>  display this help and exit
<br><dt><samp><span class="option">-V, --version</span></samp><dd>  output version information and exit
</dl>

<!-- man end -->
<p><a name="host_drives"></a>
<a name="host_005fdrives"></a>

<h4 class="subsection">3.6.6 Using host drives</h4>

<p>In addition to disk image files, QEMU can directly access host
devices. We describe here the usage for QEMU version &gt;= 0.8.3.

<h5 class="subsubsection">3.6.6.1 Linux</h5>

<p>On Linux, you can directly use the host device filename instead of a
disk image filename provided you have enough privileges to access
it. For example, use <samp><span class="file">/dev/cdrom</span></samp> to access to the CDROM or
<samp><span class="file">/dev/fd0</span></samp> for the floppy.

     <dl>
<dt><code>CD</code><dd>You can specify a CDROM device even if no CDROM is loaded. QEMU has
specific code to detect CDROM insertion or removal. CDROM ejection by
the guest OS is supported. Currently only data CDs are supported. 
<br><dt><code>Floppy</code><dd>You can specify a floppy device even if no floppy is loaded. Floppy
removal is currently not detected accurately (if you change floppy
without doing floppy access while the floppy is not loaded, the guest
OS will think that the same floppy is loaded). 
<br><dt><code>Hard disks</code><dd>Hard disks can be used. Normally you must specify the whole disk
(<samp><span class="file">/dev/hdb</span></samp> instead of <samp><span class="file">/dev/hdb1</span></samp>) so that the guest OS can
see it as a partitioned disk. WARNING: unless you know what you do, it
is better to only make READ-ONLY accesses to the hard disk otherwise
you may corrupt your host data (use the <samp><span class="option">-snapshot</span></samp> command
line option or modify the device permissions accordingly). 
</dl>

<h5 class="subsubsection">3.6.6.2 Windows</h5>

     <dl>
<dt><code>CD</code><dd>The preferred syntax is the drive letter (e.g. <samp><span class="file">d:</span></samp>). The
alternate syntax <samp><span class="file">\\.\d:</span></samp> is supported. <samp><span class="file">/dev/cdrom</span></samp> is
supported as an alias to the first CDROM drive.

     <p>Currently there is no specific code to handle removable media, so it
is better to use the <code>change</code> or <code>eject</code> monitor commands to
change or eject media. 
<br><dt><code>Hard disks</code><dd>Hard disks can be used with the syntax: <samp><span class="file">\\.\PhysicalDrive</span><var>N</var></samp>
where <var>N</var> is the drive number (0 is the first hard disk).

     <p>WARNING: unless you know what you do, it is better to only make
READ-ONLY accesses to the hard disk otherwise you may corrupt your
host data (use the <samp><span class="option">-snapshot</span></samp> command line so that the
modifications are written in a temporary file). 
</dl>

<h5 class="subsubsection">3.6.6.3 Mac OS X</h5>

<p><samp><span class="file">/dev/cdrom</span></samp> is an alias to the first CDROM.

<p>Currently there is no specific code to handle removable media, so it
is better to use the <code>change</code> or <code>eject</code> monitor commands to
change or eject media.

<p><a name="disk_images_fat_images"></a>
<a name="disk_005fimages_005ffat_005fimages"></a>

<h4 class="subsection">3.6.7 Virtual FAT disk images</h4>

<p>QEMU can automatically create a virtual FAT disk image from a
directory tree. In order to use it, just type:

<pre class="example">qemu linux.img -hdb fat:/my_directory
</pre>
<p>Then you access access to all the files in the <samp><span class="file">/my_directory</span></samp>
directory without having to copy them in a disk image or to export
them via SAMBA or NFS. The default access is <em>read-only</em>.

<p>Floppies can be emulated with the <code>:floppy:</code> option:

<pre class="example">qemu linux.img -fda fat:floppy:/my_directory
</pre>
<p>A read/write support is available for testing (beta stage) with the
<code>:rw:</code> option:

<pre class="example">qemu linux.img -fda fat:floppy:rw:/my_directory
</pre>
<p>What you should <em>never</em> do:
     <ul>
<li>use non-ASCII filenames ;
<li>use "-snapshot" together with ":rw:" ;
<li>expect it to work when loadvm'ing ;
<li>write to the FAT directory on the host system while accessing it with the guest system. 
</ul>

<p><a name="disk_images_nbd"></a>
<a name="disk_005fimages_005fnbd"></a>

<h4 class="subsection">3.6.8 NBD access</h4>

<p>QEMU can access directly to block device exported using the Network Block Device
protocol.

<pre class="example">qemu linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
</pre>
<p>If the NBD server is located on the same host, you can use an unix socket instead
of an inet socket:

<pre class="example">qemu linux.img -hdb nbd:unix:/tmp/my_socket
</pre>
<p>In this case, the block device must be exported using qemu-nbd:

<pre class="example">qemu-nbd --socket=/tmp/my_socket my_disk.qcow2
</pre>
<p>The use of qemu-nbd allows to share a disk between several guests:
<pre class="example">qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
</pre>
<p>and then you can use it with two guests:
<pre class="example">qemu linux1.img -hdb nbd:unix:/tmp/my_socket
qemu linux2.img -hdb nbd:unix:/tmp/my_socket
</pre>
<p><a name="pcsys_network"></a>
<a name="pcsys_005fnetwork"></a>

<h3 class="section">3.7 Network emulation</h3>

<p>QEMU can simulate several network cards (PCI or ISA cards on the PC
target) and can connect them to an arbitrary number of Virtual Local
Area Networks (VLANs). Host TAP devices can be connected to any QEMU
VLAN. VLAN can be connected between separate instances of QEMU to
simulate large networks. For simpler usage, a non privileged user mode
network stack can replace the TAP device to have a basic network
connection.

<h4 class="subsection">3.7.1 VLANs</h4>

<p>QEMU simulates several VLANs. A VLAN can be symbolised as a virtual
connection between several network devices. These devices can be for
example QEMU virtual Ethernet cards or virtual Host ethernet devices
(TAP devices).

<h4 class="subsection">3.7.2 Using TAP network interfaces</h4>

<p>This is the standard way to connect QEMU to a real network. QEMU adds
a virtual network device on your host (called <code>tapN</code>), and you
can then configure it as if it was a real ethernet card.

<h5 class="subsubsection">3.7.2.1 Linux host</h5>

<p>As an example, you can download the <samp><span class="file">linux-test-xxx.tar.gz</span></samp>
archive and copy the script <samp><span class="file">qemu-ifup</span></samp> in <samp><span class="file">/etc</span></samp> and
configure properly <code>sudo</code> so that the command <code>ifconfig</code>
contained in <samp><span class="file">qemu-ifup</span></samp> can be executed as root. You must verify
that your host kernel supports the TAP network interfaces: the
device <samp><span class="file">/dev/net/tun</span></samp> must be present.

<p>See <a href="#sec_005finvocation">sec_invocation</a> to have examples of command lines using the
TAP network interfaces.

<h5 class="subsubsection">3.7.2.2 Windows host</h5>

<p>There is a virtual ethernet driver for Windows 2000/XP systems, called
TAP-Win32. But it is not included in standard QEMU for Windows,
so you will need to get it separately. It is part of OpenVPN package,
so download OpenVPN from : <a href="http://openvpn.net/">http://openvpn.net/</a>.

<h4 class="subsection">3.7.3 Using the user mode network stack</h4>

<p>By using the option <samp><span class="option">-net user</span></samp> (default configuration if no
<samp><span class="option">-net</span></samp> option is specified), QEMU uses a completely user mode
network stack (you don't need root privilege to use the virtual
network). The virtual network configuration is the following:

<pre class="example">
         QEMU VLAN      &lt;------&gt;  Firewall/DHCP server &lt;-----&gt; Internet
                           |          (10.0.2.2)
                           |
                           ----&gt;  DNS server (10.0.2.3)
                           |
                           ----&gt;  SMB server (10.0.2.4)
</pre>
<p>The QEMU VM behaves as if it was behind a firewall which blocks all
incoming connections. You can use a DHCP client to automatically
configure the network in the QEMU VM. The DHCP server assign addresses
to the hosts starting from 10.0.2.15.

<p>In order to check that the user mode network is working, you can ping
the address 10.0.2.2 and verify that you got an address in the range
10.0.2.x from the QEMU virtual DHCP server.

<p>Note that <code>ping</code> is not supported reliably to the internet as it
would require root privileges. It means you can only ping the local
router (10.0.2.2).

<p>When using the built-in TFTP server, the router is also the TFTP
server.

<p>When using the <samp><span class="option">-redir</span></samp> option, TCP or UDP connections can be
redirected from the host to the guest. It allows for example to
redirect X11, telnet or SSH connections.

<h4 class="subsection">3.7.4 Connecting VLANs between QEMU instances</h4>

<p>Using the <samp><span class="option">-net socket</span></samp> option, it is possible to make VLANs
that span several QEMU instances. See <a href="#sec_005finvocation">sec_invocation</a> to have a
basic example.

<p><a name="direct_linux_boot"></a>
<a name="direct_005flinux_005fboot"></a>

<h3 class="section">3.8 Direct Linux Boot</h3>

<p>This section explains how to launch a Linux kernel inside QEMU without
having to make a full bootable image. It is very useful for fast Linux
kernel testing.

<p>The syntax is:
<pre class="example">qemu -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append "root=/dev/hda"
</pre>
<p>Use <samp><span class="option">-kernel</span></samp> to provide the Linux kernel image and
<samp><span class="option">-append</span></samp> to give the kernel command line arguments. The
<samp><span class="option">-initrd</span></samp> option can be used to provide an INITRD image.

<p>When using the direct Linux boot, a disk image for the first hard disk
<samp><span class="file">hda</span></samp> is required because its boot sector is used to launch the
Linux kernel.

<p>If you do not need graphical output, you can disable it and redirect
the virtual serial port and the QEMU monitor to the console with the
<samp><span class="option">-nographic</span></samp> option. The typical command line is:
<pre class="example">qemu -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
     -append "root=/dev/hda console=ttyS0" -nographic
</pre>
<p>Use &lt;Ctrl-a c&gt; to switch between the serial console and the
monitor (see <a href="#pcsys_005fkeys">pcsys_keys</a>).

<p><a name="pcsys_usb"></a>
<a name="pcsys_005fusb"></a>

<h3 class="section">3.9 USB emulation</h3>

<p>QEMU emulates a PCI UHCI USB controller. You can virtually plug
virtual USB devices or real host USB devices (experimental, works only
on Linux hosts).  Qemu will automatically create and connect virtual USB hubs
as necessary to connect multiple USB devices.

<p><a name="usb_devices"></a>
<a name="usb_005fdevices"></a>

<h4 class="subsection">3.9.1 Connecting USB devices</h4>

<p>USB devices can be connected with the <samp><span class="option">-usbdevice</span></samp> commandline option
or the <code>usb_add</code> monitor command.  Available devices are:

     <dl>
<dt><code>mouse</code><dd>Virtual Mouse.  This will override the PS/2 mouse emulation when activated. 
<br><dt><code>tablet</code><dd>Pointer device that uses absolute coordinates (like a touchscreen). 
This means qemu is able to report the mouse position without having
to grab the mouse.  Also overrides the PS/2 mouse emulation when activated. 
<br><dt><code>disk:</code><var>file</var><dd>Mass storage device based on <var>file</var> (see <a href="#disk_005fimages">disk_images</a>)
<br><dt><code>host:</code><var>bus.addr</var><dd>Pass through the host device identified by <var>bus.addr</var>
(Linux only)
<br><dt><code>host:</code><var>vendor_id:product_id</var><dd>Pass through the host device identified by <var>vendor_id:product_id</var>
(Linux only)
<br><dt><code>wacom-tablet</code><dd>Virtual Wacom PenPartner tablet.  This device is similar to the <code>tablet</code>
above but it can be used with the tslib library because in addition to touch
coordinates it reports touch pressure. 
<br><dt><code>keyboard</code><dd>Standard USB keyboard.  Will override the PS/2 keyboard (if present). 
<br><dt><code>serial:[vendorid=</code><var>vendor_id</var><code>][,product_id=</code><var>product_id</var><code>]:</code><var>dev</var><dd>Serial converter. This emulates an FTDI FT232BM chip connected to host character
device <var>dev</var>. The available character devices are the same as for the
<code>-serial</code> option. The <code>vendorid</code> and <code>productid</code> options can be
used to override the default 0403:6001. For instance,
     <pre class="example">     usb_add serial:productid=FA00:tcp:192.168.0.2:4444
</pre>
     <p>will connect to tcp port 4444 of ip 192.168.0.2, and plug that to the virtual
serial converter, faking a Matrix Orbital LCD Display (USB ID 0403:FA00). 
<br><dt><code>braille</code><dd>Braille device.  This will use BrlAPI to display the braille output on a real
or fake device. 
<br><dt><code>net:</code><var>options</var><dd>Network adapter that supports CDC ethernet and RNDIS protocols.  <var>options</var>
specifies NIC options as with <code>-net nic,</code><var>options</var> (see description). 
For instance, user-mode networking can be used with
     <pre class="example">     qemu [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
</pre>
     <p>Currently this cannot be used in machines that support PCI NICs. 
<br><dt><code>bt[:</code><var>hci-type</var><code>]</code><dd>Bluetooth dongle whose type is specified in the same format as with
the <samp><span class="option">-bt hci</span></samp> option, see <a href="#bt_002dhcis">allowed HCI types</a>.  If
no type is given, the HCI logic corresponds to <code>-bt hci,vlan=0</code>. 
This USB device implements the USB Transport Layer of HCI.  Example
usage:
     <pre class="example">     qemu [...OPTIONS...] -usbdevice bt:hci,vlan=3 -bt device:keyboard,vlan=3
</pre>
     </dl>

<p><a name="host_usb_devices"></a>
<a name="host_005fusb_005fdevices"></a>

<h4 class="subsection">3.9.2 Using host USB devices on a Linux host</h4>

<p>WARNING: this is an experimental feature. QEMU will slow down when
using it. USB devices requiring real time streaming (i.e. USB Video
Cameras) are not supported yet.

     <ol type=1 start=1>
<li>If you use an early Linux 2.4 kernel, verify that no Linux driver
is actually using the USB device. A simple way to do that is simply to
disable the corresponding kernel module by renaming it from <samp><span class="file">mydriver.o</span></samp>
to <samp><span class="file">mydriver.o.disabled</span></samp>.

     <li>Verify that <samp><span class="file">/proc/bus/usb</span></samp> is working (most Linux distributions should enable it by default). You should see something like that:
     <pre class="example">     ls /proc/bus/usb
     001  devices  drivers
</pre>
     <li>Since only root can access to the USB devices directly, you can either launch QEMU as root or change the permissions of the USB devices you want to use. For testing, the following suffices:
     <pre class="example">     chown -R myuid /proc/bus/usb
</pre>
     <li>Launch QEMU and do in the monitor:
     <pre class="example">     info usbhost
       Device 1.2, speed 480 Mb/s
         Class 00: USB device 1234:5678, USB DISK
</pre>
     <p>You should see the list of the devices you can use (Never try to use
hubs, it won't work).

     <li>Add the device in QEMU by using:
     <pre class="example">     usb_add host:1234:5678
</pre>
     <p>Normally the guest OS should report that a new USB device is
plugged. You can use the option <samp><span class="option">-usbdevice</span></samp> to do the same.

     <li>Now you can try to use the host USB device in QEMU.

     </ol>

<p>When relaunching QEMU, you may have to unplug and plug again the USB
device to make it work again (this is a bug).

<p><a name="vnc_security"></a>
<a name="vnc_005fsecurity"></a>

<h3 class="section">3.10 VNC security</h3>

<p>The VNC server capability provides access to the graphical console
of the guest VM across the network. This has a number of security
considerations depending on the deployment scenarios.

<p><a name="vnc_sec_none"></a>
<a name="vnc_005fsec_005fnone"></a>

<h4 class="subsection">3.10.1 Without passwords</h4>

<p>The simplest VNC server setup does not include any form of authentication. 
For this setup it is recommended to restrict it to listen on a UNIX domain
socket only. For example

<pre class="example">qemu [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
</pre>
<p>This ensures that only users on local box with read/write access to that
path can access the VNC server. To securely access the VNC server from a
remote machine, a combination of netcat+ssh can be used to provide a secure
tunnel.

<p><a name="vnc_sec_password"></a>
<a name="vnc_005fsec_005fpassword"></a>

<h4 class="subsection">3.10.2 With passwords</h4>

<p>The VNC protocol has limited support for password based authentication. Since
the protocol limits passwords to 8 characters it should not be considered
to provide high security. The password can be fairly easily brute-forced by
a client making repeat connections. For this reason, a VNC server using password
authentication should be restricted to only listen on the loopback interface
or UNIX domain sockets. Password authentication is requested with the <code>password</code>
option, and then once QEMU is running the password is set with the monitor. Until
the monitor is used to set the password all clients will be rejected.

<pre class="example">qemu [...OPTIONS...] -vnc :1,password -monitor stdio
(qemu) change vnc password
Password: ********
(qemu)
</pre>
<p><a name="vnc_sec_certificate"></a>
<a name="vnc_005fsec_005fcertificate"></a>

<h4 class="subsection">3.10.3 With x509 certificates</h4>

<p>The QEMU VNC server also implements the VeNCrypt extension allowing use of
TLS for encryption of the session, and x509 certificates for authentication. 
The use of x509 certificates is strongly recommended, because TLS on its
own is susceptible to man-in-the-middle attacks. Basic x509 certificate
support provides a secure session, but no authentication. This allows any
client to connect, and provides an encrypted session.

<pre class="example">qemu [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
</pre>
<p>In the above example <code>/etc/pki/qemu</code> should contain at least three files,
<code>ca-cert.pem</code>, <code>server-cert.pem</code> and <code>server-key.pem</code>. Unprivileged
users will want to use a private directory, for example <code>$HOME/.pki/qemu</code>. 
NB the <code>server-key.pem</code> file should be protected with file mode 0600 to
only be readable by the user owning it.

<p><a name="vnc_sec_certificate_verify"></a>
<a name="vnc_005fsec_005fcertificate_005fverify"></a>

<h4 class="subsection">3.10.4 With x509 certificates and client verification</h4>

<p>Certificates can also provide a means to authenticate the client connecting. 
The server will request that the client provide a certificate, which it will
then validate against the CA certificate. This is a good choice if deploying
in an environment with a private internal certificate authority.

<pre class="example">qemu [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
</pre>
<p><a name="vnc_sec_certificate_pw"></a>
<a name="vnc_005fsec_005fcertificate_005fpw"></a>

<h4 class="subsection">3.10.5 With x509 certificates, client verification and passwords</h4>

<p>Finally, the previous method can be combined with VNC password authentication
to provide two layers of authentication for clients.

<pre class="example">qemu [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
(qemu) change vnc password
Password: ********
(qemu)
</pre>
<p><a name="vnc_sec_sasl"></a>
<a name="vnc_005fsec_005fsasl"></a>

<h4 class="subsection">3.10.6 With SASL authentication</h4>

<p>The SASL authentication method is a VNC extension, that provides an
easily extendable, pluggable authentication method. This allows for
integration with a wide range of authentication mechanisms, such as
PAM, GSSAPI/Kerberos, LDAP, SQL databases, one-time keys and more. 
The strength of the authentication depends on the exact mechanism
configured. If the chosen mechanism also provides a SSF layer, then
it will encrypt the datastream as well.

<p>Refer to the later docs on how to choose the exact SASL mechanism
used for authentication, but assuming use of one supporting SSF,
then QEMU can be launched with:

<pre class="example">qemu [...OPTIONS...] -vnc :1,sasl -monitor stdio
</pre>
<p><a name="vnc_sec_certificate_sasl"></a>
<a name="vnc_005fsec_005fcertificate_005fsasl"></a>

<h4 class="subsection">3.10.7 With x509 certificates and SASL authentication</h4>

<p>If the desired SASL authentication mechanism does not supported
SSF layers, then it is strongly advised to run it in combination
with TLS and x509 certificates. This provides securely encrypted
data stream, avoiding risk of compromising of the security
credentials. This can be enabled, by combining the 'sasl' option
with the aforementioned TLS + x509 options:

<pre class="example">qemu [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
</pre>
<p><a name="vnc_generate_cert"></a>
<a name="vnc_005fgenerate_005fcert"></a>

<h4 class="subsection">3.10.8 Generating certificates for VNC</h4>

<p>The GNU TLS packages provides a command called <code>certtool</code> which can
be used to generate certificates and keys in PEM format. At a minimum it
is neccessary to setup a certificate authority, and issue certificates to
each server. If using certificates for authentication, then each client
will also need to be issued a certificate. The recommendation is for the
server to keep its certificates in either <code>/etc/pki/qemu</code> or for
unprivileged users in <code>$HOME/.pki/qemu</code>.

<p><a name="vnc_generate_ca"></a>
<a name="vnc_005fgenerate_005fca"></a>

<h5 class="subsubsection">3.10.8.1 Setup the Certificate Authority</h5>

<p>This step only needs to be performed once per organization / organizational
unit. First the CA needs a private key. This key must be kept VERY secret
and secure. If this key is compromised the entire trust chain of the certificates
issued with it is lost.

<pre class="example"># certtool --generate-privkey &gt; ca-key.pem
</pre>
<p>A CA needs to have a public certificate. For simplicity it can be a self-signed
certificate, or one issue by a commercial certificate issuing authority. To
generate a self-signed certificate requires one core piece of information, the
name of the organization.

<pre class="example"># cat &gt; ca.info &lt;&lt;EOF
cn = Name of your organization
ca
cert_signing_key
EOF
# certtool --generate-self-signed \
           --load-privkey ca-key.pem
           --template ca.info \
           --outfile ca-cert.pem
</pre>
<p>The <code>ca-cert.pem</code> file should be copied to all servers and clients wishing to utilize
TLS support in the VNC server. The <code>ca-key.pem</code> must not be disclosed/copied at all.

<p><a name="vnc_generate_server"></a>
<a name="vnc_005fgenerate_005fserver"></a>

<h5 class="subsubsection">3.10.8.2 Issuing server certificates</h5>

<p>Each server (or host) needs to be issued with a key and certificate. When connecting
the certificate is sent to the client which validates it against the CA certificate. 
The core piece of information for a server certificate is the hostname. This should
be the fully qualified hostname that the client will connect with, since the client
will typically also verify the hostname in the certificate. On the host holding the
secure CA private key:

<pre class="example"># cat &gt; server.info &lt;&lt;EOF
organization = Name  of your organization
cn = server.foo.example.com
tls_www_server
encryption_key
signing_key
EOF
# certtool --generate-privkey &gt; server-key.pem
# certtool --generate-certificate \
           --load-ca-certificate ca-cert.pem \
           --load-ca-privkey ca-key.pem \
           --load-privkey server server-key.pem \
           --template server.info \
           --outfile server-cert.pem
</pre>
<p>The <code>server-key.pem</code> and <code>server-cert.pem</code> files should now be securely copied
to the server for which they were generated. The <code>server-key.pem</code> is security
sensitive and should be kept protected with file mode 0600 to prevent disclosure.

<p><a name="vnc_generate_client"></a>
<a name="vnc_005fgenerate_005fclient"></a>

<h5 class="subsubsection">3.10.8.3 Issuing client certificates</h5>

<p>If the QEMU VNC server is to use the <code>x509verify</code> option to validate client
certificates as its authentication mechanism, each client also needs to be issued
a certificate. The client certificate contains enough metadata to uniquely identify
the client, typically organization, state, city, building, etc. On the host holding
the secure CA private key:

<pre class="example"># cat &gt; client.info &lt;&lt;EOF
country = GB
state = London
locality = London
organiazation = Name of your organization
cn = client.foo.example.com
tls_www_client
encryption_key
signing_key
EOF
# certtool --generate-privkey &gt; client-key.pem
# certtool --generate-certificate \
           --load-ca-certificate ca-cert.pem \
           --load-ca-privkey ca-key.pem \
           --load-privkey client-key.pem \
           --template client.info \
           --outfile client-cert.pem
</pre>
<p>The <code>client-key.pem</code> and <code>client-cert.pem</code> files should now be securely
copied to the client for which they were generated.

<p><a name="vnc_setup_sasl"></a>
<a name="vnc_005fsetup_005fsasl"></a>

<h4 class="subsection">3.10.9 Configuring SASL mechanisms</h4>

<p>The following documentation assumes use of the Cyrus SASL implementation on a
Linux host, but the principals should apply to any other SASL impl. When SASL
is enabled, the mechanism configuration will be loaded from system default
SASL service config /etc/sasl2/qemu.conf. If running QEMU as an
unprivileged user, an environment variable SASL_CONF_PATH can be used
to make it search alternate locations for the service config.

<p>The default configuration might contain

<pre class="example">mech_list: digest-md5
sasldb_path: /etc/qemu/passwd.db
</pre>
<p>This says to use the 'Digest MD5' mechanism, which is similar to the HTTP
Digest-MD5 mechanism. The list of valid usernames &amp; passwords is maintained
in the /etc/qemu/passwd.db file, and can be updated using the saslpasswd2
command. While this mechanism is easy to configure and use, it is not
considered secure by modern standards, so only suitable for developers /
ad-hoc testing.

<p>A more serious deployment might use Kerberos, which is done with the 'gssapi'
mechanism

<pre class="example">mech_list: gssapi
keytab: /etc/qemu/krb5.tab
</pre>
<p>For this to work the administrator of your KDC must generate a Kerberos
principal for the server, with a name of  'qemu/somehost.example.com@EXAMPLE.COM'
replacing 'somehost.example.com' with the fully qualified host name of the
machine running QEMU, and 'EXAMPLE.COM' with the Keberos Realm.

<p>Other configurations will be left as an exercise for the reader. It should
be noted that only Digest-MD5 and GSSAPI provides a SSF layer for data
encryption. For all other mechanisms, VNC should always be configured to
use TLS and x509 certificates to protect security credentials from snooping.

<p><a name="gdb_usage"></a>
<a name="gdb_005fusage"></a>

<h3 class="section">3.11 GDB usage</h3>

<p>QEMU has a primitive support to work with gdb, so that you can do
'Ctrl-C' while the virtual machine is running and inspect its state.

<p>In order to use gdb, launch qemu with the '-s' option. It will wait for a
gdb connection:
<pre class="example">&gt; qemu -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
       -append "root=/dev/hda"
Connected to host network interface: tun0
Waiting gdb connection on port 1234
</pre>
<p>Then launch gdb on the 'vmlinux' executable:
<pre class="example">&gt; gdb vmlinux
</pre>
<p>In gdb, connect to QEMU:
<pre class="example">(gdb) target remote localhost:1234
</pre>
<p>Then you can use gdb normally. For example, type 'c' to launch the kernel:
<pre class="example">(gdb) c
</pre>
<p>Here are some useful tips in order to use gdb on system code:

     <ol type=1 start=1>
<li>Use <code>info reg</code> to display all the CPU registers. 
<li>Use <code>x/10i $eip</code> to display the code at the PC position. 
<li>Use <code>set architecture i8086</code> to dump 16 bit code. Then use
<code>x/10i $cs*16+$eip</code> to dump the code at the PC position.
     </ol>

<p>Advanced debugging options:

<p>The default single stepping behavior is step with the IRQs and timer service routines off.  It is set this way because when gdb executes a single step it expects to advance beyond the current instruction.  With the IRQs and and timer service routines on, a single step might jump into the one of the interrupt or exception vectors instead of executing the current instruction. This means you may hit the same breakpoint a number of times before executing the instruction gdb wants to have executed.  Because there are rare circumstances where you want to single step into an interrupt vector the behavior can be controlled from GDB.  There are three commands you can query and set the single step behavior:
     <dl>
<dt><code>maintenance packet qqemu.sstepbits</code><dd>
This will display the MASK bits used to control the single stepping IE:
     <pre class="example">     (gdb) maintenance packet qqemu.sstepbits
     sending: "qqemu.sstepbits"
     received: "ENABLE=1,NOIRQ=2,NOTIMER=4"
</pre>
     <br><dt><code>maintenance packet qqemu.sstep</code><dd>
This will display the current value of the mask used when single stepping IE:
     <pre class="example">     (gdb) maintenance packet qqemu.sstep
     sending: "qqemu.sstep"
     received: "0x7"
</pre>
     <br><dt><code>maintenance packet Qqemu.sstep=HEX_VALUE</code><dd>
This will change the single step mask, so if wanted to enable IRQs on the single step, but not timers, you would use:
     <pre class="example">     (gdb) maintenance packet Qqemu.sstep=0x5
     sending: "qemu.sstep=0x5"
     received: "OK"
</pre>
     </dl>

<p><a name="pcsys_os_specific"></a>
<a name="pcsys_005fos_005fspecific"></a>

<h3 class="section">3.12 Target OS specific information</h3>

<h4 class="subsection">3.12.1 Linux</h4>

<p>To have access to SVGA graphic modes under X11, use the <code>vesa</code> or
the <code>cirrus</code> X11 driver. For optimal performances, use 16 bit
color depth in the guest and the host OS.

<p>When using a 2.6 guest Linux kernel, you should add the option
<code>clock=pit</code> on the kernel command line because the 2.6 Linux
kernels make very strict real time clock checks by default that QEMU
cannot simulate exactly.

<p>When using a 2.6 guest Linux kernel, verify that the 4G/4G patch is
not activated because QEMU is slower with this patch. The QEMU
Accelerator Module is also much slower in this case. Earlier Fedora
Core 3 Linux kernel (&lt; 2.6.9-1.724_FC3) were known to incorporate this
patch by default. Newer kernels don't have it.

<h4 class="subsection">3.12.2 Windows</h4>

<p>If you have a slow host, using Windows 95 is better as it gives the
best speed. Windows 2000 is also a good choice.

<h5 class="subsubsection">3.12.2.1 SVGA graphic modes support</h5>

<p>QEMU emulates a Cirrus Logic GD5446 Video
card. All Windows versions starting from Windows 95 should recognize
and use this graphic card. For optimal performances, use 16 bit color
depth in the guest and the host OS.

<p>If you are using Windows XP as guest OS and if you want to use high
resolution modes which the Cirrus Logic BIOS does not support (i.e. &gt;=
1280x1024x16), then you should use the VESA VBE virtual graphic card
(option <samp><span class="option">-std-vga</span></samp>).

<h5 class="subsubsection">3.12.2.2 CPU usage reduction</h5>

<p>Windows 9x does not correctly use the CPU HLT
instruction. The result is that it takes host CPU cycles even when
idle. You can install the utility from
<a href="http://www.user.cityline.ru/~maxamn/amnhltm.zip">http://www.user.cityline.ru/~maxamn/amnhltm.zip</a> to solve this
problem. Note that no such tool is needed for NT, 2000 or XP.

<h5 class="subsubsection">3.12.2.3 Windows 2000 disk full problem</h5>

<p>Windows 2000 has a bug which gives a disk full problem during its
installation. When installing it, use the <samp><span class="option">-win2k-hack</span></samp> QEMU
option to enable a specific workaround. After Windows 2000 is
installed, you no longer need this option (this option slows down the
IDE transfers).

<h5 class="subsubsection">3.12.2.4 Windows 2000 shutdown</h5>

<p>Windows 2000 cannot automatically shutdown in QEMU although Windows 98
can. It comes from the fact that Windows 2000 does not automatically
use the APM driver provided by the BIOS.

<p>In order to correct that, do the following (thanks to Struan
Bartlett): go to the Control Panel =&gt; Add/Remove Hardware &amp; Next =&gt;
Add/Troubleshoot a device =&gt; Add a new device &amp; Next =&gt; No, select the
hardware from a list &amp; Next =&gt; NT Apm/Legacy Support &amp; Next =&gt; Next
(again) a few times. Now the driver is installed and Windows 2000 now
correctly instructs QEMU to shutdown at the appropriate moment.

<h5 class="subsubsection">3.12.2.5 Share a directory between Unix and Windows</h5>

<p>See <a href="#sec_005finvocation">sec_invocation</a> about the help of the option <samp><span class="option">-smb</span></samp>.

<h5 class="subsubsection">3.12.2.6 Windows XP security problem</h5>

<p>Some releases of Windows XP install correctly but give a security
error when booting:
<pre class="example">A problem is preventing Windows from accurately checking the
license for this computer. Error code: 0x800703e6.
</pre>
<p>The workaround is to install a service pack for XP after a boot in safe
mode. Then reboot, and the problem should go away. Since there is no
network while in safe mode, its recommended to download the full
installation of SP1 or SP2 and transfer that via an ISO or using the
vvfat block device ("-hdb fat:directory_which_holds_the_SP").

<h4 class="subsection">3.12.3 MS-DOS and FreeDOS</h4>

<h5 class="subsubsection">3.12.3.1 CPU usage reduction</h5>

<p>DOS does not correctly use the CPU HLT instruction. The result is that
it takes host CPU cycles even when idle. You can install the utility
from <a href="http://www.vmware.com/software/dosidle210.zip">http://www.vmware.com/software/dosidle210.zip</a> to solve this
problem.

<p><a name="QEMU-System-emulator-for-non-PC-targets"></a>

<h2 class="chapter">4 QEMU System emulator for non PC targets</h2>

<p>QEMU is a generic emulator and it emulates many non PC
machines. Most of the options are similar to the PC emulator. The
differences are mentioned in the following sections.

<p><a name="PowerPC-System-emulator"></a>

<h3 class="section">4.1 PowerPC System emulator</h3>

<p><a name="index-system-emulation-_0028PowerPC_0029-192"></a>
Use the executable <samp><span class="file">qemu-system-ppc</span></samp> to simulate a complete PREP
or PowerMac PowerPC system.

<p>QEMU emulates the following PowerMac peripherals:

     <ul>
<li>UniNorth or Grackle PCI Bridge
<li>PCI VGA compatible card with VESA Bochs Extensions
<li>2 PMAC IDE interfaces with hard disk and CD-ROM support
<li>NE2000 PCI adapters
<li>Non Volatile RAM
<li>VIA-CUDA with ADB keyboard and mouse. 
</ul>

<p>QEMU emulates the following PREP peripherals:

     <ul>
<li>PCI Bridge
<li>PCI VGA compatible card with VESA Bochs Extensions
<li>2 IDE interfaces with hard disk and CD-ROM support
<li>Floppy disk
<li>NE2000 network adapters
<li>Serial port
<li>PREP Non Volatile RAM
<li>PC compatible keyboard and mouse. 
</ul>

<p>QEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at
<a href="http://perso.magic.fr/l_indien/OpenHackWare/index.htm">http://perso.magic.fr/l_indien/OpenHackWare/index.htm</a>.

<p>Since version 0.9.1, QEMU uses OpenBIOS <a href="http://www.openbios.org/">http://www.openbios.org/</a>
for the g3beige and mac99 PowerMac machines. OpenBIOS is a free (GPL
v2) portable firmware implementation. The goal is to implement a 100%
IEEE 1275-1994 (referred to as Open Firmware) compliant firmware.

<!-- man begin OPTIONS -->
<p>The following options are specific to the PowerPC emulation:

     <dl>
<dt><samp><span class="option">-g </span><var>W</var><span class="option">x</span><var>H</var><span class="option">[x</span><var>DEPTH</var><span class="option">]</span></samp><dd>
Set the initial VGA graphic mode. The default is 800x600x15.

     <br><dt><samp><span class="option">-prom-env </span><var>string</var></samp><dd>
Set OpenBIOS variables in NVRAM, for example:

     <pre class="example">     qemu-system-ppc -prom-env 'auto-boot?=false' \
      -prom-env 'boot-device=hd:2,\yaboot' \
      -prom-env 'boot-args=conf=hd:2,\yaboot.conf'
</pre>
     <p>These variables are not used by Open Hack'Ware.

</dl>

<!-- man end -->
<p>More information is available at
<a href="http://perso.magic.fr/l_indien/qemu-ppc/">http://perso.magic.fr/l_indien/qemu-ppc/</a>.

<p><a name="Sparc32-System-emulator"></a>

<h3 class="section">4.2 Sparc32 System emulator</h3>

<p><a name="index-system-emulation-_0028Sparc32_0029-193"></a>
Use the executable <samp><span class="file">qemu-system-sparc</span></samp> to simulate the following
Sun4m architecture machines:
     <ul>
<li>SPARCstation 4
<li>SPARCstation 5
<li>SPARCstation 10
<li>SPARCstation 20
<li>SPARCserver 600MP
<li>SPARCstation LX
<li>SPARCstation Voyager
<li>SPARCclassic
<li>SPARCbook
</ul>

<p>The emulation is somewhat complete. SMP up to 16 CPUs is supported,
but Linux limits the number of usable CPUs to 4.

<p>It's also possible to simulate a SPARCstation 2 (sun4c architecture),
SPARCserver 1000, or SPARCcenter 2000 (sun4d architecture), but these
emulators are not usable yet.

<p>QEMU emulates the following sun4m/sun4c/sun4d peripherals:

     <ul>
<li>IOMMU or IO-UNITs
<li>TCX Frame buffer
<li>Lance (Am7990) Ethernet
<li>Non Volatile RAM M48T02/M48T08
<li>Slave I/O: timers, interrupt controllers, Zilog serial ports, keyboard
and power/reset logic
<li>ESP SCSI controller with hard disk and CD-ROM support
<li>Floppy drive (not on SS-600MP)
<li>CS4231 sound device (only on SS-5, not working yet)
</ul>

<p>The number of peripherals is fixed in the architecture.  Maximum
memory size depends on the machine type, for SS-5 it is 256MB and for
others 2047MB.

<p>Since version 0.8.2, QEMU uses OpenBIOS
<a href="http://www.openbios.org/">http://www.openbios.org/</a>. OpenBIOS is a free (GPL v2) portable
firmware implementation. The goal is to implement a 100% IEEE
1275-1994 (referred to as Open Firmware) compliant firmware.

<p>A sample Linux 2.6 series kernel and ram disk image are available on
the QEMU web site. There are still issues with NetBSD and OpenBSD, but
some kernel versions work. Please note that currently Solaris kernels
don't work probably due to interface issues between OpenBIOS and
Solaris.

<!-- man begin OPTIONS -->
<p>The following options are specific to the Sparc32 emulation:

     <dl>
<dt><samp><span class="option">-g </span><var>W</var><span class="option">x</span><var>H</var><span class="option">x[x</span><var>DEPTH</var><span class="option">]</span></samp><dd>
Set the initial TCX graphic mode. The default is 1024x768x8, currently
the only other possible mode is 1024x768x24.

     <br><dt><samp><span class="option">-prom-env </span><var>string</var></samp><dd>
Set OpenBIOS variables in NVRAM, for example:

     <pre class="example">     qemu-system-sparc -prom-env 'auto-boot?=false' \
      -prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
</pre>
     <br><dt><samp><span class="option">-M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic] [|SPARCbook|SS-2|SS-1000|SS-2000]</span></samp><dd>
Set the emulated machine type. Default is SS-5.

</dl>

<!-- man end -->
<p><a name="Sparc64-System-emulator"></a>

<h3 class="section">4.3 Sparc64 System emulator</h3>

<p><a name="index-system-emulation-_0028Sparc64_0029-194"></a>
Use the executable <samp><span class="file">qemu-system-sparc64</span></samp> to simulate a Sun4u
(UltraSPARC PC-like machine), Sun4v (T1 PC-like machine), or generic
Niagara (T1) machine. The emulator is not usable for anything yet, but
it can launch some kernels.

<p>QEMU emulates the following peripherals:

     <ul>
<li>UltraSparc IIi APB PCI Bridge
<li>PCI VGA compatible card with VESA Bochs Extensions
<li>PS/2 mouse and keyboard
<li>Non Volatile RAM M48T59
<li>PC-compatible serial ports
<li>2 PCI IDE interfaces with hard disk and CD-ROM support
<li>Floppy disk
</ul>

<!-- man begin OPTIONS -->
<p>The following options are specific to the Sparc64 emulation:

     <dl>
<dt><samp><span class="option">-prom-env </span><var>string</var></samp><dd>
Set OpenBIOS variables in NVRAM, for example:

     <pre class="example">     qemu-system-sparc64 -prom-env 'auto-boot?=false'
</pre>
     <br><dt><samp><span class="option">-M [sun4u|sun4v|Niagara]</span></samp><dd>
Set the emulated machine type. The default is sun4u.

</dl>

<!-- man end -->
<p><a name="MIPS-System-emulator"></a>

<h3 class="section">4.4 MIPS System emulator</h3>

<p><a name="index-system-emulation-_0028MIPS_0029-195"></a>
Four executables cover simulation of 32 and 64-bit MIPS systems in
both endian options, <samp><span class="file">qemu-system-mips</span></samp>, <samp><span class="file">qemu-system-mipsel</span></samp>
<samp><span class="file">qemu-system-mips64</span></samp> and <samp><span class="file">qemu-system-mips64el</span></samp>. 
Five different machine types are emulated:

     <ul>
<li>A generic ISA PC-like machine "mips"
<li>The MIPS Malta prototype board "malta"
<li>An ACER Pica "pica61". This machine needs the 64-bit emulator. 
<li>MIPS emulator pseudo board "mipssim"
<li>A MIPS Magnum R4000 machine "magnum". This machine needs the 64-bit emulator. 
</ul>

<p>The generic emulation is supported by Debian 'Etch' and is able to
install Debian into a virtual disk image. The following devices are
emulated:

     <ul>
<li>A range of MIPS CPUs, default is the 24Kf
<li>PC style serial port
<li>PC style IDE disk
<li>NE2000 network card
</ul>

<p>The Malta emulation supports the following devices:

     <ul>
<li>Core board with MIPS 24Kf CPU and Galileo system controller
<li>PIIX4 PCI/USB/SMbus controller
<li>The Multi-I/O chip's serial device
<li>PCI network cards (PCnet32 and others)
<li>Malta FPGA serial device
<li>Cirrus (default) or any other PCI VGA graphics card
</ul>

<p>The ACER Pica emulation supports:

     <ul>
<li>MIPS R4000 CPU
<li>PC-style IRQ and DMA controllers
<li>PC Keyboard
<li>IDE controller
</ul>

<p>The mipssim pseudo board emulation provides an environment similiar
to what the proprietary MIPS emulator uses for running Linux. 
It supports:

     <ul>
<li>A range of MIPS CPUs, default is the 24Kf
<li>PC style serial port
<li>MIPSnet network emulation
</ul>

<p>The MIPS Magnum R4000 emulation supports:

     <ul>
<li>MIPS R4000 CPU
<li>PC-style IRQ controller
<li>PC Keyboard
<li>SCSI controller
<li>G364 framebuffer
</ul>

<p><a name="ARM-System-emulator"></a>

<h3 class="section">4.5 ARM System emulator</h3>

<p><a name="index-system-emulation-_0028ARM_0029-196"></a>
Use the executable <samp><span class="file">qemu-system-arm</span></samp> to simulate a ARM
machine. The ARM Integrator/CP board is emulated with the following
devices:

     <ul>
<li>ARM926E, ARM1026E, ARM946E, ARM1136 or Cortex-A8 CPU
<li>Two PL011 UARTs
<li>SMC 91c111 Ethernet adapter
<li>PL110 LCD controller
<li>PL050 KMI with PS/2 keyboard and mouse. 
<li>PL181 MultiMedia Card Interface with SD card. 
</ul>

<p>The ARM Versatile baseboard is emulated with the following devices:

     <ul>
<li>ARM926E, ARM1136 or Cortex-A8 CPU
<li>PL190 Vectored Interrupt Controller
<li>Four PL011 UARTs
<li>SMC 91c111 Ethernet adapter
<li>PL110 LCD controller
<li>PL050 KMI with PS/2 keyboard and mouse. 
<li>PCI host bridge.  Note the emulated PCI bridge only provides access to
PCI memory space.  It does not provide access to PCI IO space. 
This means some devices (eg. ne2k_pci NIC) are not usable, and others
(eg. rtl8139 NIC) are only usable when the guest drivers use the memory
mapped control registers. 
<li>PCI OHCI USB controller. 
<li>LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices. 
<li>PL181 MultiMedia Card Interface with SD card. 
</ul>

<p>Several variants of the ARM RealView baseboard are emulated,
including the EB, PB-A8 and PBX-A9.  Due to interactions with the
bootloader, only certain Linux kernel configurations work out
of the box on these boards.

<p>Kernels for the PB-A8 board should have CONFIG_REALVIEW_HIGH_PHYS_OFFSET
enabled in the kernel, and expect 512M RAM.  Kernels for The PBX-A9 board
should have CONFIG_SPARSEMEM enabled, CONFIG_REALVIEW_HIGH_PHYS_OFFSET
disabled and expect 1024M RAM.

<p>The following devices are emuilated:

     <ul>
<li>ARM926E, ARM1136, ARM11MPCore, Cortex-A8 or Cortex-A9 MPCore CPU
<li>ARM AMBA Generic/Distributed Interrupt Controller
<li>Four PL011 UARTs
<li>SMC 91c111 or SMSC LAN9118 Ethernet adapter
<li>PL110 LCD controller
<li>PL050 KMI with PS/2 keyboard and mouse
<li>PCI host bridge
<li>PCI OHCI USB controller
<li>LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices
<li>PL181 MultiMedia Card Interface with SD card. 
</ul>

<p>The XScale-based clamshell PDA models ("Spitz", "Akita", "Borzoi"
and "Terrier") emulation includes the following peripherals:

     <ul>
<li>Intel PXA270 System-on-chip (ARM V5TE core)
<li>NAND Flash memory
<li>IBM/Hitachi DSCM microdrive in a PXA PCMCIA slot - not in "Akita"
<li>On-chip OHCI USB controller
<li>On-chip LCD controller
<li>On-chip Real Time Clock
<li>TI ADS7846 touchscreen controller on SSP bus
<li>Maxim MAX1111 analog-digital converter on I^2C bus
<li>GPIO-connected keyboard controller and LEDs
<li>Secure Digital card connected to PXA MMC/SD host
<li>Three on-chip UARTs
<li>WM8750 audio CODEC on I^2C and I^2S busses
</ul>

<p>The Palm Tungsten|E PDA (codename "Cheetah") emulation includes the
following elements:

     <ul>
<li>Texas Instruments OMAP310 System-on-chip (ARM 925T core)
<li>ROM and RAM memories (ROM firmware image can be loaded with -option-rom)
<li>On-chip LCD controller
<li>On-chip Real Time Clock
<li>TI TSC2102i touchscreen controller / analog-digital converter / Audio
CODEC, connected through MicroWire and I^2S busses
<li>GPIO-connected matrix keypad
<li>Secure Digital card connected to OMAP MMC/SD host
<li>Three on-chip UARTs
</ul>

<p>Nokia N800 and N810 internet tablets (known also as RX-34 and RX-44 / 48)
emulation supports the following elements:

     <ul>
<li>Texas Instruments OMAP2420 System-on-chip (ARM 1136 core)
<li>RAM and non-volatile OneNAND Flash memories
<li>Display connected to EPSON remote framebuffer chip and OMAP on-chip
display controller and a LS041y3 MIPI DBI-C controller
<li>TI TSC2301 (in N800) and TI TSC2005 (in N810) touchscreen controllers
driven through SPI bus
<li>National Semiconductor LM8323-controlled qwerty keyboard driven
through I^2C bus
<li>Secure Digital card connected to OMAP MMC/SD host
<li>Three OMAP on-chip UARTs and on-chip STI debugging console
<li>A Bluetooth(R) transciever and HCI connected to an UART
<li>Mentor Graphics "Inventra" dual-role USB controller embedded in a TI
TUSB6010 chip - only USB host mode is supported
<li>TI TMP105 temperature sensor driven through I^2C bus
<li>TI TWL92230C power management companion with an RTC on I^2C bus
<li>Nokia RETU and TAHVO multi-purpose chips with an RTC, connected
through CBUS
</ul>

<p>The Luminary Micro Stellaris LM3S811EVB emulation includes the following
devices:

     <ul>
<li>Cortex-M3 CPU core. 
<li>64k Flash and 8k SRAM. 
<li>Timers, UARTs, ADC and I^2C interface. 
<li>OSRAM Pictiva 96x16 OLED with SSD0303 controller on I^2C bus. 
</ul>

<p>The Luminary Micro Stellaris LM3S6965EVB emulation includes the following
devices:

     <ul>
<li>Cortex-M3 CPU core. 
<li>256k Flash and 64k SRAM. 
<li>Timers, UARTs, ADC, I^2C and SSI interfaces. 
<li>OSRAM Pictiva 128x64 OLED with SSD0323 controller connected via SSI. 
</ul>

<p>The Freecom MusicPal internet radio emulation includes the following
elements:

     <ul>
<li>Marvell MV88W8618 ARM core. 
<li>32 MB RAM, 256 KB SRAM, 8 MB flash. 
<li>Up to 2 16550 UARTs
<li>MV88W8xx8 Ethernet controller
<li>MV88W8618 audio controller, WM8750 CODEC and mixer
<li>128×64 display with brightness control
<li>2 buttons, 2 navigation wheels with button function
</ul>

<p>The Siemens SX1 models v1 and v2 (default) basic emulation. 
The emulaton includes the following elements:

     <ul>
<li>Texas Instruments OMAP310 System-on-chip (ARM 925T core)
<li>ROM and RAM memories (ROM firmware image can be loaded with -pflash)
V1
1 Flash of 16MB and 1 Flash of 8MB
V2
1 Flash of 32MB
<li>On-chip LCD controller
<li>On-chip Real Time Clock
<li>Secure Digital card connected to OMAP MMC/SD host
<li>Three on-chip UARTs
</ul>

<p>The "Syborg" Symbian Virtual Platform base model includes the following
elements:

     <ul>
<li>ARM Cortex-A8 CPU
<li>Interrupt controller
<li>Timer
<li>Real Time Clock
<li>Keyboard
<li>Framebuffer
<li>Touchscreen
<li>UARTs
</ul>

<p>A Linux 2.6 test image is available on the QEMU web site. More
information is available in the QEMU mailing-list archive.

<!-- man begin OPTIONS -->
<p>The following options are specific to the ARM emulation:

     <dl>
<dt><samp><span class="option">-semihosting</span></samp><dd>Enable semihosting syscall emulation.

     <p>On ARM this implements the "Angel" interface.

     <p>Note that this allows guest direct access to the host filesystem,
so should only be used with trusted guest OS.

</dl>

<p><a name="ColdFire-System-emulator"></a>

<h3 class="section">4.6 ColdFire System emulator</h3>

<p><a name="index-system-emulation-_0028ColdFire_0029-197"></a><a name="index-system-emulation-_0028M68K_0029-198"></a>
Use the executable <samp><span class="file">qemu-system-m68k</span></samp> to simulate a ColdFire machine. 
The emulator is able to boot a uClinux kernel.

<p>The M5208EVB emulation includes the following devices:

     <ul>
<li>MCF5208 ColdFire V2 Microprocessor (ISA A+ with EMAC). 
<li>Three Two on-chip UARTs. 
<li>Fast Ethernet Controller (FEC)
</ul>

<p>The AN5206 emulation includes the following devices:

     <ul>
<li>MCF5206 ColdFire V2 Microprocessor. 
<li>Two on-chip UARTs. 
</ul>

<!-- man begin OPTIONS -->
<p>The following options are specific to the ColdFire emulation:

     <dl>
<dt><samp><span class="option">-semihosting</span></samp><dd>Enable semihosting syscall emulation.

     <p>On M68K this implements the "ColdFire GDB" interface used by libgloss.

     <p>Note that this allows guest direct access to the host filesystem,
so should only be used with trusted guest OS.

</dl>

<p><a name="Cris-System-emulator"></a>

<h3 class="section">4.7 Cris System emulator</h3>

<p><a name="index-system-emulation-_0028Cris_0029-199"></a>
TODO

<p><a name="Microblaze-System-emulator"></a>

<h3 class="section">4.8 Microblaze System emulator</h3>

<p><a name="index-system-emulation-_0028Microblaze_0029-200"></a>
TODO

<p><a name="SH4-System-emulator"></a>

<h3 class="section">4.9 SH4 System emulator</h3>

<p><a name="index-system-emulation-_0028SH4_0029-201"></a>
TODO

<p><a name="QEMU-User-space-emulator"></a>

<h2 class="chapter">5 QEMU User space emulator</h2>

<p><a name="Supported-Operating-Systems"></a>

<h3 class="section">5.1 Supported Operating Systems</h3>

<p>The following OS are supported in user space emulation:

     <ul>
<li>Linux (referred as qemu-linux-user)
<li>Mac OS X/Darwin (referred as qemu-darwin-user)
<li>BSD (referred as qemu-bsd-user)
</ul>

<p><a name="Linux-User-space-emulator"></a>

<h3 class="section">5.2 Linux User space emulator</h3>

<p><a name="Quick-Start"></a>

<h4 class="subsection">5.2.1 Quick Start</h4>

<p>In order to launch a Linux process, QEMU needs the process executable
itself and all the target (x86) dynamic libraries used by it.

     <ul>
<li>On x86, you can just try to launch any process by using the native
libraries:

     <pre class="example">     qemu-i386 -L / /bin/ls
</pre>
     <p><code>-L /</code> tells that the x86 dynamic linker must be searched with a
<samp><span class="file">/</span></samp> prefix.

     <li>Since QEMU is also a linux process, you can launch qemu with
qemu (NOTE: you can only do that if you compiled QEMU from the sources):

     <pre class="example">     qemu-i386 -L / qemu-i386 -L / /bin/ls
</pre>
     <li>On non x86 CPUs, you need first to download at least an x86 glibc
(<samp><span class="file">qemu-runtime-i386-XXX-.tar.gz</span></samp> on the QEMU web page). Ensure that
<code>LD_LIBRARY_PATH</code> is not set:

     <pre class="example">     unset LD_LIBRARY_PATH
</pre>
     <p>Then you can launch the precompiled <samp><span class="file">ls</span></samp> x86 executable:

     <pre class="example">     qemu-i386 tests/i386/ls
</pre>
     <p>You can look at <samp><span class="file">qemu-binfmt-conf.sh</span></samp> so that
QEMU is automatically launched by the Linux kernel when you try to
launch x86 executables. It requires the <code>binfmt_misc</code> module in the
Linux kernel.

     <li>The x86 version of QEMU is also included. You can try weird things such as:
     <pre class="example">     qemu-i386 /usr/local/qemu-i386/bin/qemu-i386 \
               /usr/local/qemu-i386/bin/ls-i386
</pre>
     </ul>

<p><a name="Wine-launch"></a>

<h4 class="subsection">5.2.2 Wine launch</h4>

     <ul>
<li>Ensure that you have a working QEMU with the x86 glibc
distribution (see previous section). In order to verify it, you must be
able to do:

     <pre class="example">     qemu-i386 /usr/local/qemu-i386/bin/ls-i386
</pre>
     <li>Download the binary x86 Wine install
(<samp><span class="file">qemu-XXX-i386-wine.tar.gz</span></samp> on the QEMU web page).

     <li>Configure Wine on your account. Look at the provided script
<samp><span class="file">/usr/local/qemu-i386/bin/wine-conf.sh</span></samp>. Your previous
<code>${HOME}/.wine</code> directory is saved to <code>${HOME}/.wine.org</code>.

     <li>Then you can try the example <samp><span class="file">putty.exe</span></samp>:

     <pre class="example">     qemu-i386 /usr/local/qemu-i386/wine/bin/wine \
               /usr/local/qemu-i386/wine/c/Program\ Files/putty.exe
</pre>
     </ul>

<p><a name="Command-line-options"></a>

<h4 class="subsection">5.2.3 Command line options</h4>

<pre class="example">usage: qemu-i386 [-h] [-d] [-L path] [-s size] [-cpu model] [-g port] [-B offset] [-R size] program [arguments...]
</pre>
     <dl>
<dt><samp><span class="option">-h</span></samp><dd>Print the help
<br><dt><samp><span class="option">-L path</span></samp><dd>Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)
<br><dt><samp><span class="option">-s size</span></samp><dd>Set the x86 stack size in bytes (default=524288)
<br><dt><samp><span class="option">-cpu model</span></samp><dd>Select CPU model (-cpu ? for list and additional feature selection)
<br><dt><samp><span class="option">-B offset</span></samp><dd>Offset guest address by the specified number of bytes.  This is useful when
the address region required by guest applications is reserved on the host. 
This option is currently only supported on some hosts. 
<br><dt><samp><span class="option">-R size</span></samp><dd>Pre-allocate a guest virtual address space of the given size (in bytes). 
"G", "M", and "k" suffixes may be used when specifying the size. 
</dl>

<p>Debug options:

     <dl>
<dt><samp><span class="option">-d</span></samp><dd>Activate log (logfile=/tmp/qemu.log)
<br><dt><samp><span class="option">-p pagesize</span></samp><dd>Act as if the host page size was 'pagesize' bytes
<br><dt><samp><span class="option">-g port</span></samp><dd>Wait gdb connection to port
<br><dt><samp><span class="option">-singlestep</span></samp><dd>Run the emulation in single step mode. 
</dl>

<p>Environment variables:

     <dl>
<dt><samp><span class="env">QEMU_STRACE</span></samp><dd>Print system calls and arguments similar to the 'strace' program
(NOTE: the actual 'strace' program will not work because the user
space emulator hasn't implemented ptrace).  At the moment this is
incomplete.  All system calls that don't have a specific argument
format are printed with information for six arguments.  Many
flag-style arguments don't have decoders and will show up as numbers. 
</dl>

<p><a name="Other-binaries"></a>

<h4 class="subsection">5.2.4 Other binaries</h4>

<p><a name="index-user-mode-_0028Alpha_0029-202"></a><samp><span class="command">qemu-alpha</span></samp> TODO.

<p><a name="index-user-mode-_0028ARM_0029-203"></a><samp><span class="command">qemu-armeb</span></samp> TODO.

<p><a name="index-user-mode-_0028ARM_0029-204"></a><samp><span class="command">qemu-arm</span></samp> is also capable of running ARM "Angel" semihosted ELF
binaries (as implemented by the arm-elf and arm-eabi Newlib/GDB
configurations), and arm-uclinux bFLT format binaries.

<p><a name="index-user-mode-_0028ColdFire_0029-205"></a><a name="index-user-mode-_0028M68K_0029-206"></a><samp><span class="command">qemu-m68k</span></samp> is capable of running semihosted binaries using the BDM
(m5xxx-ram-hosted.ld) or m68k-sim (sim.ld) syscall interfaces, and
coldfire uClinux bFLT format binaries.

<p>The binary format is detected automatically.

<p><a name="index-user-mode-_0028Cris_0029-207"></a><samp><span class="command">qemu-cris</span></samp> TODO.

<p><a name="index-user-mode-_0028i386_0029-208"></a><samp><span class="command">qemu-i386</span></samp> TODO. 
<samp><span class="command">qemu-x86_64</span></samp> TODO.

<p><a name="index-user-mode-_0028Microblaze_0029-209"></a><samp><span class="command">qemu-microblaze</span></samp> TODO.

<p><a name="index-user-mode-_0028MIPS_0029-210"></a><samp><span class="command">qemu-mips</span></samp> TODO. 
<samp><span class="command">qemu-mipsel</span></samp> TODO.

<p><a name="index-user-mode-_0028PowerPC_0029-211"></a><samp><span class="command">qemu-ppc64abi32</span></samp> TODO. 
<samp><span class="command">qemu-ppc64</span></samp> TODO. 
<samp><span class="command">qemu-ppc</span></samp> TODO.

<p><a name="index-user-mode-_0028SH4_0029-212"></a><samp><span class="command">qemu-sh4eb</span></samp> TODO. 
<samp><span class="command">qemu-sh4</span></samp> TODO.

<p><a name="index-user-mode-_0028SPARC_0029-213"></a><samp><span class="command">qemu-sparc</span></samp> can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).

<p><samp><span class="command">qemu-sparc32plus</span></samp> can execute Sparc32 and SPARC32PLUS binaries
(Sparc64 CPU, 32 bit ABI).

<p><samp><span class="command">qemu-sparc64</span></samp> can execute some Sparc64 (Sparc64 CPU, 64 bit ABI) and
SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI).

<p><a name="Mac-OS-X%2fDarwin-User-space-emulator"></a>
<a name="Mac-OS-X_002fDarwin-User-space-emulator"></a>

<h3 class="section">5.3 Mac OS X/Darwin User space emulator</h3>

<p><a name="Mac-OS-X%2fDarwin-Status"></a>
<a name="Mac-OS-X_002fDarwin-Status"></a>

<h4 class="subsection">5.3.1 Mac OS X/Darwin Status</h4>

     <ul>
<li>target x86 on x86: Most apps (Cocoa and Carbon too) works. [1]
<li>target PowerPC on x86: Not working as the ppc commpage can't be mapped (yet!) 
<li>target PowerPC on PowerPC: Most apps (Cocoa and Carbon too) works. [1]
<li>target x86 on PowerPC: most utilities work. Cocoa and Carbon apps are not yet supported. 
</ul>

<p>[1] If you're host commpage can be executed by qemu.

<p><a name="Mac-OS-X%2fDarwin-Quick-Start"></a>
<a name="Mac-OS-X_002fDarwin-Quick-Start"></a>

<h4 class="subsection">5.3.2 Quick Start</h4>

<p>In order to launch a Mac OS X/Darwin process, QEMU needs the process executable
itself and all the target dynamic libraries used by it. If you don't have the FAT
libraries (you're running Mac OS X/ppc) you'll need to obtain it from a Mac OS X
CD or compile them by hand.

     <ul>
<li>On x86, you can just try to launch any process by using the native
libraries:

     <pre class="example">     qemu-i386 /bin/ls
</pre>
     <p>or to run the ppc version of the executable:

     <pre class="example">     qemu-ppc /bin/ls
</pre>
     <li>On ppc, you'll have to tell qemu where your x86 libraries (and dynamic linker)
are installed:

     <pre class="example">     qemu-i386 -L /opt/x86_root/ /bin/ls
</pre>
     <p><code>-L /opt/x86_root/</code> tells that the dynamic linker (dyld) path is in
<samp><span class="file">/opt/x86_root/usr/bin/dyld</span></samp>.

</ul>

<p><a name="Mac-OS-X%2fDarwin-Command-line-options"></a>
<a name="Mac-OS-X_002fDarwin-Command-line-options"></a>

<h4 class="subsection">5.3.3 Command line options</h4>

<pre class="example">usage: qemu-i386 [-h] [-d] [-L path] [-s size] program [arguments...]
</pre>
     <dl>
<dt><samp><span class="option">-h</span></samp><dd>Print the help
<br><dt><samp><span class="option">-L path</span></samp><dd>Set the library root path (default=/)
<br><dt><samp><span class="option">-s size</span></samp><dd>Set the stack size in bytes (default=524288)
</dl>

<p>Debug options:

     <dl>
<dt><samp><span class="option">-d</span></samp><dd>Activate log (logfile=/tmp/qemu.log)
<br><dt><samp><span class="option">-p pagesize</span></samp><dd>Act as if the host page size was 'pagesize' bytes
<br><dt><samp><span class="option">-singlestep</span></samp><dd>Run the emulation in single step mode. 
</dl>

<p><a name="BSD-User-space-emulator"></a>

<h3 class="section">5.4 BSD User space emulator</h3>

<p><a name="BSD-Status"></a>

<h4 class="subsection">5.4.1 BSD Status</h4>

     <ul>
<li>target Sparc64 on Sparc64: Some trivial programs work. 
</ul>

<p><a name="BSD-Quick-Start"></a>

<h4 class="subsection">5.4.2 Quick Start</h4>

<p>In order to launch a BSD process, QEMU needs the process executable
itself and all the target dynamic libraries used by it.

     <ul>
<li>On Sparc64, you can just try to launch any process by using the native
libraries:

     <pre class="example">     qemu-sparc64 /bin/ls
</pre>
     </ul>

<p><a name="BSD-Command-line-options"></a>

<h4 class="subsection">5.4.3 Command line options</h4>

<pre class="example">usage: qemu-sparc64 [-h] [-d] [-L path] [-s size] [-bsd type] program [arguments...]
</pre>
     <dl>
<dt><samp><span class="option">-h</span></samp><dd>Print the help
<br><dt><samp><span class="option">-L path</span></samp><dd>Set the library root path (default=/)
<br><dt><samp><span class="option">-s size</span></samp><dd>Set the stack size in bytes (default=524288)
<br><dt><samp><span class="option">-bsd type</span></samp><dd>Set the type of the emulated BSD Operating system. Valid values are
FreeBSD, NetBSD and OpenBSD (default). 
</dl>

<p>Debug options:

     <dl>
<dt><samp><span class="option">-d</span></samp><dd>Activate log (logfile=/tmp/qemu.log)
<br><dt><samp><span class="option">-p pagesize</span></samp><dd>Act as if the host page size was 'pagesize' bytes
<br><dt><samp><span class="option">-singlestep</span></samp><dd>Run the emulation in single step mode. 
</dl>

<p><a name="compilation"></a>

<h2 class="chapter">6 Compilation from the sources</h2>

<p><a name="Linux%2fUnix"></a>
<a name="Linux_002fUnix"></a>

<h3 class="section">6.1 Linux/Unix</h3>

<h4 class="subsection">6.1.1 Compilation</h4>

<p>First you must decompress the sources:
<pre class="example">cd /tmp
tar zxvf qemu-x.y.z.tar.gz
cd qemu-x.y.z
</pre>
<p>Then you configure QEMU and build it (usually no options are needed):
<pre class="example">./configure
make
</pre>
<p>Then type as root user:
<pre class="example">make install
</pre>
<p>to install QEMU in <samp><span class="file">/usr/local</span></samp>.

<p><a name="Windows"></a>

<h3 class="section">6.2 Windows</h3>

     <ul>
<li>Install the current versions of MSYS and MinGW from
<a href="http://www.mingw.org/">http://www.mingw.org/</a>. You can find detailed installation
instructions in the download section and the FAQ.

     <li>Download
the MinGW development library of SDL 1.2.x
(<samp><span class="file">SDL-devel-1.2.x-mingw32.tar.gz</span></samp>) from
<a href="http://www.libsdl.org">http://www.libsdl.org</a>. Unpack it in a temporary place and
edit the <samp><span class="file">sdl-config</span></samp> script so that it gives the
correct SDL directory when invoked.

     <li>Install the MinGW version of zlib and make sure
<samp><span class="file">zlib.h</span></samp> and <samp><span class="file">libz.dll.a</span></samp> are in
MingGW's default header and linker search paths.

     <li>Extract the current version of QEMU.

     <li>Start the MSYS shell (file <samp><span class="file">msys.bat</span></samp>).

     <li>Change to the QEMU directory. Launch <samp><span class="file">./configure</span></samp> and
<samp><span class="file">make</span></samp>.  If you have problems using SDL, verify that
<samp><span class="file">sdl-config</span></samp> can be launched from the MSYS command line.

     <li>You can install QEMU in <samp><span class="file">Program Files/Qemu</span></samp> by typing
<samp><span class="file">make install</span></samp>. Don't forget to copy <samp><span class="file">SDL.dll</span></samp> in
<samp><span class="file">Program Files/Qemu</span></samp>.

</ul>

<p><a name="Cross-compilation-for-Windows-with-Linux"></a>

<h3 class="section">6.3 Cross compilation for Windows with Linux</h3>

     <ul>
<li>Install the MinGW cross compilation tools available at
<a href="http://www.mingw.org/">http://www.mingw.org/</a>.

     <li>Download
the MinGW development library of SDL 1.2.x
(<samp><span class="file">SDL-devel-1.2.x-mingw32.tar.gz</span></samp>) from
<a href="http://www.libsdl.org">http://www.libsdl.org</a>. Unpack it in a temporary place and
edit the <samp><span class="file">sdl-config</span></samp> script so that it gives the
correct SDL directory when invoked.  Set up the <code>PATH</code> environment
variable so that <samp><span class="file">sdl-config</span></samp> can be launched by
the QEMU configuration script.

     <li>Install the MinGW version of zlib and make sure
<samp><span class="file">zlib.h</span></samp> and <samp><span class="file">libz.dll.a</span></samp> are in
MingGW's default header and linker search paths.

     <li>Configure QEMU for Windows cross compilation:
     <pre class="example">     PATH=/usr/i686-pc-mingw32/sys-root/mingw/bin:$PATH ./configure --cross-prefix='i686-pc-mingw32-'
</pre>
     <p>The example assumes <samp><span class="file">sdl-config</span></samp> is installed under <samp><span class="file">/usr/i686-pc-mingw32/sys-root/mingw/bin</span></samp> and
MinGW cross compilation tools have names like <samp><span class="file">i686-pc-mingw32-gcc</span></samp> and <samp><span class="file">i686-pc-mingw32-strip</span></samp>. 
We set the <code>PATH</code> environment variable to ensure the MingW version of <samp><span class="file">sdl-config</span></samp> is used and
use &ndash;cross-prefix to specify the name of the cross compiler. 
You can also use &ndash;prefix to set the Win32 install path which defaults to <samp><span class="file">c:/Program Files/Qemu</span></samp>.

     <p>Under Fedora Linux, you can run:
     <pre class="example">     yum -y install mingw32-gcc mingw32-SDL mingw32-zlib
</pre>
     <p>to get a suitable cross compilation environment.

     <li>You can install QEMU in the installation directory by typing
<code>make install</code>. Don't forget to copy <samp><span class="file">SDL.dll</span></samp> and <samp><span class="file">zlib1.dll</span></samp> into the
installation directory.

</ul>

<p>Wine can be used to launch the resulting qemu.exe compiled for Win32.

<p><a name="Mac-OS-X"></a>

<h3 class="section">6.4 Mac OS X</h3>

<p>The Mac OS X patches are not fully merged in QEMU, so you should look
at the QEMU mailing list archive to have all the necessary
information.

<p><a name="Make-targets"></a>

<h3 class="section">6.5 Make targets</h3>

     <dl>
<dt><code>make</code><br><dt><code>make all</code><dd>Make everything which is typically needed.

     <br><dt><code>install</code><dd>TODO

     <br><dt><code>install-doc</code><dd>TODO

     <br><dt><code>make clean</code><dd>Remove most files which were built during make.

     <br><dt><code>make distclean</code><dd>Remove everything which was built during make.

     <br><dt><code>make dvi</code><br><dt><code>make html</code><br><dt><code>make info</code><br><dt><code>make pdf</code><dd>Create documentation in dvi, html, info or pdf format.

     <br><dt><code>make cscope</code><dd>TODO

     <br><dt><code>make defconfig</code><dd>(Re-)create some build configuration files. 
User made changes will be overwritten.

     <br><dt><code>tar</code><br><dt><code>tarbin</code><dd>TODO

</dl>

<p><a name="License"></a>

<h2 class="appendix">Appendix A License</h2>

<p>QEMU is a trademark of Fabrice Bellard.

<p>QEMU is released under the GNU General Public License (TODO: add link). 
Parts of QEMU have specific licenses, see file LICENSE.

<p>TODO (refer to file LICENSE, include it, include the GPL?)

<p><a name="Index"></a>

<h2 class="appendix">Appendix B Index</h2>

<p><a name="Concept-Index"></a>

<h3 class="section">B.1 Concept Index</h3>

<p>This is the main index. Should we combine all keywords in one index? TODO

<ul class="index-cp" compact>
<li><a href="#index-emulated-target-systems-4">emulated target systems</a>: <a href="#intro_005ffeatures">intro_features</a></li>
<li><a href="#index-installation-_0028Linux_0029-7">installation (Linux)</a>: <a href="#install_005flinux">install_linux</a></li>
<li><a href="#index-installation-_0028Windows_0029-8">installation (Windows)</a>: <a href="#install_005fwindows">install_windows</a></li>
<li><a href="#index-operating-modes-1">operating modes</a>: <a href="#intro_005ffeatures">intro_features</a></li>
<li><a href="#index-QEMU-monitor-128">QEMU monitor</a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-quick-start-10">quick start</a>: <a href="#pcsys_005fquickstart">pcsys_quickstart</a></li>
<li><a href="#index-supported-target-systems-5">supported target systems</a>: <a href="#intro_005ffeatures">intro_features</a></li>
<li><a href="#index-supported-user-mode-targets-6">supported user mode targets</a>: <a href="#intro_005ffeatures">intro_features</a></li>
<li><a href="#index-system-emulation-2">system emulation</a>: <a href="#intro_005ffeatures">intro_features</a></li>
<li><a href="#index-system-emulation-_0028ARM_0029-196">system emulation (ARM)</a>: <a href="#ARM-System-emulator">ARM System emulator</a></li>
<li><a href="#index-system-emulation-_0028ColdFire_0029-197">system emulation (ColdFire)</a>: <a href="#ColdFire-System-emulator">ColdFire System emulator</a></li>
<li><a href="#index-system-emulation-_0028Cris_0029-199">system emulation (Cris)</a>: <a href="#Cris-System-emulator">Cris System emulator</a></li>
<li><a href="#index-system-emulation-_0028M68K_0029-198">system emulation (M68K)</a>: <a href="#ColdFire-System-emulator">ColdFire System emulator</a></li>
<li><a href="#index-system-emulation-_0028Microblaze_0029-200">system emulation (Microblaze)</a>: <a href="#Microblaze-System-emulator">Microblaze System emulator</a></li>
<li><a href="#index-system-emulation-_0028MIPS_0029-195">system emulation (MIPS)</a>: <a href="#MIPS-System-emulator">MIPS System emulator</a></li>
<li><a href="#index-system-emulation-_0028PC_0029-9">system emulation (PC)</a>: <a href="#QEMU-PC-System-emulator">QEMU PC System emulator</a></li>
<li><a href="#index-system-emulation-_0028PowerPC_0029-192">system emulation (PowerPC)</a>: <a href="#PowerPC-System-emulator">PowerPC System emulator</a></li>
<li><a href="#index-system-emulation-_0028SH4_0029-201">system emulation (SH4)</a>: <a href="#SH4-System-emulator">SH4 System emulator</a></li>
<li><a href="#index-system-emulation-_0028Sparc32_0029-193">system emulation (Sparc32)</a>: <a href="#Sparc32-System-emulator">Sparc32 System emulator</a></li>
<li><a href="#index-system-emulation-_0028Sparc64_0029-194">system emulation (Sparc64)</a>: <a href="#Sparc64-System-emulator">Sparc64 System emulator</a></li>
<li><a href="#index-user-mode-_0028Alpha_0029-202">user mode (Alpha)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028ARM_0029-203">user mode (ARM)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028ColdFire_0029-205">user mode (ColdFire)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028Cris_0029-207">user mode (Cris)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028i386_0029-208">user mode (i386)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028M68K_0029-206">user mode (M68K)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028Microblaze_0029-209">user mode (Microblaze)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028MIPS_0029-210">user mode (MIPS)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028PowerPC_0029-211">user mode (PowerPC)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028SH4_0029-212">user mode (SH4)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-_0028SPARC_0029-213">user mode (SPARC)</a>: <a href="#Other-binaries">Other binaries</a></li>
<li><a href="#index-user-mode-emulation-3">user mode emulation</a>: <a href="#intro_005ffeatures">intro_features</a></li>
</ul><p><a name="Function-Index"></a>

<h3 class="section">B.2 Function Index</h3>

<p>This index could be used for command line options and monitor functions.



<ul class="index-fn" compact>
<li><a href="#index-g_t_002dacpitable-60"><code>-acpitable</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dalt_002dgrab-46"><code>-alt-grab</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dappend-67"><code>-append</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002daudio_002dhelp-34"><code>-audio-help</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dballoon-59"><code>-balloon</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dbios-83"><code>-bios</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dboot-30"><code>-boot</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dbt-65"><code>-bt</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dcdrom-23"><code>-cdrom</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dchardev-64"><code>-chardev</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dchroot-103"><code>-chroot</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dclock-93"><code>-clock</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dcpu-14"><code>-cpu</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dctrl_002dgrab-47"><code>-ctrl-grab</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dd-80"><code>-d</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002ddaemonize-91"><code>-daemonize</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002ddebugcon-74"><code>-debugcon</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002ddevice-38"><code>-device</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002ddrive-24"><code>-drive</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dechr-97"><code>-echr</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002denable_002dkvm-84"><code>-enable-kvm</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dfda-17"><code>-fda</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dfdb-18"><code>-fdb</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dfsdev-39"><code>-fsdev</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dfull_002dscreen-52"><code>-full-screen</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dg-53"><code>-g</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dgdb-78"><code>-gdb</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dglobal-26"><code>-global</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dh-11"><code>-h</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dhda-19"><code>-hda</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dhdachs-81"><code>-hdachs</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dhdb-20"><code>-hdb</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dhdc-21"><code>-hdc</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dhdd-22"><code>-hdd</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dicount-95"><code>-icount</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dincoming-101"><code>-incoming</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dinitrd-68"><code>-initrd</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dk-33"><code>-k</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dkernel-66"><code>-kernel</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dL-82"><code>-L</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dloadvm-90"><code>-loadvm</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dm-32"><code>-m</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dM-13"><code>-M</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dmon-73"><code>-mon</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dmonitor-71"><code>-monitor</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dmtdblock-27"><code>-mtdblock</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dname-41"><code>-name</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dnet-63"><code>-net</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dno_002dacpi-57"><code>-no-acpi</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dno_002dfd_002dbootchk-56"><code>-no-fd-bootchk</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dno_002dframe-45"><code>-no-frame</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dno_002dhpet-58"><code>-no-hpet</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dno_002dquit-48"><code>-no-quit</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dno_002dreboot-88"><code>-no-reboot</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dno_002dshutdown-89"><code>-no-shutdown</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dnodefaults-102"><code>-nodefaults</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dnodefconfig-110"><code>-nodefconfig</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dnographic-43"><code>-nographic</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dnuma-16"><code>-numa</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dold_002dparam-_0028ARM_0029-107"><code>-old-param (ARM)</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002doption_002drom-92"><code>-option-rom</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dparallel-70"><code>-parallel</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dpflash-29"><code>-pflash</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dpidfile-75"><code>-pidfile</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dportrait-50"><code>-portrait</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dprom_002denv-105"><code>-prom-env</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dqmp-72"><code>-qmp</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dreadconfig-108"><code>-readconfig</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002drtc-94"><code>-rtc</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002drunas-104"><code>-runas</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002ds-79"><code>-s</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dS-77"><code>-S</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsd-28"><code>-sd</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsdl-49"><code>-sdl</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsemihosting-106"><code>-semihosting</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dserial-69"><code>-serial</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dset-25"><code>-set</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dshow_002dcursor-99"><code>-show-cursor</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsinglestep-76"><code>-singlestep</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsmbios-61"><code>-smbios</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsmp-15"><code>-smp</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsnapshot-31"><code>-snapshot</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dsoundhw-35"><code>-soundhw</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dtb_002dsize-100"><code>-tb-size</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dusb-36"><code>-usb</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dusbdevice-37"><code>-usbdevice</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002duuid-42"><code>-uuid</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dversion-12"><code>-version</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dvga-51"><code>-vga</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dvirtfs-40"><code>-virtfs</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dvirtioconsole-98"><code>-virtioconsole</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dvnc-54"><code>-vnc</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dwatchdog-96"><code>-watchdog</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dwin2k_002dhack-55"><code>-win2k-hack</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dwriteconfig-109"><code>-writeconfig</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dxen_002dattach-87"><code>-xen-attach</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dxen_002dcreate-86"><code>-xen-create</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-g_t_002dxen_002ddomid-85"><code>-xen-domid</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-acl_005fadd-183"><code>acl_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-acl_005fpolicy-182"><code>acl_policy</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-acl_005fremove-184"><code>acl_remove</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-acl_005freset-185"><code>acl_reset</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-acl_005fshow-181"><code>acl_show</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-balloon-178"><code>balloon</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-block_005fpasswd-189"><code>block_passwd</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-boot_005fset-163"><code>boot_set</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-change-133"><code>change</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-closefd-188"><code>closefd</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-commit-130"><code>commit</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-cont-142"><code>cont</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-cpu-155"><code>cpu</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-curses-44"><code>curses</code></a>: <a href="#sec_005finvocation">sec_invocation</a></li>
<li><a href="#index-delvm-139"><code>delvm</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-device_005fadd-153"><code>device_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-device_005fdel-154"><code>device_del</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-drive_005fadd-169"><code>drive_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-eject-132"><code>eject</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-gdbserver-143"><code>gdbserver</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-getfd-187"><code>getfd</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-help-129"><code>help</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-host_005fnet_005fadd-172"><code>host_net_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-host_005fnet_005fremove-173"><code>host_net_remove</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-hostfwd_005fadd-176"><code>hostfwd_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-hostfwd_005fremove-177"><code>hostfwd_remove</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-info-191"><code>info</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-loadvm-138"><code>loadvm</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-log-136"><code>log</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-logfile-135"><code>logfile</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-mce-_0028x86_0029-186"><code>mce (x86)</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-memsave-161"><code>memsave</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-migrate-165"><code>migrate</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-migrate_005fcancel-166"><code>migrate_cancel</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-migrate_005fset_005fdowntime-168"><code>migrate_set_downtime</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-migrate_005fset_005fspeed-167"><code>migrate_set_speed</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-mouse_005fbutton-157"><code>mouse_button</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-mouse_005fmove-156"><code>mouse_move</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-mouse_005fset-158"><code>mouse_set</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-netdev_005fadd-174"><code>netdev_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-netdev_005fdel-175"><code>netdev_del</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-nmi-164"><code>nmi</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-pci_005fadd-170"><code>pci_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-pci_005fdel-171"><code>pci_del</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-pmemsave-162"><code>pmemsave</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-print-146"><code>print</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-qmp_005fcapabilities-190"><code>qmp_capabilities</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-quit-131"><code>quit</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-savevm-137"><code>savevm</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-screendump-134"><code>screendump</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-sendkey-147"><code>sendkey</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-set_005flink-179"><code>set_link</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-singlestep-140"><code>singlestep</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-stop-141"><code>stop</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-stopcapture-160"><code>stopcapture</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-sum-150"><code>sum</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-system_005fpowerdown-149"><code>system_powerdown</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-system_005freset-148"><code>system_reset</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-usb_005fadd-151"><code>usb_add</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-usb_005fdel-152"><code>usb_del</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-watchdog_005faction-180"><code>watchdog_action</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-wavcapture-159"><code>wavcapture</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-x-144"><code>x</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
<li><a href="#index-xp-145"><code>xp</code></a>: <a href="#pcsys_005fmonitor">pcsys_monitor</a></li>
</ul><p><a name="Keystroke-Index"></a>

<h3 class="section">B.3 Keystroke Index</h3>

<p>This is a list of all keystrokes which have a special function
in system emulation.



<ul class="index-ky" compact>
<li><a href="#index-Ctrl_002da-_003f-121"><code>Ctrl-a ?</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002da-a-127"><code>Ctrl-a a</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002da-b-125"><code>Ctrl-a b</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002da-c-126"><code>Ctrl-a c</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002da-h-119"><code>Ctrl-a h</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002da-s-123"><code>Ctrl-a s</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002da-t-124"><code>Ctrl-a t</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002da-x-122"><code>Ctrl-a x</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dAlt-114"><code>Ctrl-Alt</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dAlt_002df-111"><code>Ctrl-Alt-f</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dAlt_002dn-113"><code>Ctrl-Alt-n</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dAlt_002du-112"><code>Ctrl-Alt-u</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dDown-116"><code>Ctrl-Down</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dPageDown-118"><code>Ctrl-PageDown</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dPageUp-117"><code>Ctrl-PageUp</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
<li><a href="#index-Ctrl_002dUp-115"><code>Ctrl-Up</code></a>: <a href="#pcsys_005fkeys">pcsys_keys</a></li>
</ul><p><a name="Program-Index"></a>

<h3 class="section">B.4 Program Index</h3>



<ul class="index-pg" compact>
</ul><p><a name="Data-Type-Index"></a>

<h3 class="section">B.5 Data Type Index</h3>

<p>This index could be used for qdev device names and options.



<ul class="index-tp" compact>
</ul><p><a name="Variable-Index"></a>

<h3 class="section">B.6 Variable Index</h3>



<ul class="index-vr" compact>
</ul></body></html>

<!--

Local Variables:
coding: utf-8
End:

-->