File:  [Qemu by Fabrice Bellard] / qemu / qemu-doc.html
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:12:04 2018 UTC (12 months, 3 weeks ago) by root
Branches: qemu, MAIN
CVS tags: qemu0104, HEAD
qemu 0.10.4

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on May, 1 2009 by texi2html 1.78 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>

-->
<head>
<title>QEMU Emulator User Documentation</title>

<meta name="description" content="QEMU Emulator User Documentation">
<meta name="keywords" content="QEMU Emulator User Documentation">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.78">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Top"></a>
<a name="SEC_Top"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="settitle">QEMU Emulator User Documentation
</h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC1">1. Introduction</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC3">2. Installation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC7">3. QEMU PC System emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC63">4. QEMU System emulator for non PC targets</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC70">5. QEMU User space emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC85">6. Compilation from the sources</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC92">7. Index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr size="1">
<a name="Introduction"></a>
<a name="SEC1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC_Top" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC2" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[ &lt;&lt; ]</td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 1. Introduction </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC2">1.1 Features</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
</table>

<hr size="6">
<a name="intro_005ffeatures"></a>
<a name="SEC2"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC1" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 1.1 Features </h2>

<p>QEMU is a FAST! processor emulator using dynamic translation to
achieve good emulation speed.
</p>
<p>QEMU has two operating modes:
</p>
<ul class="toc">
<li>-
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><li>-
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.

</li></ul>

<p>QEMU can run without an host kernel driver and yet gives acceptable
performance.
</p>
<p>For system emulation, the following hardware targets are supported:
</p><ul class="toc">
<li> PC (x86 or x86_64 processor)
</li><li> ISA PC (old style PC without PCI bus)
</li><li> PREP (PowerPC processor)
</li><li> G3 Beige PowerMac (PowerPC processor)
</li><li> Mac99 PowerMac (PowerPC processor, in progress)
</li><li> Sun4m/Sun4c/Sun4d (32-bit Sparc processor)
</li><li> Sun4u/Sun4v (64-bit Sparc processor, in progress)
</li><li> Malta board (32-bit and 64-bit MIPS processors)
</li><li> MIPS Magnum (64-bit MIPS processor)
</li><li> ARM Integrator/CP (ARM)
</li><li> ARM Versatile baseboard (ARM)
</li><li> ARM RealView Emulation baseboard (ARM)
</li><li> Spitz, Akita, Borzoi, Terrier and Tosa PDAs (PXA270 processor)
</li><li> Luminary Micro LM3S811EVB (ARM Cortex-M3)
</li><li> Luminary Micro LM3S6965EVB (ARM Cortex-M3)
</li><li> Freescale MCF5208EVB (ColdFire V2).
</li><li> Arnewsh MCF5206 evaluation board (ColdFire V2).
</li><li> Palm Tungsten|E PDA (OMAP310 processor)
</li><li> N800 and N810 tablets (OMAP2420 processor)
</li><li> MusicPal (MV88W8618 ARM processor)
</li><li> Gumstix &quot;Connex&quot; and &quot;Verdex&quot; motherboards (PXA255/270).
</li><li> Siemens SX1 smartphone (OMAP310 processor)
</li></ul>

<p>For user emulation, x86, PowerPC, ARM, 32-bit MIPS, Sparc32/64 and ColdFire(m68k) CPUs are supported.
</p>
<hr size="6">
<a name="Installation"></a>
<a name="SEC3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC2" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC4" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 2. Installation </h1>

<p>If you want to compile QEMU yourself, see <a href="#SEC85">Compilation from the sources</a>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC4">2.1 Linux</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC5">2.2 Windows</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC6">2.3 Mac OS X</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">     Macintosh
</td></tr>
</table>

<hr size="6">
<a name="install_005flinux"></a>
<a name="SEC4"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 2.1 Linux </h2>

<p>If a precompiled package is available for your distribution - you just
have to install it. Otherwise, see <a href="#SEC85">Compilation from the sources</a>.
</p>
<hr size="6">
<a name="install_005fwindows"></a>
<a name="SEC5"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC4" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC6" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 2.2 Windows </h2>

<p>Download the experimental binary installer at
<a href="http://www.free.oszoo.org/download.html">http://www.free.oszoo.org/download.html</a>.
</p>
<hr size="6">
<a name="install_005fmac"></a>
<a name="SEC6"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC5" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 2.3 Mac OS X </h2>

<p>Download the experimental binary installer at
<a href="http://www.free.oszoo.org/download.html">http://www.free.oszoo.org/download.html</a>.
</p>
<hr size="6">
<a name="QEMU-PC-System-emulator"></a>
<a name="SEC7"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC6" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC8" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC3" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 3. QEMU PC System emulator </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC8">3.1 Introduction</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC9">3.2 Quick Start</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC10">3.3 Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC11">3.4 Keys</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC12">3.5 QEMU Monitor</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC15">3.6 Disk Images</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC27">3.7 Network emulation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC34">3.8 Direct Linux Boot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC35">3.9 USB emulation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC38">3.10 VNC security</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC51">3.11 GDB usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC52">3.12 Target OS specific information</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
</table>

<hr size="6">
<a name="pcsys_005fintroduction"></a>
<a name="SEC8"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC7" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.1 Introduction </h2>


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

<p>SMP is supported with up to 255 CPUs.
</p>
<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>
<p>QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
VGA BIOS.
</p>
<p>QEMU uses YM3812 emulation by Tatsuyuki Satoh.
</p>
<p>QEMU uses GUS emulation(GUSEMU32 <a href="http://www.deinmeister.de/gusemu/">http://www.deinmeister.de/gusemu/</a>)
by Tibor &quot;TS&quot; Schütz.
</p>
<p>CS4231A is the chip used in Windows Sound System and GUSMAX products
</p>

<hr size="6">
<a name="pcsys_005fquickstart"></a>
<a name="SEC9"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC8" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC10" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.2 Quick Start </h2>

<p>Download and uncompress the linux image (&lsquo;<tt>linux.img</tt>&rsquo;) and type:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu linux.img
</pre></td></tr></table>

<p>Linux should boot and give you a prompt.
</p>
<hr size="6">
<a name="sec_005finvocation"></a>
<a name="SEC10"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC9" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC11" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.3 Invocation </h2>

<table><tr><td>&nbsp;</td><td><pre class="example">usage: qemu [options] [<var>disk_image</var>]
</pre></td></tr></table>

<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>
<p>Standard options:
</p><dl compact="compact">
<dt> &lsquo;<samp>-h</samp>&rsquo;</dt>
<dd><p>Display help and exit
</p></dd>
<dt> &lsquo;<samp>-version</samp>&rsquo;</dt>
<dd><p>Display version information and exit
</p></dd>
<dt> &lsquo;<samp>-M <var>machine</var></samp>&rsquo;</dt>
<dd><p>Select the emulated <var>machine</var> (<code>-M ?</code> for list)
</p></dd>
<dt> &lsquo;<samp>-cpu <var>model</var></samp>&rsquo;</dt>
<dd><p>Select CPU model (-cpu ? for list and additional feature selection)
</p></dd>
<dt> &lsquo;<samp>-smp <var>n</var></samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
<dt> &lsquo;<samp>-numa <var>opts</var></samp>&rsquo;</dt>
<dd><p>Simulate a multi node NUMA system. If mem and cpus are omitted, resources
are split equally.
</p></dd>
<dt> &lsquo;<samp>-fda <var>file</var></samp>&rsquo;</dt>
<dt> &lsquo;<samp>-fdb <var>file</var></samp>&rsquo;</dt>
<dd><p>Use <var>file</var> as floppy disk 0/1 image (see section <a href="#SEC15">Disk Images</a>). You can
use the host floppy by using &lsquo;<tt>/dev/fd0</tt>&rsquo; as filename (see section <a href="#SEC21">Using host drives</a>).
</p></dd>
<dt> &lsquo;<samp>-hda <var>file</var></samp>&rsquo;</dt>
<dt> &lsquo;<samp>-hdb <var>file</var></samp>&rsquo;</dt>
<dt> &lsquo;<samp>-hdc <var>file</var></samp>&rsquo;</dt>
<dt> &lsquo;<samp>-hdd <var>file</var></samp>&rsquo;</dt>
<dd><p>Use <var>file</var> as hard disk 0, 1, 2 or 3 image (see section <a href="#SEC15">Disk Images</a>).
</p></dd>
<dt> &lsquo;<samp>-cdrom <var>file</var></samp>&rsquo;</dt>
<dd><p>Use <var>file</var> as CD-ROM image (you cannot use &lsquo;<samp>-hdc</samp>&rsquo; and
&lsquo;<samp>-cdrom</samp>&rsquo; at the same time). You can use the host CD-ROM by
using &lsquo;<tt>/dev/cdrom</tt>&rsquo; as filename (see section <a href="#SEC21">Using host drives</a>).
</p></dd>
<dt> &lsquo;<samp>-drive <var>option</var>[,<var>option</var>[,<var>option</var>[,...]]]</samp>&rsquo;</dt>
<dd>
<p>Define a new drive. Valid options are:
</p>
<dl compact="compact">
<dt> <code>file=<var>file</var></code></dt>
<dd><p>This option defines which disk image (see section <a href="#SEC15">Disk Images</a>) to use with
this drive. If the filename contains comma, you must double it
(for instance, &quot;file=my,,file&quot; to use file &quot;my,file&quot;).
</p></dd>
<dt> <code>if=<var>interface</var></code></dt>
<dd><p>This option defines on which type on interface the drive is connected.
Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio.
</p></dd>
<dt> <code>bus=<var>bus</var>,unit=<var>unit</var></code></dt>
<dd><p>These options define where is connected the drive by defining the bus number and
the unit id.
</p></dd>
<dt> <code>index=<var>index</var></code></dt>
<dd><p>This option defines where is connected the drive by using an index in the list
of available connectors of a given interface type.
</p></dd>
<dt> <code>media=<var>media</var></code></dt>
<dd><p>This option defines the type of the media: disk or cdrom.
</p></dd>
<dt> <code>cyls=<var>c</var>,heads=<var>h</var>,secs=<var>s</var>[,trans=<var>t</var>]</code></dt>
<dd><p>These options have the same definition as they have in &lsquo;<samp>-hdachs</samp>&rsquo;.
</p></dd>
<dt> <code>snapshot=<var>snapshot</var></code></dt>
<dd><p><var>snapshot</var> is &quot;on&quot; or &quot;off&quot; and allows to enable snapshot for given drive (see &lsquo;<samp>-snapshot</samp>&rsquo;).
</p></dd>
<dt> <code>cache=<var>cache</var></code></dt>
<dd><p><var>cache</var> is &quot;none&quot;, &quot;writeback&quot;, or &quot;writethrough&quot; and controls how the host cache is used to access block data.
</p></dd>
<dt> <code>format=<var>format</var></code></dt>
<dd><p>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.
</p></dd>
<dt> <code>serial=<var>serial</var></code></dt>
<dd><p>This option specifies the serial number to assign to the device.
</p></dd>
</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>
<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. When using the &lsquo;<samp>-snapshot</samp>&rsquo; option, writeback caching is
used by default.
</p>
<p>The host page can be avoided entirely with &lsquo;<samp>cache=none</samp>&rsquo;. This will
attempt to do disk IO directly to the guests memory. QEMU may still perform
an internal copy of the data.
</p>
<p>Some block drivers perform badly with &lsquo;<samp>cache=writethrough</samp>&rsquo;, most notably,
qcow2. If performance is more important than correctness,
&lsquo;<samp>cache=writeback</samp>&rsquo; should be used with qcow2. By default, if no explicit
caching is specified for a qcow2 disk image, &lsquo;<samp>cache=writeback</samp>&rsquo; will be
used. For all other disk types, &lsquo;<samp>cache=writethrough</samp>&rsquo; is the default.
</p>
<p>Instead of &lsquo;<samp>-cdrom</samp>&rsquo; you can use:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -drive file=file,index=2,media=cdrom
</pre></td></tr></table>

<p>Instead of &lsquo;<samp>-hda</samp>&rsquo;, &lsquo;<samp>-hdb</samp>&rsquo;, &lsquo;<samp>-hdc</samp>&rsquo;, &lsquo;<samp>-hdd</samp>&rsquo;, you can
use:
</p><table><tr><td>&nbsp;</td><td><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></td></tr></table>

<p>You can connect a CDROM to the slave of ide0:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -drive file=file,if=ide,index=1,media=cdrom
</pre></td></tr></table>

<p>If you don't specify the &quot;file=&quot; argument, you define an empty drive:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -drive if=ide,index=1,media=cdrom
</pre></td></tr></table>

<p>You can connect a SCSI disk with unit ID 6 on the bus #0:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -drive file=file,if=scsi,bus=0,unit=6
</pre></td></tr></table>

<p>Instead of &lsquo;<samp>-fda</samp>&rsquo;, &lsquo;<samp>-fdb</samp>&rsquo;, you can use:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -drive file=file,index=0,if=floppy
qemu -drive file=file,index=1,if=floppy
</pre></td></tr></table>

<p>By default, <var>interface</var> is &quot;ide&quot; and <var>index</var> is automatically
incremented:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -drive file=a -drive file=b&quot;
</pre></td></tr></table>
<p>is interpreted like:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -hda a -hdb b
</pre></td></tr></table>

</dd>
<dt> &lsquo;<samp>-mtdblock file</samp>&rsquo;</dt>
<dd><p>Use 'file' as on-board Flash memory image.
</p></dd>
<dt> &lsquo;<samp>-sd file</samp>&rsquo;</dt>
<dd><p>Use 'file' as SecureDigital card image.
</p></dd>
<dt> &lsquo;<samp>-pflash file</samp>&rsquo;</dt>
<dd><p>Use 'file' as a parallel flash image.
</p></dd>
<dt> &lsquo;<samp>-boot [a|c|d|n]</samp>&rsquo;</dt>
<dd><p>Boot on floppy (a), hard disk (c), CD-ROM (d), or Etherboot (n). Hard disk boot
is the default.
</p></dd>
<dt> &lsquo;<samp>-snapshot</samp>&rsquo;</dt>
<dd><p>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 section <a href="#SEC15">Disk Images</a>).
</p></dd>
<dt> &lsquo;<samp>-m <var>megs</var></samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
<dt> &lsquo;<samp>-k <var>language</var></samp>&rsquo;</dt>
<dd>
<p>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>
<p>The available layouts are:
</p><table><tr><td>&nbsp;</td><td><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></td></tr></table>

<p>The default is <code>en-us</code>.
</p></dd>
<dt> &lsquo;<samp>-audio-help</samp>&rsquo;</dt>
<dd>
<p>Will show the audio subsystem help: list of drivers, tunable
parameters.
</p></dd>
<dt> &lsquo;<samp>-soundhw <var>card1</var>[,<var>card2</var>,...] or -soundhw all</samp>&rsquo;</dt>
<dd>
<p>Enable audio and selected sound hardware. Use ? to print all
available sound hardware.
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

<p>Note that Linux's i810_audio OSS kernel (for AC97) module might
require manually specifying clocking.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">modprobe i810_audio clocking=48000
</pre></td></tr></table>
</dd>
</dl>
<p>USB options:
</p><dl compact="compact">
<dt> &lsquo;<samp>-usb</samp>&rsquo;</dt>
<dd><p>Enable the USB driver (will be the default soon)
</p>
</dd>
<dt> &lsquo;<samp>-usbdevice <var>devname</var></samp>&rsquo;</dt>
<dd><p>Add the USB device <var>devname</var>. See section <a href="#SEC36">Connecting USB devices</a>.
</p>
<dl compact="compact">
<dt> <code>mouse</code></dt>
<dd><p>Virtual Mouse. This will override the PS/2 mouse emulation when activated.
</p>
</dd>
<dt> <code>tablet</code></dt>
<dd><p>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.
</p>
</dd>
<dt> <code>disk:[format=<var>format</var>]:file</code></dt>
<dd><p>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
format=raw to avoid interpreting an untrusted format header.
</p>
</dd>
<dt> <code>host:bus.addr</code></dt>
<dd><p>Pass through the host device identified by bus.addr (Linux only).
</p>
</dd>
<dt> <code>host:vendor_id:product_id</code></dt>
<dd><p>Pass through the host device identified by vendor_id:product_id (Linux only).
</p>
</dd>
<dt> <code>serial:[vendorid=<var>vendor_id</var>][,productid=<var>product_id</var>]:<var>dev</var></code></dt>
<dd><p>Serial converter to host character device <var>dev</var>, see <code>-serial</code> for the
available devices.
</p>
</dd>
<dt> <code>braille</code></dt>
<dd><p>Braille device. This will use BrlAPI to display the braille output on a real
or fake device.
</p>
</dd>
<dt> <code>net:options</code></dt>
<dd><p>Network adapter that supports CDC ethernet and RNDIS protocols.
</p>
</dd>
</dl>
</dd>
<dt> &lsquo;<samp>-name <var>name</var></samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
<dt> &lsquo;<samp>-uuid <var>uuid</var></samp>&rsquo;</dt>
<dd><p>Set system UUID.
</p></dd>
</dl>

<p>Display options:
</p><dl compact="compact">
<dt> &lsquo;<samp>-nographic</samp>&rsquo;</dt>
<dd>
<p>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.
</p></dd>
<dt> &lsquo;<samp>-curses</samp>&rsquo;</dt>
<dd>
<p>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.
</p></dd>
<dt> &lsquo;<samp>-no-frame</samp>&rsquo;</dt>
<dd>
<p>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.
</p></dd>
<dt> &lsquo;<samp>-alt-grab</samp>&rsquo;</dt>
<dd>
<p>Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt).
</p></dd>
<dt> &lsquo;<samp>-no-quit</samp>&rsquo;</dt>
<dd>
<p>Disable SDL window close capability.
</p></dd>
<dt> &lsquo;<samp>-sdl</samp>&rsquo;</dt>
<dd>
<p>Enable SDL.
</p></dd>
<dt> &lsquo;<samp>-portrait</samp>&rsquo;</dt>
<dd>
<p>Rotate graphical output 90 deg left (only PXA LCD).
</p></dd>
<dt> &lsquo;<samp>-vga <var>type</var></samp>&rsquo;</dt>
<dd><p>Select type of VGA card to emulate. Valid values for <var>type</var> are
</p><dl compact="compact">
<dt> <code>cirrus</code></dt>
<dd><p>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)
</p></dd>
<dt> <code>std</code></dt>
<dd><p>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.
</p></dd>
<dt> <code>vmware</code></dt>
<dd><p>VMWare SVGA-II compatible adapter. Use it if you have sufficiently
recent XFree86/XOrg server or Windows guest with a driver for this
card.
</p></dd>
<dt> <code>none</code></dt>
<dd><p>Disable VGA card.
</p></dd>
</dl>
</dd>
<dt> &lsquo;<samp>-full-screen</samp>&rsquo;</dt>
<dd><p>Start in full screen.
</p></dd>
<dt> &lsquo;<samp>-vnc <var>display</var>[,<var>option</var>[,<var>option</var>[,...]]]</samp>&rsquo;</dt>
<dd>
<p>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 &lsquo;<samp>-usbdevice
tablet</samp>&rsquo;). When using the VNC display, you must use the &lsquo;<samp>-k</samp>&rsquo;
parameter to set the keyboard layout if you are not using en-us. Valid
syntax for the <var>display</var> is
</p>
<dl compact="compact">
<dt> <code><var>host</var>:<var>d</var></code></dt>
<dd>
<p>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.
</p>
</dd>
<dt> <code><code>unix</code>:<var>path</var></code></dt>
<dd>
<p>Connections will be allowed over UNIX domain sockets where <var>path</var> is the
location of a unix socket to listen for connections on.
</p>
</dd>
<dt> <code>none</code></dt>
<dd>
<p>VNC is initialized but not started. The monitor <code>change</code> command
can be used to later start the VNC server.
</p>
</dd>
</dl>

<p>Following the <var>display</var> value there may be one or more <var>option</var> flags
separated by commas. Valid options are
</p>
<dl compact="compact">
<dt> <code>reverse</code></dt>
<dd>
<p>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.
</p>
</dd>
<dt> <code>password</code></dt>
<dd>
<p>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="#SEC12">QEMU Monitor</a>
</p>
</dd>
<dt> <code>tls</code></dt>
<dd>
<p>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
<var>x509</var> or <var>x509verify</var> options.
</p>
</dd>
<dt> <code>x509=<var>/path/to/certificate/dir</var></code></dt>
<dd>
<p>Valid if &lsquo;<samp>tls</samp>&rsquo; 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="#SEC38">VNC security</a> section for details on generating certificates.
</p>
</dd>
<dt> <code>x509verify=<var>/path/to/certificate/dir</var></code></dt>
<dd>
<p>Valid if &lsquo;<samp>tls</samp>&rsquo; 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="#SEC38">VNC security</a> section for details on generating
certificates.
</p>
</dd>
<dt> <code>sasl</code></dt>
<dd>
<p>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="#SEC38">VNC security</a> section for details on using
SASL authentication.
</p>
</dd>
<dt> <code>acl</code></dt>
<dd>
<p>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 &lsquo;<samp>acl</samp>&rsquo; 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.
</p>
</dd>
</dl>
</dd>
</dl>

<p>i386 target only:
</p><dl compact="compact">
<dt> &lsquo;<samp>-win2k-hack</samp>&rsquo;</dt>
<dd><p>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).
</p></dd>
<dt> &lsquo;<samp>-rtc-td-hack</samp>&rsquo;</dt>
<dd><p>Use it if you experience time drift problem in Windows with 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.
</p></dd>
<dt> &lsquo;<samp>-no-fd-bootchk</samp>&rsquo;</dt>
<dd><p>Disable boot signature checking for floppy disks in Bochs BIOS. It may
be needed to boot from old floppy disks.
</p></dd>
<dt> &lsquo;<samp>-no-acpi</samp>&rsquo;</dt>
<dd><p>Disable ACPI (Advanced Configuration and Power Interface) support. Use
it if your guest OS complains about ACPI problems (PC target machine
only).
</p></dd>
<dt> &lsquo;<samp>-no-hpet</samp>&rsquo;</dt>
<dd><p>Disable HPET support.
</p></dd>
<dt> &lsquo;<samp>-acpitable [sig=<var>str</var>][,rev=<var>n</var>][,oem_id=<var>str</var>][,oem_table_id=<var>str</var>][,oem_rev=<var>n</var>] [,asl_compiler_id=<var>str</var>][,asl_compiler_rev=<var>n</var>][,data=<var>file1</var>[:<var>file2</var>]...]</samp>&rsquo;</dt>
<dd><p>Add ACPI table with specified header fields and context from specified files.
</p></dd>
<dt> &lsquo;<samp>-smbios file=<var>binary</var></samp>&rsquo;</dt>
<dd><p>Load SMBIOS entry from binary file.
</p>
</dd>
<dt> &lsquo;<samp>-smbios type=0[,vendor=<var>str</var>][,version=<var>str</var>][,date=<var>str</var>][,release=<var>%d.%d</var>]</samp>&rsquo;</dt>
<dd><p>Specify SMBIOS type 0 fields
</p>
</dd>
<dt> &lsquo;<samp>-smbios type=1[,manufacturer=<var>str</var>][,product=<var>str</var>][,version=<var>str</var>][,serial=<var>str</var>][,uuid=<var>uuid</var>][,sku=<var>str</var>][,family=<var>str</var>]</samp>&rsquo;</dt>
<dd><p>Specify SMBIOS type 1 fields
</p>
</dd>
</dl>
<p>Network options:
</p><dl compact="compact">
<dt> &lsquo;<samp>-net nic[,vlan=<var>n</var>][,macaddr=<var>addr</var>][,model=<var>type</var>][,name=<var>name</var>]</samp>&rsquo;</dt>
<dd><p>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 ne2k_pci by default on the PC
target. Optionally, the MAC address can be changed to <var>addr</var>
and a <var>name</var> can be assigned for use in monitor commands. If no
&lsquo;<samp>-net</samp>&rsquo; 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>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.
</p>
</dd>
<dt> &lsquo;<samp>-net user[,vlan=<var>n</var>][,hostname=<var>name</var>][,name=<var>name</var>]</samp>&rsquo;</dt>
<dd><p>Use the user mode network stack which requires no administrator
privilege to run. &lsquo;<samp>hostname=name</samp>&rsquo; can be used to specify the client
hostname reported by the builtin DHCP server.
</p>
</dd>
<dt> &lsquo;<samp>-net channel,<var>port</var>:<var>dev</var></samp>&rsquo;</dt>
<dd><p>Forward &lsquo;<samp>user</samp>&rsquo; TCP connection to port <var>port</var> to character device <var>dev</var>
</p>
</dd>
<dt> &lsquo;<samp>-net tap[,vlan=<var>n</var>][,name=<var>name</var>][,fd=<var>h</var>][,ifname=<var>name</var>][,script=<var>file</var>][,downscript=<var>dfile</var>]</samp>&rsquo;</dt>
<dd><p>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. &lsquo;<samp>fd</samp>&rsquo;=<var>h</var> can be used to specify
the handle of an already opened host TAP interface. The default network
configure script is &lsquo;<tt>/etc/qemu-ifup</tt>&rsquo; and the default network
deconfigure script is &lsquo;<tt>/etc/qemu-ifdown</tt>&rsquo;. Use &lsquo;<samp>script=no</samp>&rsquo;
or &lsquo;<samp>downscript=no</samp>&rsquo; to disable script execution. Example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu linux.img -net nic -net tap
</pre></td></tr></table>

<p>More complicated example (two NICs, each one connected to a TAP device)
</p><table><tr><td>&nbsp;</td><td><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></td></tr></table>

</dd>
<dt> &lsquo;<samp>-net socket[,vlan=<var>n</var>][,name=<var>name</var>][,fd=<var>h</var>][,listen=[<var>host</var>]:<var>port</var>][,connect=<var>host</var>:<var>port</var>]</samp>&rsquo;</dt>
<dd>
<p>Connect the VLAN <var>n</var> to a remote VLAN in another QEMU virtual
machine using a TCP socket connection. If &lsquo;<samp>listen</samp>&rsquo; is
specified, QEMU waits for incoming connections on <var>port</var>
(<var>host</var> is optional). &lsquo;<samp>connect</samp>&rsquo; is used to connect to
another QEMU instance using the &lsquo;<samp>listen</samp>&rsquo; option. &lsquo;<samp>fd</samp>&rsquo;=<var>h</var>
specifies an already opened TCP socket.
</p>
<p>Example:
</p><table><tr><td>&nbsp;</td><td><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></td></tr></table>

</dd>
<dt> &lsquo;<samp>-net socket[,vlan=<var>n</var>][,name=<var>name</var>][,fd=<var>h</var>][,mcast=<var>maddr</var>:<var>port</var>]</samp>&rsquo;</dt>
<dd>
<p>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:
</p><ol>
<li>
Several QEMU can be running on different hosts and share same bus (assuming
correct multicast setup for these hosts).
</li><li>
mcast support is compatible with User Mode Linux (argument &lsquo;<samp>eth<var>N</var>=mcast</samp>&rsquo;), see
<a href="http://user-mode-linux.sf.net">http://user-mode-linux.sf.net</a>.
</li><li>
Use &lsquo;<samp>fd=h</samp>&rsquo; to specify an already opened UDP multicast socket.
</li></ol>

<p>Example:
</p><table><tr><td>&nbsp;</td><td><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 &quot;bus&quot;
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 &quot;bus&quot;
qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \
-net socket,mcast=230.0.0.1:1234
</pre></td></tr></table>

<p>Example (User Mode Linux compat.):
</p><table><tr><td>&nbsp;</td><td><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></td></tr></table>

</dd>
<dt> &lsquo;<samp>-net vde[,vlan=<var>n</var>][,name=<var>name</var>][,sock=<var>socketpath</var>][,port=<var>n</var>][,group=<var>groupname</var>][,mode=<var>octalmode</var>]</samp>&rsquo;</dt>
<dd><p>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>
<p>Example:
</p><table><tr><td>&nbsp;</td><td><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></td></tr></table>

</dd>
<dt> &lsquo;<samp>-net dump[,vlan=<var>n</var>][,file=<var>file</var>][,len=<var>len</var>]</samp>&rsquo;</dt>
<dd><p>Dump network traffic on VLAN <var>n</var> to file <var>file</var> (&lsquo;<tt>qemu-vlan0.pcap</tt>&rsquo; 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.
</p>
</dd>
<dt> &lsquo;<samp>-net none</samp>&rsquo;</dt>
<dd><p>Indicate that no network devices should be configured. It is used to
override the default configuration (&lsquo;<samp>-net nic -net user</samp>&rsquo;) which
is activated if no &lsquo;<samp>-net</samp>&rsquo; options are provided.
</p></dd>
<dt> &lsquo;<samp>-tftp <var>dir</var></samp>&rsquo;</dt>
<dd><p>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). The host IP address on the guest is as
usual 10.0.2.2.
</p></dd>
<dt> &lsquo;<samp>-bootp <var>file</var></samp>&rsquo;</dt>
<dd><p>When using the user mode network stack, broadcast <var>file</var> as the BOOTP
filename. In conjunction with &lsquo;<samp>-tftp</samp>&rsquo;, this can be used to network boot
a guest from a local directory.
</p>
<p>Example (using pxelinux):
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -hda linux.img -boot n -tftp /path/to/tftp/files -bootp /pxelinux.0
</pre></td></tr></table>
</dd>
<dt> &lsquo;<samp>-smb <var>dir</var></samp>&rsquo;</dt>
<dd><p>When using the user mode network stack, activate a built-in SMB
server so that Windows OSes can access to the host files in &lsquo;<tt><var>dir</var></tt>&rsquo;
transparently.
</p>
<p>In the guest Windows OS, the line:
</p><table><tr><td>&nbsp;</td><td><pre class="example">10.0.2.4 smbserver
</pre></td></tr></table>
<p>must be added in the file &lsquo;<tt>C:\WINDOWS\LMHOSTS</tt>&rsquo; (for windows 9x/Me)
or &lsquo;<tt>C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS</tt>&rsquo; (Windows NT/2000).
</p>
<p>Then &lsquo;<tt><var>dir</var></tt>&rsquo; can be accessed in &lsquo;<tt>\\smbserver\qemu</tt>&rsquo;.
</p>
<p>Note that a SAMBA server must be installed on the host OS in
&lsquo;<tt>/usr/sbin/smbd</tt>&rsquo;. QEMU was tested successfully with smbd version
2.2.7a from the Red Hat 9 and version 3.0.10-1.fc3 from Fedora Core 3.
</p></dd>
<dt> &lsquo;<samp>-redir [tcp|udp]:<var>host-port</var>:[<var>guest-host</var>]:<var>guest-port</var></samp>&rsquo;</dt>
<dd>
<p>When using the user mode network stack, redirect incoming TCP or UDP
connections to the host port <var>host-port</var> to the guest
<var>guest-host</var> on guest port <var>guest-port</var>. If <var>guest-host</var>
is not specified, its value is 10.0.2.15 (default address given by the
built-in DHCP server). If no connection type is specified, TCP is used.
</p>
<p>For example, to redirect host X11 connection from screen 1 to guest
screen 0, use the following:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"># on the host
qemu -redir tcp:6001::6000 [...]
# this host xterm should open in the guest X11 server
xterm -display :1
</pre></td></tr></table>

<p>To redirect telnet connections from host port 5555 to telnet port on
the guest, use the following:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"># on the host
qemu -redir tcp:5555::23 [...]
telnet localhost 5555
</pre></td></tr></table>

<p>Then when you use on the host <code>telnet localhost 5555</code>, you
connect to the guest telnet server.
</p>
</dd>
</dl>
<p>Bluetooth(R) options:
</p><dl compact="compact">
<dt> &lsquo;<samp>-bt hci[...]</samp>&rsquo;</dt>
<dd><p>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>
<p><a name="bt_002dhcis"></a>
The following three types are recognized:
</p>
<dl compact="compact">
<dt> <code>-bt hci,null</code></dt>
<dd><p>(default) The corresponding Bluetooth HCI assumes no internal logic
and will not respond to any HCI commands or emit events.
</p>
</dd>
<dt> <code>-bt hci,host[:<var>id</var>]</code></dt>
<dd><p>(<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.
</p>
</dd>
<dt> <code>-bt hci[,vlan=<var>n</var>]</code></dt>
<dd><p>Add a virtual, standard HCI that will participate in the Bluetooth
scatternet <var>n</var> (default <code>0</code>). Similarly to &lsquo;<samp>-net</samp>&rsquo;
VLANs, devices inside a bluetooth network <var>n</var> can only communicate
with other devices in the same network (scatternet).
</p></dd>
</dl>

</dd>
<dt> &lsquo;<samp>-bt vhci[,vlan=<var>n</var>]</samp>&rsquo;</dt>
<dd><p>(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:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
</pre></td></tr></table>

</dd>
<dt> &lsquo;<samp>-bt device:<var>dev</var>[,vlan=<var>n</var>]</samp>&rsquo;</dt>
<dd><p>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:
</p>
<dl compact="compact">
<dt> <code>keyboard</code></dt>
<dd><p>Virtual wireless keyboard implementing the HIDP bluetooth profile.
</p></dd>
</dl>
</dd>
</dl>

<p>Linux boot specific:
When using these options, you can use a given
Linux kernel without installing it in the disk image. It can be useful
for easier testing of various kernels.
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-kernel <var>bzImage</var></samp>&rsquo;</dt>
<dd><p>Use <var>bzImage</var> as kernel image.
</p></dd>
<dt> &lsquo;<samp>-append <var>cmdline</var></samp>&rsquo;</dt>
<dd><p>Use <var>cmdline</var> as kernel command line
</p></dd>
<dt> &lsquo;<samp>-initrd <var>file</var></samp>&rsquo;</dt>
<dd><p>Use <var>file</var> as initial ram disk.
</p></dd>
</dl>

<p>Debug/Expert options:
</p><dl compact="compact">
<dt> &lsquo;<samp>-serial <var>dev</var></samp>&rsquo;</dt>
<dd><p>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>
<p>This option can be used several times to simulate up to 4 serial
ports.
</p>
<p>Use <code>-serial none</code> to disable all serial ports.
</p>
<p>Available character devices are:
</p><dl compact="compact">
<dt> <code>vc[:WxH]</code></dt>
<dd><p>Virtual console. Optionally, a width and height can be given in pixel with
</p><table><tr><td>&nbsp;</td><td><pre class="example">vc:800x600
</pre></td></tr></table>
<p>It is also possible to specify width or height in characters:
</p><table><tr><td>&nbsp;</td><td><pre class="example">vc:80Cx24C
</pre></td></tr></table>
</dd>
<dt> <code>pty</code></dt>
<dd><p>[Linux only] Pseudo TTY (a new PTY is automatically allocated)
</p></dd>
<dt> <code>none</code></dt>
<dd><p>No device is allocated.
</p></dd>
<dt> <code>null</code></dt>
<dd><p>void device
</p></dd>
<dt> <code>/dev/XXX</code></dt>
<dd><p>[Linux only] Use host tty, e.g. &lsquo;<tt>/dev/ttyS0</tt>&rsquo;. The host serial port
parameters are set according to the emulated ones.
</p></dd>
<dt> <code>/dev/parport<var>N</var></code></dt>
<dd><p>[Linux only, parallel port only] Use host parallel port
<var>N</var>. Currently SPP and EPP parallel port features can be used.
</p></dd>
<dt> <code>file:<var>filename</var></code></dt>
<dd><p>Write output to <var>filename</var>. No character can be read.
</p></dd>
<dt> <code>stdio</code></dt>
<dd><p>[Unix only] standard input/output
</p></dd>
<dt> <code>pipe:<var>filename</var></code></dt>
<dd><p>name pipe <var>filename</var>
</p></dd>
<dt> <code>COM<var>n</var></code></dt>
<dd><p>[Windows only] Use host serial port <var>n</var>
</p></dd>
<dt> <code>udp:[<var>remote_host</var>]:<var>remote_port</var>[@[<var>src_ip</var>]:<var>src_port</var>]</code></dt>
<dd><p>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></dd>
<dt> <code>msmouse</code></dt>
<dd><p>Three button serial mouse. Configure the guest to use Microsoft protocol.
</p>
<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>
<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.
</p><dl compact="compact">
<dt> <code>Qemu Options:</code></dt>
<dd><p>-serial udp::4555@:4556
</p></dd>
<dt> <code>netcat options:</code></dt>
<dd><p>-u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
</p></dd>
<dt> <code>telnet options:</code></dt>
<dd><p>localhost 5555
</p></dd>
</dl>

</dd>
<dt> <code>tcp:[<var>host</var>]:<var>port</var>[,<var>server</var>][,nowait][,nodelay]</code></dt>
<dd><p>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.
</p><dl compact="compact">
<dt> <code>Example to send tcp console to 192.168.0.2 port 4444</code></dt>
<dd><p>-serial tcp:192.168.0.2:4444
</p></dd>
<dt> <code>Example to listen and wait on port 4444 for connection</code></dt>
<dd><p>-serial tcp::4444,server
</p></dd>
<dt> <code>Example to not wait and listen on ip 192.168.0.100 port 4444</code></dt>
<dd><p>-serial tcp:192.168.0.100:4444,server,nowait
</p></dd>
</dl>

</dd>
<dt> <code>telnet:<var>host</var>:<var>port</var>[,server][,nowait][,nodelay]</code></dt>
<dd><p>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 &quot;send break&quot; followed by pressing the enter key.
</p>
</dd>
<dt> <code>unix:<var>path</var>[,server][,nowait]</code></dt>
<dd><p>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.
</p>
</dd>
<dt> <code>mon:<var>dev_string</var></code></dt>
<dd><p>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="#SEC11">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:
</p><dl compact="compact">
<dt> <code>-serial mon:telnet::4444,server,nowait</code></dt>
</dl>

</dd>
<dt> <code>braille</code></dt>
<dd><p>Braille device. This will use BrlAPI to display the braille output on a real
or fake device.
</p>
</dd>
</dl>
</dd>
<dt> &lsquo;<samp>-parallel <var>dev</var></samp>&rsquo;</dt>
<dd><p>Redirect the virtual parallel port to host device <var>dev</var> (same
devices as the serial port). On Linux hosts, &lsquo;<tt>/dev/parportN</tt>&rsquo; can
be used to use hardware devices connected on the corresponding host
parallel port.
</p>
<p>This option can be used several times to simulate up to 3 parallel
ports.
</p>
<p>Use <code>-parallel none</code> to disable all parallel ports.
</p></dd>
<dt> &lsquo;<samp>-monitor <var>dev</var></samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
<dt> &lsquo;<samp>-pidfile <var>file</var></samp>&rsquo;</dt>
<dd><p>Store the QEMU process PID in <var>file</var>. It is useful if you launch QEMU
from a script.
</p></dd>
<dt> &lsquo;<samp>-singlestep</samp>&rsquo;</dt>
<dd><p>Run the emulation in single step mode.
</p></dd>
<dt> &lsquo;<samp>-S</samp>&rsquo;</dt>
<dd><p>Do not start CPU at startup (you must type 'c' in the monitor).
</p></dd>
<dt> &lsquo;<samp>-gdb <var>dev</var></samp>&rsquo;</dt>
<dd><p>Wait for gdb connection on device <var>dev</var> (see section <a href="#SEC51">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:
</p><table><tr><td>&nbsp;</td><td><pre class="example">(gdb) target remote | exec qemu -gdb stdio ...
</pre></td></tr></table>
</dd>
<dt> &lsquo;<samp>-s</samp>&rsquo;</dt>
<dd><p>Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
(see section <a href="#SEC51">GDB usage</a>).
</p></dd>
<dt> &lsquo;<samp>-d</samp>&rsquo;</dt>
<dd><p>Output log in /tmp/qemu.log
</p></dd>
<dt> &lsquo;<samp>-hdachs <var>c</var>,<var>h</var>,<var>s</var>,[,<var>t</var>]</samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
<dt> &lsquo;<samp>-L <var>path</var></samp>&rsquo;</dt>
<dd><p>Set the directory for the BIOS, VGA BIOS and keymaps.
</p></dd>
<dt> &lsquo;<samp>-bios <var>file</var></samp>&rsquo;</dt>
<dd><p>Set the filename for the BIOS.
</p></dd>
<dt> &lsquo;<samp>-kernel-kqemu</samp>&rsquo;</dt>
<dd><p>Enable KQEMU full virtualization (default is user mode only).
</p></dd>
<dt> &lsquo;<samp>-no-kqemu</samp>&rsquo;</dt>
<dd><p>Disable KQEMU kernel module usage. KQEMU options are only available if
KQEMU support is enabled when compiling.
</p></dd>
<dt> &lsquo;<samp>-enable-kvm</samp>&rsquo;</dt>
<dd><p>Enable KVM full virtualization support. This option is only available
if KVM support is enabled when compiling.
</p></dd>
<dt> &lsquo;<samp>-no-reboot</samp>&rsquo;</dt>
<dd><p>Exit instead of rebooting.
</p></dd>
<dt> &lsquo;<samp>-no-shutdown</samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
<dt> &lsquo;<samp>-loadvm <var>file</var></samp>&rsquo;</dt>
<dd><p>Start right away with a saved state (<code>loadvm</code> in monitor)
</p></dd>
<dt> &lsquo;<samp>-daemonize</samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
<dt> &lsquo;<samp>-option-rom <var>file</var></samp>&rsquo;</dt>
<dd><p>Load the contents of <var>file</var> as an option ROM.
This option is useful to load things like EtherBoot.
</p></dd>
<dt> &lsquo;<samp>-clock <var>method</var></samp>&rsquo;</dt>
<dd><p>Force the use of the given methods for timer alarm. To see what timers
are available use -clock ?.
</p></dd>
<dt> &lsquo;<samp>-localtime</samp>&rsquo;</dt>
<dd><p>Set the real time clock to local time (the default is to UTC
time). This option is needed to have correct date in MS-DOS or
Windows.
</p>
</dd>
<dt> &lsquo;<samp>-startdate <var>date</var></samp>&rsquo;</dt>
<dd><p>Set the initial date of the real time clock. Valid formats for
<var>date</var> are: <code>now</code> or <code>2006-06-17T16:01:21</code> or
<code>2006-06-17</code>. The default value is <code>now</code>.
</p></dd>
<dt> &lsquo;<samp>-icount [N|auto]</samp>&rsquo;</dt>
<dd><p>Enable virtual instruction counter. The virtual cpu will execute one
instruction every 2^N 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>
<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.
</p>
</dd>
<dt> &lsquo;<samp>-echr numeric_ascii_value</samp>&rsquo;</dt>
<dd><p>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.
</p><dl compact="compact">
<dt> <code>-echr 0x14</code></dt>
<dt> <code>-echr 20</code></dt>
</dl>
</dd>
<dt> &lsquo;<samp>-virtioconsole <var>c</var></samp>&rsquo;</dt>
<dd><p>Set virtio console.
</p></dd>
<dt> &lsquo;<samp>-chroot dir</samp>&rsquo;</dt>
<dd><p>Immediately before starting guest execution, chroot to the specified
directory. Especially useful in combination with -runas.
</p></dd>
<dt> &lsquo;<samp>-runas user</samp>&rsquo;</dt>
<dd><p>Immediately before starting guest execution, drop root privileges, switching
to the specified user.
</p></dd>
</dl>


<hr size="6">
<a name="pcsys_005fkeys"></a>
<a name="SEC11"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC10" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC12" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.4 Keys </h2>


<p>During the graphical emulation, you can use the following keys:
</p><dl compact="compact">
<dt> &lt;Ctrl-Alt-f&gt;</dt>
<dd><p>Toggle full screen
</p>
</dd>
<dt> &lt;Ctrl-Alt-n&gt;</dt>
<dd><p>Switch to virtual console 'n'. Standard console mappings are:
</p><dl compact="compact">
<dt> <em>1</em></dt>
<dd><p>Target system display
</p></dd>
<dt> <em>2</em></dt>
<dd><p>Monitor
</p></dd>
<dt> <em>3</em></dt>
<dd><p>Serial port
</p></dd>
</dl>

</dd>
<dt> &lt;Ctrl-Alt&gt;</dt>
<dd><p>Toggle mouse and keyboard grab.
</p></dd>
</dl>

<p>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>
<p>During emulation, if you are using the &lsquo;<samp>-nographic</samp>&rsquo; option, use
&lt;Ctrl-a h&gt; to get terminal commands:
</p>
<dl compact="compact">
<dt> &lt;Ctrl-a h&gt;</dt>
<dt> &lt;Ctrl-a ?&gt;</dt>
<dd><p>Print this help
</p></dd>
<dt> &lt;Ctrl-a x&gt;</dt>
<dd><p>Exit emulator
</p></dd>
<dt> &lt;Ctrl-a s&gt;</dt>
<dd><p>Save disk data back to file (if -snapshot)
</p></dd>
<dt> &lt;Ctrl-a t&gt;</dt>
<dd><p>Toggle console timestamps
</p></dd>
<dt> &lt;Ctrl-a b&gt;</dt>
<dd><p>Send break (magic sysrq in Linux)
</p></dd>
<dt> &lt;Ctrl-a c&gt;</dt>
<dd><p>Switch between console and monitor
</p></dd>
<dt> &lt;Ctrl-a Ctrl-a&gt;</dt>
<dd><p>Send Ctrl-a
</p></dd>
</dl>


<hr size="6">
<a name="pcsys_005fmonitor"></a>
<a name="SEC12"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC11" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC13" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.5 QEMU Monitor </h2>

<p>The QEMU monitor is used to give complex commands to the QEMU
emulator. You can use it to:
</p>
<ul class="toc">
<li>-
Remove or insert removable media images
(such as CD-ROM or floppies).

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

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

</li></ul>

<hr size="6">
<a name="SEC13"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC12" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC14" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC12" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.5.1 Commands </h3>

<p>The following commands are available:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>help or ? [<var>cmd</var>]</samp>&rsquo;</dt>
<dd><p>Show the help for all commands or just for command <var>cmd</var>.
</p>
</dd>
<dt> &lsquo;<samp>commit</samp>&rsquo;</dt>
<dd><p>Commit changes to the disk images (if -snapshot is used).
</p>
</dd>
<dt> &lsquo;<samp>info <var>subcommand</var></samp>&rsquo;</dt>
<dd><p>Show various information about the system state.
</p>
<dl compact="compact">
<dt> &lsquo;<samp>info version</samp>&rsquo;</dt>
<dd><p>show the version of QEMU
</p></dd>
<dt> &lsquo;<samp>info network</samp>&rsquo;</dt>
<dd><p>show the various VLANs and the associated devices
</p></dd>
<dt> &lsquo;<samp>info chardev</samp>&rsquo;</dt>
<dd><p>show the character devices
</p></dd>
<dt> &lsquo;<samp>info block</samp>&rsquo;</dt>
<dd><p>show the block devices
</p></dd>
<dt> &lsquo;<samp>info block</samp>&rsquo;</dt>
<dd><p>show block device statistics
</p></dd>
<dt> &lsquo;<samp>info registers</samp>&rsquo;</dt>
<dd><p>show the cpu registers
</p></dd>
<dt> &lsquo;<samp>info cpus</samp>&rsquo;</dt>
<dd><p>show infos for each CPU
</p></dd>
<dt> &lsquo;<samp>info history</samp>&rsquo;</dt>
<dd><p>show the command line history
</p></dd>
<dt> &lsquo;<samp>info irq</samp>&rsquo;</dt>
<dd><p>show the interrupts statistics (if available)
</p></dd>
<dt> &lsquo;<samp>info pic</samp>&rsquo;</dt>
<dd><p>show i8259 (PIC) state
</p></dd>
<dt> &lsquo;<samp>info pci</samp>&rsquo;</dt>
<dd><p>show emulated PCI device info
</p></dd>
<dt> &lsquo;<samp>info tlb</samp>&rsquo;</dt>
<dd><p>show virtual to physical memory mappings (i386 only)
</p></dd>
<dt> &lsquo;<samp>info mem</samp>&rsquo;</dt>
<dd><p>show the active virtual memory mappings (i386 only)
</p></dd>
<dt> &lsquo;<samp>info hpet</samp>&rsquo;</dt>
<dd><p>show state of HPET (i386 only)
</p></dd>
<dt> &lsquo;<samp>info kqemu</samp>&rsquo;</dt>
<dd><p>show KQEMU information
</p></dd>
<dt> &lsquo;<samp>info kvm</samp>&rsquo;</dt>
<dd><p>show KVM information
</p></dd>
<dt> &lsquo;<samp>info usb</samp>&rsquo;</dt>
<dd><p>show USB devices plugged on the virtual USB hub
</p></dd>
<dt> &lsquo;<samp>info usbhost</samp>&rsquo;</dt>
<dd><p>show all USB host devices
</p></dd>
<dt> &lsquo;<samp>info profile</samp>&rsquo;</dt>
<dd><p>show profiling information
</p></dd>
<dt> &lsquo;<samp>info capture</samp>&rsquo;</dt>
<dd><p>show information about active capturing
</p></dd>
<dt> &lsquo;<samp>info snapshots</samp>&rsquo;</dt>
<dd><p>show list of VM snapshots
</p></dd>
<dt> &lsquo;<samp>info status</samp>&rsquo;</dt>
<dd><p>show the current VM status (running|paused)
</p></dd>
<dt> &lsquo;<samp>info pcmcia</samp>&rsquo;</dt>
<dd><p>show guest PCMCIA status
</p></dd>
<dt> &lsquo;<samp>info mice</samp>&rsquo;</dt>
<dd><p>show which guest mouse is receiving events
</p></dd>
<dt> &lsquo;<samp>info vnc</samp>&rsquo;</dt>
<dd><p>show the vnc server status
</p></dd>
<dt> &lsquo;<samp>info name</samp>&rsquo;</dt>
<dd><p>show the current VM name
</p></dd>
<dt> &lsquo;<samp>info uuid</samp>&rsquo;</dt>
<dd><p>show the current VM UUID
</p></dd>
<dt> &lsquo;<samp>info cpustats</samp>&rsquo;</dt>
<dd><p>show CPU statistics
</p></dd>
<dt> &lsquo;<samp>info slirp</samp>&rsquo;</dt>
<dd><p>show SLIRP statistics (if available)
</p></dd>
<dt> &lsquo;<samp>info migrate</samp>&rsquo;</dt>
<dd><p>show migration status
</p></dd>
<dt> &lsquo;<samp>info balloon</samp>&rsquo;</dt>
<dd><p>show balloon information
</p></dd>
</dl>

</dd>
<dt> &lsquo;<samp>q or quit</samp>&rsquo;</dt>
<dd><p>Quit the emulator.
</p>
</dd>
<dt> &lsquo;<samp>eject [-f] <var>device</var></samp>&rsquo;</dt>
<dd><p>Eject a removable medium (use -f to force it).
</p>
</dd>
<dt> &lsquo;<samp>change <var>device</var> <var>setting</var></samp>&rsquo;</dt>
<dd>
<p>Change the configuration of a device.
</p>
<dl compact="compact">
<dt> &lsquo;<samp>change <var>diskdevice</var> <var>filename</var> [<var>format</var>]</samp>&rsquo;</dt>
<dd><p>Change the medium for a removable disk device to point to <var>filename</var>. eg
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">(qemu) change ide1-cd0 /path/to/some.iso
</pre></td></tr></table>

<p><var>format</var> is optional.
</p>
</dd>
<dt> &lsquo;<samp>change vnc <var>display</var>,<var>options</var></samp>&rsquo;</dt>
<dd><p>Change the configuration of the VNC server. The valid syntax for <var>display</var>
and <var>options</var> are described at <a href="#SEC10">Invocation</a>. eg
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">(qemu) change vnc localhost:1
</pre></td></tr></table>

</dd>
<dt> &lsquo;<samp>change vnc password [<var>password</var>]</samp>&rsquo;</dt>
<dd>
<p>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
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">(qemu) change vnc password
Password: ********
</pre></td></tr></table>

</dd>
</dl>

</dd>
<dt> &lsquo;<samp>acl <var>subcommand</var> <var>aclname</var> <var>match</var> <var>index</var></samp>&rsquo;</dt>
<dd>
<p>Manage access control lists for network services. 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.
</p>
<dl compact="compact">
<dt> &lsquo;<samp>acl show &lt;aclname&gt;</samp>&rsquo;</dt>
<dd><p>list all the match rules in the access control list, and the default
policy
</p></dd>
<dt> &lsquo;<samp>acl policy &lt;aclname&gt; <code>allow|deny</code></samp>&rsquo;</dt>
<dd><p>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>
</p></dd>
<dt> &lsquo;<samp>acl allow &lt;aclname&gt; &lt;match&gt; [&lt;index&gt;]</samp>&rsquo;</dt>
<dd><p>add a match to the access control list, allowing 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 <code>index</code> parameter is supplied.
</p></dd>
<dt> &lsquo;<samp>acl deny &lt;aclname&gt; &lt;match&gt; [&lt;index&gt;]</samp>&rsquo;</dt>
<dd><p>add a match to the access control list, 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 <code>index</code> parameter is supplied.
</p></dd>
<dt> &lsquo;<samp>acl remove &lt;aclname&gt; &lt;match&gt;</samp>&rsquo;</dt>
<dd><p>remove the specified match rule from the access control list.
</p></dd>
<dt> &lsquo;<samp>acl reset &lt;aclname&gt;</samp>&rsquo;</dt>
<dd><p>remove all matches from the access control list, and set the default
policy back to <code>deny</code>.
</p></dd>
</dl>

</dd>
<dt> &lsquo;<samp>screendump <var>filename</var></samp>&rsquo;</dt>
<dd><p>Save screen into PPM image <var>filename</var>.
</p>
</dd>
<dt> &lsquo;<samp>logfile <var>filename</var></samp>&rsquo;</dt>
<dd><p>Output logs to <var>filename</var>.
</p>
</dd>
<dt> &lsquo;<samp>log <var>item1</var>[,...]</samp>&rsquo;</dt>
<dd><p>Activate logging of the specified items to &lsquo;<tt>/tmp/qemu.log</tt>&rsquo;.
</p>
</dd>
<dt> &lsquo;<samp>savevm [<var>tag</var>|<var>id</var>]</samp>&rsquo;</dt>
<dd><p>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="#SEC18">VM snapshots</a>.
</p>
</dd>
<dt> &lsquo;<samp>loadvm <var>tag</var>|<var>id</var></samp>&rsquo;</dt>
<dd><p>Set the whole virtual machine to the snapshot identified by the tag
<var>tag</var> or the unique snapshot ID <var>id</var>.
</p>
</dd>
<dt> &lsquo;<samp>delvm <var>tag</var>|<var>id</var></samp>&rsquo;</dt>
<dd><p>Delete the snapshot identified by <var>tag</var> or <var>id</var>.
</p>
</dd>
<dt> &lsquo;<samp>singlestep [off]</samp>&rsquo;</dt>
<dd><p>Run the emulation in single step mode.
If called with option off, the emulation returns to normal mode.
</p>
</dd>
<dt> &lsquo;<samp>stop</samp>&rsquo;</dt>
<dd><p>Stop emulation.
</p>
</dd>
<dt> &lsquo;<samp>c or cont</samp>&rsquo;</dt>
<dd><p>Resume emulation.
</p>
</dd>
<dt> &lsquo;<samp>gdbserver [<var>port</var>]</samp>&rsquo;</dt>
<dd><p>Start gdbserver session (default <var>port</var>=1234)
</p>
</dd>
<dt> &lsquo;<samp>x/fmt <var>addr</var></samp>&rsquo;</dt>
<dd><p>Virtual memory dump starting at <var>addr</var>.
</p>
</dd>
<dt> &lsquo;<samp>xp /<var>fmt</var> <var>addr</var></samp>&rsquo;</dt>
<dd><p>Physical memory dump starting at <var>addr</var>.
</p>
<p><var>fmt</var> is a format which tells the command how to format the
data. Its syntax is: &lsquo;<samp>/{count}{format}{size}</samp>&rsquo;
</p>
<dl compact="compact">
<dt> <var>count</var></dt>
<dd><p>is the number of items to be dumped.
</p>
</dd>
<dt> <var>format</var></dt>
<dd><p>can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
c (char) or i (asm instruction).
</p>
</dd>
<dt> <var>size</var></dt>
<dd><p>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.
</p>
</dd>
</dl>

<p>Examples:
</p><ul class="toc">
<li>
Dump 10 instructions at the current instruction pointer:
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

</li><li>
Dump 80 16 bit values at the start of the video memory.
<table><tr><td>&nbsp;</td><td><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></td></tr></table>
</li></ul>

</dd>
<dt> &lsquo;<samp>p or print/<var>fmt</var> <var>expr</var></samp>&rsquo;</dt>
<dd>
<p>Print expression value. Only the <var>format</var> part of <var>fmt</var> is
used.
</p>
</dd>
<dt> &lsquo;<samp>sendkey <var>keys</var></samp>&rsquo;</dt>
<dd>
<p>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:
</p><table><tr><td>&nbsp;</td><td><pre class="example">sendkey ctrl-alt-f1
</pre></td></tr></table>

<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.
</p>
</dd>
<dt> &lsquo;<samp>system_reset</samp>&rsquo;</dt>
<dd>
<p>Reset the system.
</p>
</dd>
<dt> &lsquo;<samp>system_powerdown</samp>&rsquo;</dt>
<dd>
<p>Power down the system (if supported).
</p>
</dd>
<dt> &lsquo;<samp>sum <var>addr</var> <var>size</var></samp>&rsquo;</dt>
<dd>
<p>Compute the checksum of a memory region.
</p>
</dd>
<dt> &lsquo;<samp>usb_add <var>devname</var></samp>&rsquo;</dt>
<dd>
<p>Add the USB device <var>devname</var>.  For details of available devices see
<a href="#SEC36">Connecting USB devices</a>
</p>
</dd>
<dt> &lsquo;<samp>usb_del <var>devname</var></samp>&rsquo;</dt>
<dd>
<p>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.
</p>
</dd>
<dt> &lsquo;<samp>mouse_move <var>dx</var> <var>dy</var> [<var>dz</var>]</samp>&rsquo;</dt>
<dd><p>Move the active mouse to the specified coordinates <var>dx</var> <var>dy</var>
with optional scroll axis <var>dz</var>.
</p>
</dd>
<dt> &lsquo;<samp>mouse_button <var>val</var></samp>&rsquo;</dt>
<dd><p>Change the active mouse button state <var>val</var> (1=L, 2=M, 4=R).
</p>
</dd>
<dt> &lsquo;<samp>mouse_set <var>index</var></samp>&rsquo;</dt>
<dd><p>Set which mouse device receives events at given <var>index</var>, index
can be obtained with
</p><table><tr><td>&nbsp;</td><td><pre class="example">info mice
</pre></td></tr></table>

</dd>
<dt> &lsquo;<samp>wavcapture <var>filename</var> [<var>frequency</var> [<var>bits</var> [<var>channels</var>]]]</samp>&rsquo;</dt>
<dd><p>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>
<p>Defaults:
</p><ul class="toc">
<li>- Sample rate = 44100 Hz - CD quality
</li><li>- Bits = 16
</li><li>- Number of channels = 2 - Stereo
</li></ul>

</dd>
<dt> &lsquo;<samp>stopcapture <var>index</var></samp>&rsquo;</dt>
<dd><p>Stop capture with a given <var>index</var>, index can be obtained with
</p><table><tr><td>&nbsp;</td><td><pre class="example">info capture
</pre></td></tr></table>

</dd>
<dt> &lsquo;<samp>memsave <var>addr</var> <var>size</var> <var>file</var></samp>&rsquo;</dt>
<dd><p>save to disk virtual memory dump starting at <var>addr</var> of size <var>size</var>.
</p>
</dd>
<dt> &lsquo;<samp>pmemsave <var>addr</var> <var>size</var> <var>file</var></samp>&rsquo;</dt>
<dd><p>save to disk physical memory dump starting at <var>addr</var> of size <var>size</var>.
</p>
</dd>
<dt> &lsquo;<samp>boot_set <var>bootdevicelist</var></samp>&rsquo;</dt>
<dd>
<p>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>
<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.
</p>
</dd>
<dt> &lsquo;<samp>nmi <var>cpu</var></samp>&rsquo;</dt>
<dd><p>Inject an NMI on the given CPU.
</p>
</dd>
<dt> &lsquo;<samp>migrate [-d] <var>uri</var></samp>&rsquo;</dt>
<dd><p>Migrate to <var>uri</var> (using -d to not wait for completion).
</p>
</dd>
<dt> &lsquo;<samp>migrate_cancel</samp>&rsquo;</dt>
<dd><p>Cancel the current VM migration.
</p>
</dd>
<dt> &lsquo;<samp>migrate_set_speed <var>value</var></samp>&rsquo;</dt>
<dd><p>Set maximum speed to <var>value</var> (in bytes) for migrations.
</p>
</dd>
<dt> &lsquo;<samp>balloon <var>value</var></samp>&rsquo;</dt>
<dd><p>Request VM to change its memory allocation to <var>value</var> (in MB).
</p>
</dd>
<dt> &lsquo;<samp>set_link <var>name</var> [up|down]</samp>&rsquo;</dt>
<dd><p>Set link <var>name</var> up or down.
</p>
</dd>
</dl>

<hr size="6">
<a name="SEC14"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC13" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC12" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.5.2 Integer expressions </h3>

<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>
<hr size="6">
<a name="disk_005fimages"></a>
<a name="SEC15"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC14" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC16" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.6 Disk Images </h2>

<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>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC16">3.6.1 Quick start for disk image creation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC17">3.6.2 Snapshot mode</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC18">3.6.3 VM snapshots</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC19">3.6.4 <code>qemu-img</code> Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">       qemu-img Invocation
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC20">3.6.5 <code>qemu-nbd</code> Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">       qemu-nbd Invocation
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC21">3.6.6 Using host drives</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC25">3.6.7 Virtual FAT disk images</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#SEC26">3.6.8 NBD access</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"></td></tr>
</table>

<hr size="6">
<a name="disk_005fimages_005fquickstart"></a>
<a name="SEC16"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC15" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC17" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.1 Quick start for disk image creation </h3>

<p>You can create a disk image with the command:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu-img create myimage.img mysize
</pre></td></tr></table>
<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>
<p>See <a href="#SEC19"><code>qemu-img</code> Invocation</a> for more information.
</p>
<hr size="6">
<a name="disk_005fimages_005fsnapshot_005fmode"></a>
<a name="SEC17"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC16" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC18" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.2 Snapshot mode </h3>

<p>If you use the option &lsquo;<samp>-snapshot</samp>&rsquo;, all disk images are
considered as read only. When sectors in written, they are written in
a temporary file created in &lsquo;<tt>/tmp</tt>&rsquo;. 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>
<hr size="6">
<a name="vm_005fsnapshots"></a>
<a name="SEC18"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC17" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC19" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.3 VM snapshots </h3>

<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>
<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>
<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:
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

<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>
<p>When using the (unrelated) <code>-snapshot</code> option
(<a href="#SEC17">Snapshot mode</a>), you can always make VM snapshots,
but they are deleted as soon as you exit QEMU.
</p>
<p>VM snapshots currently have the following known limitations:
</p><ul class="toc">
<li>
They cannot cope with removable devices if they are removed or
inserted after a snapshot is done.
</li><li>
A few device drivers still have incomplete snapshot support so their
state is not saved or restored properly (in particular USB).
</li></ul>

<hr size="6">
<a name="qemu_005fimg_005finvocation"></a>
<a name="SEC19"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC18" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC20" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.4 <code>qemu-img</code> Invocation </h3>

<table><tr><td>&nbsp;</td><td><pre class="example">usage: qemu-img command [command options]
</pre></td></tr></table>


<p>The following commands are supported:
</p><dl compact="compact">
<dt> &lsquo;<samp>create [-e] [-6] [-F <var>base_fmt</var>] [-b <var>base_image</var>] [-f <var>fmt</var>] <var>filename</var> [<var>size</var>]</samp>&rsquo;</dt>
<dt> &lsquo;<samp>commit [-f <var>fmt</var>] <var>filename</var></samp>&rsquo;</dt>
<dt> &lsquo;<samp>convert [-c] [-e] [-6] [-f <var>fmt</var>] [-O <var>output_fmt</var>] [-B <var>output_base_image</var>] <var>filename</var> [<var>filename2</var> [...]] <var>output_filename</var></samp>&rsquo;</dt>
<dt> &lsquo;<samp>info [-f <var>fmt</var>] <var>filename</var></samp>&rsquo;</dt>
<dt> &lsquo;<samp>snapshot [-l | -a <var>snapshot</var> | -c <var>snapshot</var> | -d <var>snapshot</var>] <var>filename</var></samp>&rsquo;</dt>
</dl>

<p>Command parameters:
</p><dl compact="compact">
<dt> <var>filename</var></dt>
<dd><p> is a disk image filename
</p></dd>
<dt> <var>base_image</var></dt>
<dd><p>is the read-only disk image which is used as base for a copy on
    write image; the copy on write image only stores the modified data
</p></dd>
<dt> <var>output_base_image</var></dt>
<dd><p>forces the output image to be created as a copy on write
image of the specified base image; <code>output_base_image</code> should have the same
content as the input's base image, however the path, image format, etc may
differ
</p></dd>
<dt> <var>base_fmt</var></dt>
<dd><p>is the disk image format of <var>base_image</var>. for more information look at <var>fmt</var>
</p></dd>
<dt> <var>fmt</var></dt>
<dd><p>is the disk image format. It is guessed automatically in most cases. The following formats are supported:
</p>
<dl compact="compact">
<dt> <code>raw</code></dt>
<dd>
<p>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.
</p>
</dd>
<dt> <code>qcow2</code></dt>
<dd><p>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></dd>
<dt> <code>qcow</code></dt>
<dd><p>Old QEMU image format. Left for compatibility.
</p></dd>
<dt> <code>cow</code></dt>
<dd><p>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.
</p></dd>
<dt> <code>vmdk</code></dt>
<dd><p>VMware 3 and 4 compatible image format.
</p></dd>
<dt> <code>cloop</code></dt>
<dd><p>Linux Compressed Loop image, useful only to reuse directly compressed
CD-ROM images present for example in the Knoppix CD-ROMs.
</p></dd>
</dl>

</dd>
<dt> <var>size</var></dt>
<dd><p>is the disk image size in kilobytes. Optional suffixes <code>M</code>
(megabyte, 1024 * 1024) and <code>G</code> (gigabyte, 1024 * 1024 * 1024)
are supported and any <code>k</code> or <code>K</code> is ignored.
</p>
</dd>
<dt> <var>output_filename</var></dt>
<dd><p>is the destination disk image filename
</p>
</dd>
<dt> <var>output_fmt</var></dt>
<dd><p> is the destination format
</p>
</dd>
<dt> <var>-c</var></dt>
<dd><p>indicates that target image must be compressed (qcow format only)
</p></dd>
<dt> <var>-e</var></dt>
<dd><p>indicates that the target image must be encrypted (qcow format only)
</p></dd>
<dt> <var>-6</var></dt>
<dd><p>indicates that the target image must use compatibility level 6 (vmdk format only)
</p></dd>
<dt> <var>-h</var></dt>
<dd><p>with or without a command shows help and lists the supported formats
</p></dd>
</dl>

<p>Parameters to snapshot subcommand:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>snapshot</samp>&rsquo;</dt>
<dd><p>is the name of the snapshot to create, apply or delete
</p></dd>
<dt> &lsquo;<samp>-a</samp>&rsquo;</dt>
<dd><p>applies a snapshot (revert disk to saved state)
</p></dd>
<dt> &lsquo;<samp>-c</samp>&rsquo;</dt>
<dd><p>creates a snapshot
</p></dd>
<dt> &lsquo;<samp>-d</samp>&rsquo;</dt>
<dd><p>deletes a snapshot
</p></dd>
<dt> &lsquo;<samp>-l</samp>&rsquo;</dt>
<dd><p>lists all snapshots in the given image
</p></dd>
</dl>

<p>Command description:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>create [-6] [-e] [-b <var>base_image</var>] [-f <var>fmt</var>] <var>filename</var> [<var>size</var>]</samp>&rsquo;</dt>
<dd>
<p>Create the new disk image <var>filename</var> of size <var>size</var> and format
<var>fmt</var>.
</p>
<p>If <var>base_image</var> is specified, then the image will record only the
differences from <var>base_image</var>. No size needs to be specified in
this case. <var>base_image</var> will never be modified unless you use the
<code>commit</code> monitor command.
</p>
</dd>
<dt> &lsquo;<samp>commit [-f <var>fmt</var>] <var>filename</var></samp>&rsquo;</dt>
<dd>
<p>Commit the changes recorded in <var>filename</var> in its base image.
</p>
</dd>
<dt> &lsquo;<samp>convert [-c] [-e] [-f <var>fmt</var>] <var>filename</var> [-O <var>output_fmt</var>] <var>output_filename</var></samp>&rsquo;</dt>
<dd>
<p>Convert the disk image <var>filename</var> to disk image <var>output_filename</var>
using format <var>output_fmt</var>. It can be optionally encrypted
(<code>-e</code> option) or compressed (<code>-c</code> option).
</p>
<p>Only the format <code>qcow</code> supports encryption or compression. The
compression is read-only. It means that if a compressed sector is
rewritten, then it is rewritten as uncompressed data.
</p>
<p>Encryption uses the AES format which is very secure (128 bit keys). Use
a long password (16 characters) to get maximum protection.
</p>
<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>
</dd>
<dt> &lsquo;<samp>info [-f <var>fmt</var>] <var>filename</var></samp>&rsquo;</dt>
<dd>
<p>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.
</p>
</dd>
<dt> &lsquo;<samp>snapshot [-l | -a <var>snapshot</var> | -c <var>snapshot</var> | -d <var>snapshot</var> ] <var>filename</var></samp>&rsquo;</dt>
<dd>
<p>List, apply, create or delete snapshots in image <var>filename</var>.
</p></dd>
</dl>



<hr size="6">
<a name="qemu_005fnbd_005finvocation"></a>
<a name="SEC20"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC19" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC21" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.5 <code>qemu-nbd</code> Invocation </h3>

<table><tr><td>&nbsp;</td><td><pre class="example">usage: qemu-nbd [OPTION]...  <var>filename</var>
</pre></td></tr></table>


<p>Export Qemu disk image using NBD protocol.
</p>

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



<hr size="6">
<a name="host_005fdrives"></a>
<a name="SEC21"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC20" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC22" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.6 Using host drives </h3>

<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.
</p>
<hr size="6">
<a name="SEC22"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC21" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC23" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.6.6.1 Linux </h4>

<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 &lsquo;<tt>/dev/cdrom</tt>&rsquo; to access to the CDROM or
&lsquo;<tt>/dev/fd0</tt>&rsquo; for the floppy.
</p>
<dl compact="compact">
<dt> <code>CD</code></dt>
<dd><p>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.
</p></dd>
<dt> <code>Floppy</code></dt>
<dd><p>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).
</p></dd>
<dt> <code>Hard disks</code></dt>
<dd><p>Hard disks can be used. Normally you must specify the whole disk
(&lsquo;<tt>/dev/hdb</tt>&rsquo; instead of &lsquo;<tt>/dev/hdb1</tt>&rsquo;) 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 &lsquo;<samp>-snapshot</samp>&rsquo; command
line option or modify the device permissions accordingly).
</p></dd>
</dl>

<hr size="6">
<a name="SEC23"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC22" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC24" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.6.6.2 Windows </h4>

<dl compact="compact">
<dt> <code>CD</code></dt>
<dd><p>The preferred syntax is the drive letter (e.g. &lsquo;<tt>d:</tt>&rsquo;). The
alternate syntax &lsquo;<tt>\\.\d:</tt>&rsquo; is supported. &lsquo;<tt>/dev/cdrom</tt>&rsquo; is
supported as an alias to the first CDROM drive.
</p>
<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></dd>
<dt> <code>Hard disks</code></dt>
<dd><p>Hard disks can be used with the syntax: &lsquo;<tt>\\.\PhysicalDrive<var>N</var></tt>&rsquo;
where <var>N</var> is the drive number (0 is the first hard disk).
</p>
<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 &lsquo;<samp>-snapshot</samp>&rsquo; command line so that the
modifications are written in a temporary file).
</p></dd>
</dl>


<hr size="6">
<a name="SEC24"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC23" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC25" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.6.6.3 Mac OS X </h4>

<p>&lsquo;<tt>/dev/cdrom</tt>&rsquo; is an alias to the first CDROM.
</p>
<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>
<hr size="6">
<a name="disk_005fimages_005ffat_005fimages"></a>
<a name="SEC25"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC24" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC26" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.7 Virtual FAT disk images </h3>

<p>QEMU can automatically create a virtual FAT disk image from a
directory tree. In order to use it, just type:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu linux.img -hdb fat:/my_directory
</pre></td></tr></table>

<p>Then you access access to all the files in the &lsquo;<tt>/my_directory</tt>&rsquo;
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>
<p>Floppies can be emulated with the <code>:floppy:</code> option:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu linux.img -fda fat:floppy:/my_directory
</pre></td></tr></table>

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

<p>What you should <em>never</em> do:
</p><ul class="toc">
<li> use non-ASCII filenames ;
</li><li> use &quot;-snapshot&quot; together with &quot;:rw:&quot; ;
</li><li> expect it to work when loadvm'ing ;
</li><li> write to the FAT directory on the host system while accessing it with the guest system.
</li></ul>

<hr size="6">
<a name="disk_005fimages_005fnbd"></a>
<a name="SEC26"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC25" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC27" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC15" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.6.8 NBD access </h3>

<p>QEMU can access directly to block device exported using the Network Block Device
protocol.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
</pre></td></tr></table>

<p>If the NBD server is located on the same host, you can use an unix socket instead
of an inet socket:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu linux.img -hdb nbd:unix:/tmp/my_socket
</pre></td></tr></table>

<p>In this case, the block device must be exported using qemu-nbd:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu-nbd --socket=/tmp/my_socket my_disk.qcow2
</pre></td></tr></table>

<p>The use of qemu-nbd allows to share a disk between several guests:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
</pre></td></tr></table>

<p>and then you can use it with two guests:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu linux1.img -hdb nbd:unix:/tmp/my_socket
qemu linux2.img -hdb nbd:unix:/tmp/my_socket
</pre></td></tr></table>

<hr size="6">
<a name="pcsys_005fnetwork"></a>
<a name="SEC27"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC26" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC28" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.7 Network emulation </h2>

<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.
</p>
<hr size="6">
<a name="SEC28"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC27" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC29" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC27" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.7.1 VLANs </h3>

<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).
</p>
<hr size="6">
<a name="SEC29"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC28" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC30" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC27" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.7.2 Using TAP network interfaces </h3>

<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.
</p>
<hr size="6">
<a name="SEC30"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC29" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC29" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.7.2.1 Linux host </h4>

<p>As an example, you can download the &lsquo;<tt>linux-test-xxx.tar.gz</tt>&rsquo;
archive and copy the script &lsquo;<tt>qemu-ifup</tt>&rsquo; in &lsquo;<tt>/etc</tt>&rsquo; and
configure properly <code>sudo</code> so that the command <code>ifconfig</code>
contained in &lsquo;<tt>qemu-ifup</tt>&rsquo; can be executed as root. You must verify
that your host kernel supports the TAP network interfaces: the
device &lsquo;<tt>/dev/net/tun</tt>&rsquo; must be present.
</p>
<p>See <a href="#SEC10">Invocation</a> to have examples of command lines using the
TAP network interfaces.
</p>
<hr size="6">
<a name="SEC31"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC30" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC32" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC29" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.7.2.2 Windows host </h4>

<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>.
</p>
<hr size="6">
<a name="SEC32"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC31" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC33" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC27" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.7.3 Using the user mode network stack </h3>

<p>By using the option &lsquo;<samp>-net user</samp>&rsquo; (default configuration if no
&lsquo;<samp>-net</samp>&rsquo; 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:
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

<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>
<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>
<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>
<p>When using the built-in TFTP server, the router is also the TFTP
server.
</p>
<p>When using the &lsquo;<samp>-redir</samp>&rsquo; 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.
</p>
<hr size="6">
<a name="SEC33"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC32" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC34" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC27" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.7.4 Connecting VLANs between QEMU instances </h3>

<p>Using the &lsquo;<samp>-net socket</samp>&rsquo; option, it is possible to make VLANs
that span several QEMU instances. See <a href="#SEC10">Invocation</a> to have a
basic example.
</p>
<hr size="6">
<a name="direct_005flinux_005fboot"></a>
<a name="SEC34"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC33" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC35" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.8 Direct Linux Boot </h2>

<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>
<p>The syntax is:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append &quot;root=/dev/hda&quot;
</pre></td></tr></table>

<p>Use &lsquo;<samp>-kernel</samp>&rsquo; to provide the Linux kernel image and
&lsquo;<samp>-append</samp>&rsquo; to give the kernel command line arguments. The
&lsquo;<samp>-initrd</samp>&rsquo; option can be used to provide an INITRD image.
</p>
<p>When using the direct Linux boot, a disk image for the first hard disk
&lsquo;<tt>hda</tt>&rsquo; is required because its boot sector is used to launch the
Linux kernel.
</p>
<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
&lsquo;<samp>-nographic</samp>&rsquo; option. The typical command line is:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
     -append &quot;root=/dev/hda console=ttyS0&quot; -nographic
</pre></td></tr></table>

<p>Use &lt;Ctrl-a c&gt; to switch between the serial console and the
monitor (see section <a href="#SEC11">Keys</a>).
</p>
<hr size="6">
<a name="pcsys_005fusb"></a>
<a name="SEC35"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC34" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC36" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.9 USB emulation </h2>

<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>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC36">3.9.1 Connecting USB devices</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC37">3.9.2 Using host USB devices on a Linux host</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr size="6">
<a name="usb_005fdevices"></a>
<a name="SEC36"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC35" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC37" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC35" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.9.1 Connecting USB devices </h3>

<p>USB devices can be connected with the &lsquo;<samp>-usbdevice</samp>&rsquo; commandline option
or the <code>usb_add</code> monitor command.  Available devices are:
</p>
<dl compact="compact">
<dt> <code>mouse</code></dt>
<dd><p>Virtual Mouse.  This will override the PS/2 mouse emulation when activated.
</p></dd>
<dt> <code>tablet</code></dt>
<dd><p>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.
</p></dd>
<dt> <code>disk:<var>file</var></code></dt>
<dd><p>Mass storage device based on <var>file</var> (see section <a href="#SEC15">Disk Images</a>)
</p></dd>
<dt> <code>host:<var>bus.addr</var></code></dt>
<dd><p>Pass through the host device identified by <var>bus.addr</var>
(Linux only)
</p></dd>
<dt> <code>host:<var>vendor_id:product_id</var></code></dt>
<dd><p>Pass through the host device identified by <var>vendor_id:product_id</var>
(Linux only)
</p></dd>
<dt> <code>wacom-tablet</code></dt>
<dd><p>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.
</p></dd>
<dt> <code>keyboard</code></dt>
<dd><p>Standard USB keyboard.  Will override the PS/2 keyboard (if present).
</p></dd>
<dt> <code>serial:[vendorid=<var>vendor_id</var>][,product_id=<var>product_id</var>]:<var>dev</var></code></dt>
<dd><p>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, 
</p><table><tr><td>&nbsp;</td><td><pre class="example">usb_add serial:productid=FA00:tcp:192.168.0.2:4444
</pre></td></tr></table>
<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).
</p></dd>
<dt> <code>braille</code></dt>
<dd><p>Braille device.  This will use BrlAPI to display the braille output on a real
or fake device.
</p></dd>
<dt> <code>net:<var>options</var></code></dt>
<dd><p>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
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
</pre></td></tr></table>
<p>Currently this cannot be used in machines that support PCI NICs.
</p></dd>
<dt> <code>bt[:<var>hci-type</var>]</code></dt>
<dd><p>Bluetooth dongle whose type is specified in the same format as with
the &lsquo;<samp>-bt hci</samp>&rsquo; 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:
</p><table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -usbdevice bt:hci,vlan=3 -bt device:keyboard,vlan=3
</pre></td></tr></table>
</dd>
</dl>

<hr size="6">
<a name="host_005fusb_005fdevices"></a>
<a name="SEC37"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC36" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC35" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.9.2 Using host USB devices on a Linux host </h3>

<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.
</p>
<ol>
<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 &lsquo;<tt>mydriver.o</tt>&rsquo;
to &lsquo;<tt>mydriver.o.disabled</tt>&rsquo;.

</li><li> Verify that &lsquo;<tt>/proc/bus/usb</tt>&rsquo; is working (most Linux distributions should enable it by default). You should see something like that:
<table><tr><td>&nbsp;</td><td><pre class="example">ls /proc/bus/usb
001  devices  drivers
</pre></td></tr></table>

</li><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:
<table><tr><td>&nbsp;</td><td><pre class="example">chown -R myuid /proc/bus/usb
</pre></td></tr></table>

</li><li> Launch QEMU and do in the monitor:
<table><tr><td>&nbsp;</td><td><pre class="example">info usbhost
  Device 1.2, speed 480 Mb/s
    Class 00: USB device 1234:5678, USB DISK
</pre></td></tr></table>
<p>You should see the list of the devices you can use (Never try to use
hubs, it won't work).
</p>
</li><li> Add the device in QEMU by using:
<table><tr><td>&nbsp;</td><td><pre class="example">usb_add host:1234:5678
</pre></td></tr></table>

<p>Normally the guest OS should report that a new USB device is
plugged. You can use the option &lsquo;<samp>-usbdevice</samp>&rsquo; to do the same.
</p>
</li><li> Now you can try to use the host USB device in QEMU.

</li></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>
<hr size="6">
<a name="vnc_005fsecurity"></a>
<a name="SEC38"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC37" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC39" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.10 VNC security </h2>

<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>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC39">3.10.1 Without passwords</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC40">3.10.2 With passwords</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC41">3.10.3 With x509 certificates</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC42">3.10.4 With x509 certificates and client verification</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC43">3.10.5 With x509 certificates, client verification and passwords</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC44">3.10.6 With SASL authentication</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC45">3.10.7 With x509 certificates and SASL authentication</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC46">3.10.8 Generating certificates for VNC</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC50">3.10.9 Configuring SASL mechanisms</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr size="6">
<a name="vnc_005fsec_005fnone"></a>
<a name="SEC39"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC38" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC40" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.1 Without passwords </h3>

<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
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
</pre></td></tr></table>

<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>
<hr size="6">
<a name="vnc_005fsec_005fpassword"></a>
<a name="SEC40"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC39" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC41" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.2 With passwords </h3>

<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.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -vnc :1,password -monitor stdio
(qemu) change vnc password
Password: ********
(qemu)
</pre></td></tr></table>

<hr size="6">
<a name="vnc_005fsec_005fcertificate"></a>
<a name="SEC41"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC40" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC42" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.3 With x509 certificates </h3>

<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.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
</pre></td></tr></table>

<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>
<hr size="6">
<a name="vnc_005fsec_005fcertificate_005fverify"></a>
<a name="SEC42"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC41" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC43" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.4 With x509 certificates and client verification </h3>

<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.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
</pre></td></tr></table>


<hr size="6">
<a name="vnc_005fsec_005fcertificate_005fpw"></a>
<a name="SEC43"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC42" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC44" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.5 With x509 certificates, client verification and passwords </h3>

<p>Finally, the previous method can be combined with VNC password authentication
to provide two layers of authentication for clients.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
(qemu) change vnc password
Password: ********
(qemu)
</pre></td></tr></table>


<hr size="6">
<a name="vnc_005fsec_005fsasl"></a>
<a name="SEC44"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC43" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC45" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.6 With SASL authentication </h3>

<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>
<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:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -vnc :1,sasl -monitor stdio
</pre></td></tr></table>

<hr size="6">
<a name="vnc_005fsec_005fcertificate_005fsasl"></a>
<a name="SEC45"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC44" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC46" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.7 With x509 certificates and SASL authentication </h3>

<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:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
</pre></td></tr></table>


<hr size="6">
<a name="vnc_005fgenerate_005fcert"></a>
<a name="SEC46"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC45" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC47" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.10.8 Generating certificates for VNC </h3>

<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>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC47">3.10.8.1 Setup the Certificate Authority</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC48">3.10.8.2 Issuing server certificates</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC49">3.10.8.3 Issuing client certificates</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr size="6">
<a name="vnc_005fgenerate_005fca"></a>
<a name="SEC47"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC46" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC48" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC46" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.10.8.1 Setup the Certificate Authority </h4>

<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.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"># certtool --generate-privkey &gt; ca-key.pem
</pre></td></tr></table>

<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.
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

<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>
<hr size="6">
<a name="vnc_005fgenerate_005fserver"></a>
<a name="SEC48"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC47" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC49" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC46" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.10.8.2 Issuing server certificates </h4>

<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:
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

<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>
<hr size="6">
<a name="vnc_005fgenerate_005fclient"></a>
<a name="SEC49"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC48" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC50" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC46" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.10.8.3 Issuing client certificates </h4>

<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:
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

<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>

<hr size="6">
<a name="vnc_005fsetup_005fsasl"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC49" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC51" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>

<a name="SEC50"></a>
<h3 class="subsection"> 3.10.9 Configuring SASL mechanisms </h3>

<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>
<p>The default configuration might contain
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">mech_list: digest-md5
sasldb_path: /etc/qemu/passwd.db
</pre></td></tr></table>

<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>
<p>A more serious deployment might use Kerberos, which is done with the 'gssapi'
mechanism
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">mech_list: gssapi
keytab: /etc/qemu/krb5.tab
</pre></td></tr></table>

<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>
<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>
<hr size="6">
<a name="gdb_005fusage"></a>
<a name="SEC51"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC50" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC52" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.11 GDB usage </h2>

<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>
<p>In order to use gdb, launch qemu with the '-s' option. It will wait for a
gdb connection:
</p><table><tr><td>&nbsp;</td><td><pre class="example">&gt; qemu -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
       -append &quot;root=/dev/hda&quot;
Connected to host network interface: tun0
Waiting gdb connection on port 1234
</pre></td></tr></table>

<p>Then launch gdb on the 'vmlinux' executable:
</p><table><tr><td>&nbsp;</td><td><pre class="example">&gt; gdb vmlinux
</pre></td></tr></table>

<p>In gdb, connect to QEMU:
</p><table><tr><td>&nbsp;</td><td><pre class="example">(gdb) target remote localhost:1234
</pre></td></tr></table>

<p>Then you can use gdb normally. For example, type 'c' to launch the kernel:
</p><table><tr><td>&nbsp;</td><td><pre class="example">(gdb) c
</pre></td></tr></table>

<p>Here are some useful tips in order to use gdb on system code:
</p>
<ol>
<li>
Use <code>info reg</code> to display all the CPU registers.
</li><li>
Use <code>x/10i $eip</code> to display the code at the PC position.
</li><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.
</li></ol>

<p>Advanced debugging options:
</p>
<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:
</p><dl compact="compact">
<dt> <code>maintenance packet qqemu.sstepbits</code></dt>
<dd>
<p>This will display the MASK bits used to control the single stepping IE:
</p><table><tr><td>&nbsp;</td><td><pre class="example">(gdb) maintenance packet qqemu.sstepbits
sending: &quot;qqemu.sstepbits&quot;
received: &quot;ENABLE=1,NOIRQ=2,NOTIMER=4&quot;
</pre></td></tr></table>
</dd>
<dt> <code>maintenance packet qqemu.sstep</code></dt>
<dd>
<p>This will display the current value of the mask used when single stepping IE:
</p><table><tr><td>&nbsp;</td><td><pre class="example">(gdb) maintenance packet qqemu.sstep
sending: &quot;qqemu.sstep&quot;
received: &quot;0x7&quot;
</pre></td></tr></table>
</dd>
<dt> <code>maintenance packet Qqemu.sstep=HEX_VALUE</code></dt>
<dd>
<p>This will change the single step mask, so if wanted to enable IRQs on the single step, but not timers, you would use:
</p><table><tr><td>&nbsp;</td><td><pre class="example">(gdb) maintenance packet Qqemu.sstep=0x5
sending: &quot;qemu.sstep=0x5&quot;
received: &quot;OK&quot;
</pre></td></tr></table>
</dd>
</dl>

<hr size="6">
<a name="pcsys_005fos_005fspecific"></a>
<a name="SEC52"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC51" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC53" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 3.12 Target OS specific information </h2>

<hr size="6">
<a name="SEC53"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC52" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC54" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC52" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.12.1 Linux </h3>

<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>
<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>
<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.
</p>
<hr size="6">
<a name="SEC54"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC53" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC55" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC52" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.12.2 Windows </h3>

<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.
</p>
<hr size="6">
<a name="SEC55"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC54" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC56" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC54" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.12.2.1 SVGA graphic modes support </h4>

<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>
<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 &lsquo;<samp>-std-vga</samp>&rsquo;).
</p>
<hr size="6">
<a name="SEC56"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC55" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC57" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC54" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.12.2.2 CPU usage reduction </h4>

<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.
</p>
<hr size="6">
<a name="SEC57"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC56" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC58" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC54" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.12.2.3 Windows 2000 disk full problem </h4>

<p>Windows 2000 has a bug which gives a disk full problem during its
installation. When installing it, use the &lsquo;<samp>-win2k-hack</samp>&rsquo; 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).
</p>
<hr size="6">
<a name="SEC58"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC57" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC59" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC54" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.12.2.4 Windows 2000 shutdown </h4>

<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>
<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.
</p>
<hr size="6">
<a name="SEC59"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC58" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC60" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC54" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.12.2.5 Share a directory between Unix and Windows </h4>

<p>See <a href="#SEC10">Invocation</a> about the help of the option &lsquo;<samp>-smb</samp>&rsquo;.
</p>
<hr size="6">
<a name="SEC60"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC59" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC61" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC54" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.12.2.6 Windows XP security problem </h4>

<p>Some releases of Windows XP install correctly but give a security
error when booting:
</p><table><tr><td>&nbsp;</td><td><pre class="example">A problem is preventing Windows from accurately checking the
license for this computer. Error code: 0x800703e6.
</pre></td></tr></table>

<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 (&quot;-hdb fat:directory_which_holds_the_SP&quot;).
</p>
<hr size="6">
<a name="SEC61"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC60" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC62" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC52" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 3.12.3 MS-DOS and FreeDOS </h3>

<hr size="6">
<a name="SEC62"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC61" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC61" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h4 class="subsubsection"> 3.12.3.1 CPU usage reduction </h4>

<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>
<hr size="6">
<a name="QEMU-System-emulator-for-non-PC-targets"></a>
<a name="SEC63"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC62" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC64" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 4. QEMU System emulator for non PC targets </h1>

<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>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC64">4.1 QEMU PowerPC System emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC65">4.2 Sparc32 System emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC66">4.3 Sparc64 System emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC67">4.4 MIPS System emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC68">4.5 ARM System emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC69">4.6 ColdFire System emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="QEMU-PowerPC-System-emulator"></a>
<a name="SEC64"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC63" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC65" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC63" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.1 QEMU PowerPC System emulator </h2>

<p>Use the executable &lsquo;<tt>qemu-system-ppc</tt>&rsquo; to simulate a complete PREP
or PowerMac PowerPC system.
</p>
<p>QEMU emulates the following PowerMac peripherals:
</p>
<ul class="toc">
<li>-
UniNorth or Grackle PCI Bridge
</li><li>-
PCI VGA compatible card with VESA Bochs Extensions
</li><li>-
2 PMAC IDE interfaces with hard disk and CD-ROM support
</li><li>-
NE2000 PCI adapters
</li><li>-
Non Volatile RAM
</li><li>-
VIA-CUDA with ADB keyboard and mouse.
</li></ul>

<p>QEMU emulates the following PREP peripherals:
</p>
<ul class="toc">
<li>-
PCI Bridge
</li><li>-
PCI VGA compatible card with VESA Bochs Extensions
</li><li>-
2 IDE interfaces with hard disk and CD-ROM support
</li><li>-
Floppy disk
</li><li>-
NE2000 network adapters
</li><li>-
Serial port
</li><li>-
PREP Non Volatile RAM
</li><li>-
PC compatible keyboard and mouse.
</li></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>
<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.
</p>

<p>The following options are specific to the PowerPC emulation:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-g WxH[xDEPTH]</samp>&rsquo;</dt>
<dd>
<p>Set the initial VGA graphic mode. The default is 800x600x15.
</p>
</dd>
<dt> &lsquo;<samp>-prom-env string</samp>&rsquo;</dt>
<dd>
<p>Set OpenBIOS variables in NVRAM, for example:
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

<p>These variables are not used by Open Hack'Ware.
</p>
</dd>
</dl>



<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>
<hr size="6">
<a name="Sparc32-System-emulator"></a>
<a name="SEC65"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC64" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC66" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC63" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.2 Sparc32 System emulator </h2>

<p>Use the executable &lsquo;<tt>qemu-system-sparc</tt>&rsquo; to simulate the following
Sun4m architecture machines:
</p><ul class="toc">
<li>-
SPARCstation 4
</li><li>-
SPARCstation 5
</li><li>-
SPARCstation 10
</li><li>-
SPARCstation 20
</li><li>-
SPARCserver 600MP
</li><li>-
SPARCstation LX
</li><li>-
SPARCstation Voyager
</li><li>-
SPARCclassic
</li><li>-
SPARCbook
</li></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>
<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>
<p>QEMU emulates the following sun4m/sun4c/sun4d peripherals:
</p>
<ul class="toc">
<li>-
IOMMU or IO-UNITs
</li><li>-
TCX Frame buffer
</li><li>-
Lance (Am7990) Ethernet
</li><li>-
Non Volatile RAM M48T02/M48T08
</li><li>-
Slave I/O: timers, interrupt controllers, Zilog serial ports, keyboard
and power/reset logic
</li><li>-
ESP SCSI controller with hard disk and CD-ROM support
</li><li>-
Floppy drive (not on SS-600MP)
</li><li>-
CS4231 sound device (only on SS-5, not working yet)
</li></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>
<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>
<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.
</p>

<p>The following options are specific to the Sparc32 emulation:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-g WxHx[xDEPTH]</samp>&rsquo;</dt>
<dd>
<p>Set the initial TCX graphic mode. The default is 1024x768x8, currently
the only other possible mode is 1024x768x24.
</p>
</dd>
<dt> &lsquo;<samp>-prom-env string</samp>&rsquo;</dt>
<dd>
<p>Set OpenBIOS variables in NVRAM, for example:
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>

</dd>
<dt> &lsquo;<samp>-M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic|SPARCbook|SS-2|SS-1000|SS-2000]</samp>&rsquo;</dt>
<dd>
<p>Set the emulated machine type. Default is SS-5.
</p>
</dd>
</dl>


<hr size="6">
<a name="Sparc64-System-emulator"></a>
<a name="SEC66"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC65" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC67" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC63" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.3 Sparc64 System emulator </h2>

<p>Use the executable &lsquo;<tt>qemu-system-sparc64</tt>&rsquo; 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>
<p>QEMU emulates the following peripherals:
</p>
<ul class="toc">
<li>-
UltraSparc IIi APB PCI Bridge
</li><li>-
PCI VGA compatible card with VESA Bochs Extensions
</li><li>-
PS/2 mouse and keyboard
</li><li>-
Non Volatile RAM M48T59
</li><li>-
PC-compatible serial ports
</li><li>-
2 PCI IDE interfaces with hard disk and CD-ROM support
</li><li>-
Floppy disk
</li></ul>


<p>The following options are specific to the Sparc64 emulation:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-prom-env string</samp>&rsquo;</dt>
<dd>
<p>Set OpenBIOS variables in NVRAM, for example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu-system-sparc64 -prom-env 'auto-boot?=false'
</pre></td></tr></table>

</dd>
<dt> &lsquo;<samp>-M [sun4u|sun4v|Niagara]</samp>&rsquo;</dt>
<dd>
<p>Set the emulated machine type. The default is sun4u.
</p>
</dd>
</dl>


<hr size="6">
<a name="MIPS-System-emulator"></a>
<a name="SEC67"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC66" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC68" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC63" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.4 MIPS System emulator </h2>

<p>Four executables cover simulation of 32 and 64-bit MIPS systems in
both endian options, &lsquo;<tt>qemu-system-mips</tt>&rsquo;, &lsquo;<tt>qemu-system-mipsel</tt>&rsquo;
&lsquo;<tt>qemu-system-mips64</tt>&rsquo; and &lsquo;<tt>qemu-system-mips64el</tt>&rsquo;.
Five different machine types are emulated:
</p>
<ul class="toc">
<li>-
A generic ISA PC-like machine &quot;mips&quot;
</li><li>-
The MIPS Malta prototype board &quot;malta&quot;
</li><li>-
An ACER Pica &quot;pica61&quot;. This machine needs the 64-bit emulator.
</li><li>-
MIPS emulator pseudo board &quot;mipssim&quot;
</li><li>-
A MIPS Magnum R4000 machine &quot;magnum&quot;. This machine needs the 64-bit emulator.
</li></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:
</p>
<ul class="toc">
<li>-
A range of MIPS CPUs, default is the 24Kf
</li><li>-
PC style serial port
</li><li>-
PC style IDE disk
</li><li>-
NE2000 network card
</li></ul>

<p>The Malta emulation supports the following devices:
</p>
<ul class="toc">
<li>-
Core board with MIPS 24Kf CPU and Galileo system controller
</li><li>-
PIIX4 PCI/USB/SMbus controller
</li><li>-
The Multi-I/O chip's serial device
</li><li>-
PCnet32 PCI network card
</li><li>-
Malta FPGA serial device
</li><li>-
Cirrus (default) or any other PCI VGA graphics card
</li></ul>

<p>The ACER Pica emulation supports:
</p>
<ul class="toc">
<li>-
MIPS R4000 CPU
</li><li>-
PC-style IRQ and DMA controllers
</li><li>-
PC Keyboard
</li><li>-
IDE controller
</li></ul>

<p>The mipssim pseudo board emulation provides an environment similiar
to what the proprietary MIPS emulator uses for running Linux.
It supports:
</p>
<ul class="toc">
<li>-
A range of MIPS CPUs, default is the 24Kf
</li><li>-
PC style serial port
</li><li>-
MIPSnet network emulation
</li></ul>

<p>The MIPS Magnum R4000 emulation supports:
</p>
<ul class="toc">
<li>-
MIPS R4000 CPU
</li><li>-
PC-style IRQ controller
</li><li>-
PC Keyboard
</li><li>-
SCSI controller
</li><li>-
G364 framebuffer
</li></ul>


<hr size="6">
<a name="ARM-System-emulator"></a>
<a name="SEC68"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC67" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC69" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC63" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.5 ARM System emulator </h2>

<p>Use the executable &lsquo;<tt>qemu-system-arm</tt>&rsquo; to simulate a ARM
machine. The ARM Integrator/CP board is emulated with the following
devices:
</p>
<ul class="toc">
<li>-
ARM926E, ARM1026E, ARM946E, ARM1136 or Cortex-A8 CPU
</li><li>-
Two PL011 UARTs
</li><li>-
SMC 91c111 Ethernet adapter
</li><li>-
PL110 LCD controller
</li><li>-
PL050 KMI with PS/2 keyboard and mouse.
</li><li>-
PL181 MultiMedia Card Interface with SD card.
</li></ul>

<p>The ARM Versatile baseboard is emulated with the following devices:
</p>
<ul class="toc">
<li>-
ARM926E, ARM1136 or Cortex-A8 CPU
</li><li>-
PL190 Vectored Interrupt Controller
</li><li>-
Four PL011 UARTs
</li><li>-
SMC 91c111 Ethernet adapter
</li><li>-
PL110 LCD controller
</li><li>-
PL050 KMI with PS/2 keyboard and mouse.
</li><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><li>-
PCI OHCI USB controller.
</li><li>-
LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices.
</li><li>-
PL181 MultiMedia Card Interface with SD card.
</li></ul>

<p>The ARM RealView Emulation baseboard is emulated with the following devices:
</p>
<ul class="toc">
<li>-
ARM926E, ARM1136, ARM11MPCORE(x4) or Cortex-A8 CPU
</li><li>-
ARM AMBA Generic/Distributed Interrupt Controller
</li><li>-
Four PL011 UARTs
</li><li>-
SMC 91c111 Ethernet adapter
</li><li>-
PL110 LCD controller
</li><li>-
PL050 KMI with PS/2 keyboard and mouse
</li><li>-
PCI host bridge
</li><li>-
PCI OHCI USB controller
</li><li>-
LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices
</li><li>-
PL181 MultiMedia Card Interface with SD card.
</li></ul>

<p>The XScale-based clamshell PDA models (&quot;Spitz&quot;, &quot;Akita&quot;, &quot;Borzoi&quot;
and &quot;Terrier&quot;) emulation includes the following peripherals:
</p>
<ul class="toc">
<li>-
Intel PXA270 System-on-chip (ARM V5TE core)
</li><li>-
NAND Flash memory
</li><li>-
IBM/Hitachi DSCM microdrive in a PXA PCMCIA slot - not in &quot;Akita&quot;
</li><li>-
On-chip OHCI USB controller
</li><li>-
On-chip LCD controller
</li><li>-
On-chip Real Time Clock
</li><li>-
TI ADS7846 touchscreen controller on SSP bus
</li><li>-
Maxim MAX1111 analog-digital converter on I<em>^2</em>C bus
</li><li>-
GPIO-connected keyboard controller and LEDs
</li><li>-
Secure Digital card connected to PXA MMC/SD host
</li><li>-
Three on-chip UARTs
</li><li>-
WM8750 audio CODEC on I<em>^2</em>C and I<em>^2</em>S busses
</li></ul>

<p>The Palm Tungsten|E PDA (codename &quot;Cheetah&quot;) emulation includes the
following elements:
</p>
<ul class="toc">
<li>-
Texas Instruments OMAP310 System-on-chip (ARM 925T core)
</li><li>-
ROM and RAM memories (ROM firmware image can be loaded with -option-rom)
</li><li>-
On-chip LCD controller
</li><li>-
On-chip Real Time Clock
</li><li>-
TI TSC2102i touchscreen controller / analog-digital converter / Audio
CODEC, connected through MicroWire and I<em>^2</em>S busses
</li><li>-
GPIO-connected matrix keypad
</li><li>-
Secure Digital card connected to OMAP MMC/SD host
</li><li>-
Three on-chip UARTs
</li></ul>

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

<p>The Luminary Micro Stellaris LM3S811EVB emulation includes the following
devices:
</p>
<ul class="toc">
<li>-
Cortex-M3 CPU core.
</li><li>-
64k Flash and 8k SRAM.
</li><li>-
Timers, UARTs, ADC and I<em>^2</em>C interface.
</li><li>-
OSRAM Pictiva 96x16 OLED with SSD0303 controller on I<em>^2</em>C bus.
</li></ul>

<p>The Luminary Micro Stellaris LM3S6965EVB emulation includes the following
devices:
</p>
<ul class="toc">
<li>-
Cortex-M3 CPU core.
</li><li>-
256k Flash and 64k SRAM.
</li><li>-
Timers, UARTs, ADC, I<em>^2</em>C and SSI interfaces.
</li><li>-
OSRAM Pictiva 128x64 OLED with SSD0323 controller connected via SSI.
</li></ul>

<p>The Freecom MusicPal internet radio emulation includes the following
elements:
</p>
<ul class="toc">
<li>-
Marvell MV88W8618 ARM core.
</li><li>-
32 MB RAM, 256 KB SRAM, 8 MB flash.
</li><li>-
Up to 2 16550 UARTs
</li><li>-
MV88W8xx8 Ethernet controller
</li><li>-
MV88W8618 audio controller, WM8750 CODEC and mixer
</li><li>-
12864 display with brightness control
</li><li>-
2 buttons, 2 navigation wheels with button function
</li></ul>

<p>The Siemens SX1 models v1 and v2 (default) basic emulation.
The emulaton includes the following elements:
</p>
<ul class="toc">
<li>-
Texas Instruments OMAP310 System-on-chip (ARM 925T core)
</li><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><li>-
On-chip LCD controller
</li><li>-
On-chip Real Time Clock
</li><li>-
Secure Digital card connected to OMAP MMC/SD host
</li><li>-
Three on-chip UARTs
</li></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.
</p>

<p>The following options are specific to the ARM emulation:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-semihosting</samp>&rsquo;</dt>
<dd><p>Enable semihosting syscall emulation.
</p>
<p>On ARM this implements the &quot;Angel&quot; interface.
</p>
<p>Note that this allows guest direct access to the host filesystem,
so should only be used with trusted guest OS.
</p>
</dd>
</dl>

<hr size="6">
<a name="ColdFire-System-emulator"></a>
<a name="SEC69"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC68" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC63" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC63" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.6 ColdFire System emulator </h2>

<p>Use the executable &lsquo;<tt>qemu-system-m68k</tt>&rsquo; to simulate a ColdFire machine.
The emulator is able to boot a uClinux kernel.
</p>
<p>The M5208EVB emulation includes the following devices:
</p>
<ul class="toc">
<li>-
MCF5208 ColdFire V2 Microprocessor (ISA A+ with EMAC).
</li><li>-
Three Two on-chip UARTs.
</li><li>-
Fast Ethernet Controller (FEC)
</li></ul>

<p>The AN5206 emulation includes the following devices:
</p>
<ul class="toc">
<li>-
MCF5206 ColdFire V2 Microprocessor.
</li><li>-
Two on-chip UARTs.
</li></ul>


<p>The following options are specific to the ARM emulation:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-semihosting</samp>&rsquo;</dt>
<dd><p>Enable semihosting syscall emulation.
</p>
<p>On M68K this implements the &quot;ColdFire GDB&quot; interface used by libgloss.
</p>
<p>Note that this allows guest direct access to the host filesystem,
so should only be used with trusted guest OS.
</p>
</dd>
</dl>

<hr size="6">
<a name="QEMU-User-space-emulator"></a>
<a name="SEC70"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC69" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC71" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC63" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 5. QEMU User space emulator </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC71">5.1 Supported Operating Systems</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC72">5.2 Linux User space emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC77">5.3 Mac OS X/Darwin User space emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC81">5.4 BSD User space emulator</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Supported-Operating-Systems"></a>
<a name="SEC71"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC70" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC72" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 5.1 Supported Operating Systems </h2>

<p>The following OS are supported in user space emulation:
</p>
<ul class="toc">
<li>-
Linux (referred as qemu-linux-user)
</li><li>-
Mac OS X/Darwin (referred as qemu-darwin-user)
</li><li>-
BSD (referred as qemu-bsd-user)
</li></ul>

<hr size="6">
<a name="Linux-User-space-emulator"></a>
<a name="SEC72"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC71" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC73" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 5.2 Linux User space emulator </h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC73">5.2.1 Quick Start</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC74">5.2.2 Wine launch</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC75">5.2.3 Command line options</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC76">5.2.4 Other binaries</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Quick-Start"></a>
<a name="SEC73"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC72" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC74" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC72" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.2.1 Quick Start </h3>

<p>In order to launch a Linux process, QEMU needs the process executable
itself and all the target (x86) dynamic libraries used by it.
</p>
<ul class="toc">
<li> On x86, you can just try to launch any process by using the native
libraries:

<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 -L / /bin/ls
</pre></td></tr></table>

<p><code>-L /</code> tells that the x86 dynamic linker must be searched with a
&lsquo;<tt>/</tt>&rsquo; prefix.
</p>
</li><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):

<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 -L / qemu-i386 -L / /bin/ls
</pre></td></tr></table>

</li><li> On non x86 CPUs, you need first to download at least an x86 glibc
(&lsquo;<tt>qemu-runtime-i386-XXX-.tar.gz</tt>&rsquo; on the QEMU web page). Ensure that
<code>LD_LIBRARY_PATH</code> is not set:

<table><tr><td>&nbsp;</td><td><pre class="example">unset LD_LIBRARY_PATH
</pre></td></tr></table>

<p>Then you can launch the precompiled &lsquo;<tt>ls</tt>&rsquo; x86 executable:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 tests/i386/ls
</pre></td></tr></table>
<p>You can look at &lsquo;<tt>qemu-binfmt-conf.sh</tt>&rsquo; 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.
</p>
</li><li> The x86 version of QEMU is also included. You can try weird things such as:
<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 /usr/local/qemu-i386/bin/qemu-i386 \
          /usr/local/qemu-i386/bin/ls-i386
</pre></td></tr></table>

</li></ul>

<hr size="6">
<a name="Wine-launch"></a>
<a name="SEC74"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC73" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC75" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC72" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.2.2 Wine launch </h3>

<ul class="toc">
<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:

<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 /usr/local/qemu-i386/bin/ls-i386
</pre></td></tr></table>

</li><li> Download the binary x86 Wine install
(&lsquo;<tt>qemu-XXX-i386-wine.tar.gz</tt>&rsquo; on the QEMU web page).

</li><li> Configure Wine on your account. Look at the provided script
&lsquo;<tt>/usr/local/qemu-i386/bin/wine-conf.sh</tt>&rsquo;. Your previous
<code>${HOME}/.wine</code> directory is saved to <code>${HOME}/.wine.org</code>.

</li><li> Then you can try the example &lsquo;<tt>putty.exe</tt>&rsquo;:

<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 /usr/local/qemu-i386/wine/bin/wine \
          /usr/local/qemu-i386/wine/c/Program\ Files/putty.exe
</pre></td></tr></table>

</li></ul>

<hr size="6">
<a name="Command-line-options"></a>
<a name="SEC75"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC74" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC76" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC72" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.2.3 Command line options </h3>

<table><tr><td>&nbsp;</td><td><pre class="example">usage: qemu-i386 [-h] [-d] [-L path] [-s size] [-cpu model] [-g port] program [arguments...]
</pre></td></tr></table>

<dl compact="compact">
<dt> &lsquo;<samp>-h</samp>&rsquo;</dt>
<dd><p>Print the help
</p></dd>
<dt> &lsquo;<samp>-L path</samp>&rsquo;</dt>
<dd><p>Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)
</p></dd>
<dt> &lsquo;<samp>-s size</samp>&rsquo;</dt>
<dd><p>Set the x86 stack size in bytes (default=524288)
</p></dd>
<dt> &lsquo;<samp>-cpu model</samp>&rsquo;</dt>
<dd><p>Select CPU model (-cpu ? for list and additional feature selection)
</p></dd>
</dl>

<p>Debug options:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-d</samp>&rsquo;</dt>
<dd><p>Activate log (logfile=/tmp/qemu.log)
</p></dd>
<dt> &lsquo;<samp>-p pagesize</samp>&rsquo;</dt>
<dd><p>Act as if the host page size was 'pagesize' bytes
</p></dd>
<dt> &lsquo;<samp>-g port</samp>&rsquo;</dt>
<dd><p>Wait gdb connection to port
</p></dd>
<dt> &lsquo;<samp>-singlestep</samp>&rsquo;</dt>
<dd><p>Run the emulation in single step mode.
</p></dd>
</dl>

<p>Environment variables:
</p>
<dl compact="compact">
<dt> <code>QEMU_STRACE</code></dt>
<dd><p>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.
</p></dd>
</dl>

<hr size="6">
<a name="Other-binaries"></a>
<a name="SEC76"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC75" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC77" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC72" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.2.4 Other binaries </h3>

<p><code>qemu-arm</code> is also capable of running ARM &quot;Angel&quot; semihosted ELF
binaries (as implemented by the arm-elf and arm-eabi Newlib/GDB
configurations), and arm-uclinux bFLT format binaries.
</p>
<p><code>qemu-m68k</code> 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>
<p>The binary format is detected automatically.
</p>
<p><code>qemu-sparc</code> can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).
</p>
<p><code>qemu-sparc32plus</code> can execute Sparc32 and SPARC32PLUS binaries
(Sparc64 CPU, 32 bit ABI).
</p>
<p><code>qemu-sparc64</code> can execute some Sparc64 (Sparc64 CPU, 64 bit ABI) and
SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI).
</p>
<hr size="6">
<a name="Mac-OS-X_002fDarwin-User-space-emulator"></a>
<a name="SEC77"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC76" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC78" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 5.3 Mac OS X/Darwin User space emulator </h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC78">5.3.1 Mac OS X/Darwin Status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC79">5.3.2 Quick Start</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC80">5.3.3 Command line options</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Mac-OS-X_002fDarwin-Status"></a>
<a name="SEC78"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC77" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC79" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC77" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.3.1 Mac OS X/Darwin Status </h3>

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

<p>[1] If you're host commpage can be executed by qemu.
</p>
<hr size="6">
<a name="Mac-OS-X_002fDarwin-Quick-Start"></a>
<a name="SEC79"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC78" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC80" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC77" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.3.2 Quick Start </h3>

<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.
</p>
<ul class="toc">
<li> On x86, you can just try to launch any process by using the native
libraries:

<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 /bin/ls
</pre></td></tr></table>

<p>or to run the ppc version of the executable:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">qemu-ppc /bin/ls
</pre></td></tr></table>

</li><li> On ppc, you'll have to tell qemu where your x86 libraries (and dynamic linker)
are installed:

<table><tr><td>&nbsp;</td><td><pre class="example">qemu-i386 -L /opt/x86_root/ /bin/ls
</pre></td></tr></table>

<p><code>-L /opt/x86_root/</code> tells that the dynamic linker (dyld) path is in
&lsquo;<tt>/opt/x86_root/usr/bin/dyld</tt>&rsquo;.
</p>
</li></ul>

<hr size="6">
<a name="Mac-OS-X_002fDarwin-Command-line-options"></a>
<a name="SEC80"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC79" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC81" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC77" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.3.3 Command line options </h3>

<table><tr><td>&nbsp;</td><td><pre class="example">usage: qemu-i386 [-h] [-d] [-L path] [-s size] program [arguments...]
</pre></td></tr></table>

<dl compact="compact">
<dt> &lsquo;<samp>-h</samp>&rsquo;</dt>
<dd><p>Print the help
</p></dd>
<dt> &lsquo;<samp>-L path</samp>&rsquo;</dt>
<dd><p>Set the library root path (default=/)
</p></dd>
<dt> &lsquo;<samp>-s size</samp>&rsquo;</dt>
<dd><p>Set the stack size in bytes (default=524288)
</p></dd>
</dl>

<p>Debug options:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-d</samp>&rsquo;</dt>
<dd><p>Activate log (logfile=/tmp/qemu.log)
</p></dd>
<dt> &lsquo;<samp>-p pagesize</samp>&rsquo;</dt>
<dd><p>Act as if the host page size was 'pagesize' bytes
</p></dd>
<dt> &lsquo;<samp>-singlestep</samp>&rsquo;</dt>
<dd><p>Run the emulation in single step mode.
</p></dd>
</dl>

<hr size="6">
<a name="BSD-User-space-emulator"></a>
<a name="SEC81"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC80" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC82" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC70" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 5.4 BSD User space emulator </h2>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC82">5.4.1 BSD Status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC83">5.4.2 Quick Start</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC84">5.4.3 Command line options</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="BSD-Status"></a>
<a name="SEC82"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC81" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC83" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC81" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.4.1 BSD Status </h3>

<ul class="toc">
<li>-
target Sparc64 on Sparc64: Some trivial programs work.
</li></ul>

<hr size="6">
<a name="BSD-Quick-Start"></a>
<a name="SEC83"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC82" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC84" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC81" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.4.2 Quick Start </h3>

<p>In order to launch a BSD process, QEMU needs the process executable
itself and all the target dynamic libraries used by it.
</p>
<ul class="toc">
<li> On Sparc64, you can just try to launch any process by using the native
libraries:

<table><tr><td>&nbsp;</td><td><pre class="example">qemu-sparc64 /bin/ls
</pre></td></tr></table>

</li></ul>

<hr size="6">
<a name="BSD-Command-line-options"></a>
<a name="SEC84"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC83" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC81" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 5.4.3 Command line options </h3>

<table><tr><td>&nbsp;</td><td><pre class="example">usage: qemu-sparc64 [-h] [-d] [-L path] [-s size] [-bsd type] program [arguments...]
</pre></td></tr></table>

<dl compact="compact">
<dt> &lsquo;<samp>-h</samp>&rsquo;</dt>
<dd><p>Print the help
</p></dd>
<dt> &lsquo;<samp>-L path</samp>&rsquo;</dt>
<dd><p>Set the library root path (default=/)
</p></dd>
<dt> &lsquo;<samp>-s size</samp>&rsquo;</dt>
<dd><p>Set the stack size in bytes (default=524288)
</p></dd>
<dt> &lsquo;<samp>-bsd type</samp>&rsquo;</dt>
<dd><p>Set the type of the emulated BSD Operating system. Valid values are
FreeBSD, NetBSD and OpenBSD (default).
</p></dd>
</dl>

<p>Debug options:
</p>
<dl compact="compact">
<dt> &lsquo;<samp>-d</samp>&rsquo;</dt>
<dd><p>Activate log (logfile=/tmp/qemu.log)
</p></dd>
<dt> &lsquo;<samp>-p pagesize</samp>&rsquo;</dt>
<dd><p>Act as if the host page size was 'pagesize' bytes
</p></dd>
<dt> &lsquo;<samp>-singlestep</samp>&rsquo;</dt>
<dd><p>Run the emulation in single step mode.
</p></dd>
</dl>

<hr size="6">
<a name="compilation"></a>
<a name="SEC85"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC84" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC86" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC70" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 6. Compilation from the sources </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC86">6.1 Linux/Unix</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC89">6.2 Windows</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC90">6.3 Cross compilation for Windows with Linux</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC91">6.4 Mac OS X</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Linux_002fUnix"></a>
<a name="SEC86"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC85" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC87" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC85" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 6.1 Linux/Unix </h2>

<hr size="6">
<a name="SEC87"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC86" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC88" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC85" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC86" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 6.1.1 Compilation </h3>

<p>First you must decompress the sources:
</p><table><tr><td>&nbsp;</td><td><pre class="example">cd /tmp
tar zxvf qemu-x.y.z.tar.gz
cd qemu-x.y.z
</pre></td></tr></table>

<p>Then you configure QEMU and build it (usually no options are needed):
</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure
make
</pre></td></tr></table>

<p>Then type as root user:
</p><table><tr><td>&nbsp;</td><td><pre class="example">make install
</pre></td></tr></table>
<p>to install QEMU in &lsquo;<tt>/usr/local</tt>&rsquo;.
</p>
<hr size="6">
<a name="SEC88"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC87" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC89" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC85" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC86" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection"> 6.1.2 GCC version </h3>

<p>In order to compile QEMU successfully, it is very important that you
have the right tools. The most important one is gcc. On most hosts and
in particular on x86 ones, <em>gcc 4.x is not supported</em>. If your
Linux distribution includes a gcc 4.x compiler, you can usually
install an older version (it is invoked by <code>gcc32</code> or
<code>gcc34</code>). The QEMU configure script automatically probes for
these older versions so that usually you don't have to do anything.
</p>
<hr size="6">
<a name="Windows"></a>
<a name="SEC89"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC88" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC90" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC85" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 6.2 Windows </h2>

<ul class="toc">
<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><li> Download
the MinGW development library of SDL 1.2.x
(&lsquo;<tt>SDL-devel-1.2.x-mingw32.tar.gz</tt>&rsquo;) from
<a href="http://www.libsdl.org">http://www.libsdl.org</a>. Unpack it in a temporary place, and
unpack the archive &lsquo;<tt>i386-mingw32msvc.tar.gz</tt>&rsquo; in the MinGW tool
directory. Edit the &lsquo;<tt>sdl-config</tt>&rsquo; script so that it gives the
correct SDL directory when invoked.

</li><li> Extract the current version of QEMU.

</li><li> Start the MSYS shell (file &lsquo;<tt>msys.bat</tt>&rsquo;).

</li><li> Change to the QEMU directory. Launch &lsquo;<tt>./configure</tt>&rsquo; and
&lsquo;<tt>make</tt>&rsquo;.  If you have problems using SDL, verify that
&lsquo;<tt>sdl-config</tt>&rsquo; can be launched from the MSYS command line.

</li><li> You can install QEMU in &lsquo;<tt>Program Files/Qemu</tt>&rsquo; by typing
&lsquo;<tt>make install</tt>&rsquo;. Don't forget to copy &lsquo;<tt>SDL.dll</tt>&rsquo; in
&lsquo;<tt>Program Files/Qemu</tt>&rsquo;.

</li></ul>

<hr size="6">
<a name="Cross-compilation-for-Windows-with-Linux"></a>
<a name="SEC90"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC89" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC91" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC85" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 6.3 Cross compilation for Windows with Linux </h2>

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

</li><li>
Install the Win32 version of SDL (<a href="http://www.libsdl.org">http://www.libsdl.org</a>) by
unpacking &lsquo;<tt>i386-mingw32msvc.tar.gz</tt>&rsquo;. Set up the PATH environment
variable so that &lsquo;<tt>i386-mingw32msvc-sdl-config</tt>&rsquo; can be launched by
the QEMU configuration script.

</li><li>
Configure QEMU for Windows cross compilation:
<table><tr><td>&nbsp;</td><td><pre class="example">./configure --enable-mingw32
</pre></td></tr></table>
<p>If necessary, you can change the cross-prefix according to the prefix
chosen for the MinGW tools with &ndash;cross-prefix. You can also use
&ndash;prefix to set the Win32 install path.
</p>
</li><li> You can install QEMU in the installation directory by typing
&lsquo;<tt>make install</tt>&rsquo;. Don't forget to copy &lsquo;<tt>SDL.dll</tt>&rsquo; in the
installation directory.

</li></ul>

<p>Note: Currently, Wine does not seem able to launch
QEMU for Win32.
</p>
<hr size="6">
<a name="Mac-OS-X"></a>
<a name="SEC91"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC90" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC85" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC85" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 6.4 Mac OS X </h2>

<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>
<hr size="6">
<a name="Index"></a>
<a name="SEC92"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC91" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[ &gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC85" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 7. Index </h1>

<hr size="6">
<a name="SEC_Contents"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>Table of Contents</h1>
<div class="contents">

<ul class="toc">
  <li><a name="TOC1" href="#SEC1">1. Introduction</a>
  <ul class="toc">
    <li><a name="TOC2" href="#SEC2">1.1 Features</a></li>
  </ul></li>
  <li><a name="TOC3" href="#SEC3">2. Installation</a>
  <ul class="toc">
    <li><a name="TOC4" href="#SEC4">2.1 Linux</a></li>
    <li><a name="TOC5" href="#SEC5">2.2 Windows</a></li>
    <li><a name="TOC6" href="#SEC6">2.3 Mac OS X</a></li>
  </ul></li>
  <li><a name="TOC7" href="#SEC7">3. QEMU PC System emulator</a>
  <ul class="toc">
    <li><a name="TOC8" href="#SEC8">3.1 Introduction</a></li>
    <li><a name="TOC9" href="#SEC9">3.2 Quick Start</a></li>
    <li><a name="TOC10" href="#SEC10">3.3 Invocation</a></li>
    <li><a name="TOC11" href="#SEC11">3.4 Keys</a></li>
    <li><a name="TOC12" href="#SEC12">3.5 QEMU Monitor</a>
    <ul class="toc">
      <li><a name="TOC13" href="#SEC13">3.5.1 Commands</a></li>
      <li><a name="TOC14" href="#SEC14">3.5.2 Integer expressions</a></li>
    </ul></li>
    <li><a name="TOC15" href="#SEC15">3.6 Disk Images</a>
    <ul class="toc">
      <li><a name="TOC16" href="#SEC16">3.6.1 Quick start for disk image creation</a></li>
      <li><a name="TOC17" href="#SEC17">3.6.2 Snapshot mode</a></li>
      <li><a name="TOC18" href="#SEC18">3.6.3 VM snapshots</a></li>
      <li><a name="TOC19" href="#SEC19">3.6.4 <code>qemu-img</code> Invocation</a></li>
      <li><a name="TOC20" href="#SEC20">3.6.5 <code>qemu-nbd</code> Invocation</a></li>
      <li><a name="TOC21" href="#SEC21">3.6.6 Using host drives</a>
      <ul class="toc">
        <li><a name="TOC22" href="#SEC22">3.6.6.1 Linux</a></li>
        <li><a name="TOC23" href="#SEC23">3.6.6.2 Windows</a></li>
        <li><a name="TOC24" href="#SEC24">3.6.6.3 Mac OS X</a></li>
      </ul></li>
      <li><a name="TOC25" href="#SEC25">3.6.7 Virtual FAT disk images</a></li>
      <li><a name="TOC26" href="#SEC26">3.6.8 NBD access</a></li>
    </ul></li>
    <li><a name="TOC27" href="#SEC27">3.7 Network emulation</a>
    <ul class="toc">
      <li><a name="TOC28" href="#SEC28">3.7.1 VLANs</a></li>
      <li><a name="TOC29" href="#SEC29">3.7.2 Using TAP network interfaces</a>
      <ul class="toc">
        <li><a name="TOC30" href="#SEC30">3.7.2.1 Linux host</a></li>
        <li><a name="TOC31" href="#SEC31">3.7.2.2 Windows host</a></li>
      </ul></li>
      <li><a name="TOC32" href="#SEC32">3.7.3 Using the user mode network stack</a></li>
      <li><a name="TOC33" href="#SEC33">3.7.4 Connecting VLANs between QEMU instances</a></li>
    </ul></li>
    <li><a name="TOC34" href="#SEC34">3.8 Direct Linux Boot</a></li>
    <li><a name="TOC35" href="#SEC35">3.9 USB emulation</a>
    <ul class="toc">
      <li><a name="TOC36" href="#SEC36">3.9.1 Connecting USB devices</a></li>
      <li><a name="TOC37" href="#SEC37">3.9.2 Using host USB devices on a Linux host</a></li>
    </ul></li>
    <li><a name="TOC38" href="#SEC38">3.10 VNC security</a>
    <ul class="toc">
      <li><a name="TOC39" href="#SEC39">3.10.1 Without passwords</a></li>
      <li><a name="TOC40" href="#SEC40">3.10.2 With passwords</a></li>
      <li><a name="TOC41" href="#SEC41">3.10.3 With x509 certificates</a></li>
      <li><a name="TOC42" href="#SEC42">3.10.4 With x509 certificates and client verification</a></li>
      <li><a name="TOC43" href="#SEC43">3.10.5 With x509 certificates, client verification and passwords</a></li>
      <li><a name="TOC44" href="#SEC44">3.10.6 With SASL authentication</a></li>
      <li><a name="TOC45" href="#SEC45">3.10.7 With x509 certificates and SASL authentication</a></li>
      <li><a name="TOC46" href="#SEC46">3.10.8 Generating certificates for VNC</a>
      <ul class="toc">
        <li><a name="TOC47" href="#SEC47">3.10.8.1 Setup the Certificate Authority</a></li>
        <li><a name="TOC48" href="#SEC48">3.10.8.2 Issuing server certificates</a></li>
        <li><a name="TOC49" href="#SEC49">3.10.8.3 Issuing client certificates</a></li>
      </ul></li>
      <li><a name="TOC50" href="#SEC50">3.10.9 Configuring SASL mechanisms</a></li>
    </ul></li>
    <li><a name="TOC51" href="#SEC51">3.11 GDB usage</a></li>
    <li><a name="TOC52" href="#SEC52">3.12 Target OS specific information</a>
    <ul class="toc">
      <li><a name="TOC53" href="#SEC53">3.12.1 Linux</a></li>
      <li><a name="TOC54" href="#SEC54">3.12.2 Windows</a>
      <ul class="toc">
        <li><a name="TOC55" href="#SEC55">3.12.2.1 SVGA graphic modes support</a></li>
        <li><a name="TOC56" href="#SEC56">3.12.2.2 CPU usage reduction</a></li>
        <li><a name="TOC57" href="#SEC57">3.12.2.3 Windows 2000 disk full problem</a></li>
        <li><a name="TOC58" href="#SEC58">3.12.2.4 Windows 2000 shutdown</a></li>
        <li><a name="TOC59" href="#SEC59">3.12.2.5 Share a directory between Unix and Windows</a></li>
        <li><a name="TOC60" href="#SEC60">3.12.2.6 Windows XP security problem</a></li>
      </ul></li>
      <li><a name="TOC61" href="#SEC61">3.12.3 MS-DOS and FreeDOS</a>
      <ul class="toc">
        <li><a name="TOC62" href="#SEC62">3.12.3.1 CPU usage reduction</a></li>
      </ul>
</li>
    </ul>
</li>
  </ul></li>
  <li><a name="TOC63" href="#SEC63">4. QEMU System emulator for non PC targets</a>
  <ul class="toc">
    <li><a name="TOC64" href="#SEC64">4.1 QEMU PowerPC System emulator</a></li>
    <li><a name="TOC65" href="#SEC65">4.2 Sparc32 System emulator</a></li>
    <li><a name="TOC66" href="#SEC66">4.3 Sparc64 System emulator</a></li>
    <li><a name="TOC67" href="#SEC67">4.4 MIPS System emulator</a></li>
    <li><a name="TOC68" href="#SEC68">4.5 ARM System emulator</a></li>
    <li><a name="TOC69" href="#SEC69">4.6 ColdFire System emulator</a></li>
  </ul></li>
  <li><a name="TOC70" href="#SEC70">5. QEMU User space emulator</a>
  <ul class="toc">
    <li><a name="TOC71" href="#SEC71">5.1 Supported Operating Systems</a></li>
    <li><a name="TOC72" href="#SEC72">5.2 Linux User space emulator</a>
    <ul class="toc">
      <li><a name="TOC73" href="#SEC73">5.2.1 Quick Start</a></li>
      <li><a name="TOC74" href="#SEC74">5.2.2 Wine launch</a></li>
      <li><a name="TOC75" href="#SEC75">5.2.3 Command line options</a></li>
      <li><a name="TOC76" href="#SEC76">5.2.4 Other binaries</a></li>
    </ul></li>
    <li><a name="TOC77" href="#SEC77">5.3 Mac OS X/Darwin User space emulator</a>
    <ul class="toc">
      <li><a name="TOC78" href="#SEC78">5.3.1 Mac OS X/Darwin Status</a></li>
      <li><a name="TOC79" href="#SEC79">5.3.2 Quick Start</a></li>
      <li><a name="TOC80" href="#SEC80">5.3.3 Command line options</a></li>
    </ul></li>
    <li><a name="TOC81" href="#SEC81">5.4 BSD User space emulator</a>
    <ul class="toc">
      <li><a name="TOC82" href="#SEC82">5.4.1 BSD Status</a></li>
      <li><a name="TOC83" href="#SEC83">5.4.2 Quick Start</a></li>
      <li><a name="TOC84" href="#SEC84">5.4.3 Command line options</a></li>
    </ul>
</li>
  </ul></li>
  <li><a name="TOC85" href="#SEC85">6. Compilation from the sources</a>
  <ul class="toc">
    <li><a name="TOC86" href="#SEC86">6.1 Linux/Unix</a>
    <ul class="toc">
      <li><a name="TOC87" href="#SEC87">6.1.1 Compilation</a></li>
      <li><a name="TOC88" href="#SEC88">6.1.2 GCC version</a></li>
    </ul></li>
    <li><a name="TOC89" href="#SEC89">6.2 Windows</a></li>
    <li><a name="TOC90" href="#SEC90">6.3 Cross compilation for Windows with Linux</a></li>
    <li><a name="TOC91" href="#SEC91">6.4 Mac OS X</a></li>
  </ul></li>
  <li><a name="TOC92" href="#SEC92">7. Index</a></li>
</ul>
</div>
<hr size="1">
<a name="SEC_About"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#SEC92" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>About This Document</h1>
<p>
  This document was generated by <em>Anthony Liguori</em> on <em>May, 1 2009</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.78</em></a>.
</p>
<p>
  The buttons in the navigation panels have the following meaning:
</p>
<table border="1">
  <tr>
    <th> Button </th>
    <th> Name </th>
    <th> Go to </th>
    <th> From 1.2.3 go to</th>
  </tr>
  <tr>
    <td align="center"> [ &lt; ] </td>
    <td align="center">Back</td>
    <td>Previous section in reading order</td>
    <td>1.2.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt; ] </td>
    <td align="center">Forward</td>
    <td>Next section in reading order</td>
    <td>1.2.4</td>
  </tr>
  <tr>
    <td align="center"> [ &lt;&lt; ] </td>
    <td align="center">FastBack</td>
    <td>Beginning of this chapter or previous chapter</td>
    <td>1</td>
  </tr>
  <tr>
    <td align="center"> [ Up ] </td>
    <td align="center">Up</td>
    <td>Up section</td>
    <td>1.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt;&gt; ] </td>
    <td align="center">FastForward</td>
    <td>Next chapter</td>
    <td>2</td>
  </tr>
  <tr>
    <td align="center"> [Top] </td>
    <td align="center">Top</td>
    <td>Cover (top) of document</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Contents] </td>
    <td align="center">Contents</td>
    <td>Table of contents</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Index] </td>
    <td align="center">Index</td>
    <td>Index</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [ ? ] </td>
    <td align="center">About</td>
    <td>About (help)</td>
    <td> &nbsp; </td>
  </tr>
</table>

<p>
  where the <strong> Example </strong> assumes that the current position is at <strong> Subsubsection One-Two-Three </strong> of a document of the following structure:
</p>

<ul>
  <li> 1. Section One
    <ul>
      <li>1.1 Subsection One-One
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.2 Subsection One-Two
        <ul>
          <li>1.2.1 Subsubsection One-Two-One</li>
          <li>1.2.2 Subsubsection One-Two-Two</li>
          <li>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
            <strong>&lt;== Current Position </strong></li>
          <li>1.2.4 Subsubsection One-Two-Four</li>
        </ul>
      </li>
      <li>1.3 Subsection One-Three
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.4 Subsection One-Four</li>
    </ul>
  </li>
</ul>

<hr size="1">
<p>
 <font size="-1">
  This document was generated by <em>Anthony Liguori</em> on <em>May, 1 2009</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.78</em></a>.
 </font>
 <br>

</p>
</body>
</html>

unix.superglobalmegacorp.com