env-windows/tools/qemu/qemu32/qemu-doc.html

10864 lines
510 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
<title>QEMU version 3.0.0 User Documentation</title>
<meta name="description" content="QEMU version 3.0.0 User Documentation">
<meta name="keywords" content="QEMU version 3.0.0 User Documentation">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="#Top" rel="start" title="Top">
<link href="#Index" rel="index" title="Index">
<link href="#SEC_Contents" rel="contents" title="Table of Contents">
<link href="dir.html#Top" rel="up" title="(dir)">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<h1 class="settitle" align="center">QEMU version 3.0.0 User Documentation</h1>
<a name="Top"></a>
<a name="SEC_Top"></a>
<a name="SEC_Contents"></a>
<h2 class="contents-heading">Table of Contents</h2>
<div class="contents">
<ul class="no-bullet">
<li><a name="toc-Introduction-1" href="#Introduction">1 Introduction</a>
<ul class="no-bullet">
<li><a name="toc-Features-1" href="#intro_005ffeatures">1.1 Features</a></li>
</ul></li>
<li><a name="toc-QEMU-PC-System-emulator-1" href="#QEMU-PC-System-emulator">2 QEMU PC System emulator</a>
<ul class="no-bullet">
<li><a name="toc-Introduction-2" href="#pcsys_005fintroduction">2.1 Introduction</a></li>
<li><a name="toc-Quick-Start-1" href="#pcsys_005fquickstart">2.2 Quick Start</a></li>
<li><a name="toc-Invocation" href="#sec_005finvocation">2.3 Invocation</a>
<ul class="no-bullet">
<li><a name="toc-Standard-options" href="#Standard-options">2.3.1 Standard options</a></li>
<li><a name="toc-Block-device-options" href="#Block-device-options">2.3.2 Block device options</a></li>
<li><a name="toc-USB-options" href="#USB-options">2.3.3 USB options</a></li>
<li><a name="toc-Display-options" href="#Display-options">2.3.4 Display options</a></li>
<li><a name="toc-i386-target-only" href="#i386-target-only">2.3.5 i386 target only</a></li>
<li><a name="toc-Network-options" href="#Network-options">2.3.6 Network options</a></li>
<li><a name="toc-Character-device-options" href="#Character-device-options">2.3.7 Character device options</a></li>
<li><a name="toc-Bluetooth_0028R_0029-options" href="#Bluetooth_0028R_0029-options">2.3.8 Bluetooth(R) options</a></li>
<li><a name="toc-TPM-device-options" href="#TPM-device-options">2.3.9 TPM device options</a></li>
<li><a name="toc-Linux_002fMultiboot-boot-specific" href="#Linux_002fMultiboot-boot-specific">2.3.10 Linux/Multiboot boot specific</a></li>
<li><a name="toc-Debug_002fExpert-options" href="#Debug_002fExpert-options">2.3.11 Debug/Expert options</a></li>
<li><a name="toc-Generic-object-creation" href="#Generic-object-creation">2.3.12 Generic object creation</a></li>
<li><a name="toc-Device-URL-Syntax" href="#Device-URL-Syntax">2.3.13 Device URL Syntax</a></li>
</ul></li>
<li><a name="toc-Keys-in-the-graphical-frontends" href="#pcsys_005fkeys">2.4 Keys in the graphical frontends</a></li>
<li><a name="toc-Keys-in-the-character-backend-multiplexer" href="#mux_005fkeys">2.5 Keys in the character backend multiplexer</a></li>
<li><a name="toc-QEMU-Monitor" href="#pcsys_005fmonitor">2.6 QEMU Monitor</a>
<ul class="no-bullet">
<li><a name="toc-Commands" href="#Commands">2.6.1 Commands</a></li>
<li><a name="toc-Integer-expressions" href="#Integer-expressions">2.6.2 Integer expressions</a></li>
</ul></li>
<li><a name="toc-Disk-Images" href="#disk_005fimages">2.7 Disk Images</a>
<ul class="no-bullet">
<li><a name="toc-Quick-start-for-disk-image-creation" href="#disk_005fimages_005fquickstart">2.7.1 Quick start for disk image creation</a></li>
<li><a name="toc-Snapshot-mode" href="#disk_005fimages_005fsnapshot_005fmode">2.7.2 Snapshot mode</a></li>
<li><a name="toc-VM-snapshots" href="#vm_005fsnapshots">2.7.3 VM snapshots</a></li>
<li><a name="toc-qemu_002dimg-Invocation" href="#qemu_005fimg_005finvocation">2.7.4 <code>qemu-img</code> Invocation</a></li>
<li><a name="toc-qemu_002dnbd-Invocation" href="#qemu_005fnbd_005finvocation">2.7.5 <code>qemu-nbd</code> Invocation</a></li>
<li><a name="toc-Disk-image-file-formats" href="#disk_005fimages_005fformats">2.7.6 Disk image file formats</a>
<ul class="no-bullet">
<li><a name="toc-Read_002donly-formats" href="#Read_002donly-formats">2.7.6.1 Read-only formats</a></li>
</ul></li>
<li><a name="toc-Using-host-drives" href="#host_005fdrives">2.7.7 Using host drives</a>
<ul class="no-bullet">
<li><a name="toc-Linux" href="#Linux">2.7.7.1 Linux</a></li>
<li><a name="toc-Windows" href="#Windows">2.7.7.2 Windows</a></li>
<li><a name="toc-Mac-OS-X" href="#Mac-OS-X">2.7.7.3 Mac OS X</a></li>
</ul></li>
<li><a name="toc-Virtual-FAT-disk-images" href="#disk_005fimages_005ffat_005fimages">2.7.8 Virtual FAT disk images</a></li>
<li><a name="toc-NBD-access" href="#disk_005fimages_005fnbd">2.7.9 NBD access</a></li>
<li><a name="toc-Sheepdog-disk-images" href="#disk_005fimages_005fsheepdog">2.7.10 Sheepdog disk images</a></li>
<li><a name="toc-iSCSI-LUNs" href="#disk_005fimages_005fiscsi">2.7.11 iSCSI LUNs</a></li>
<li><a name="toc-GlusterFS-disk-images" href="#disk_005fimages_005fgluster">2.7.12 GlusterFS disk images</a></li>
<li><a name="toc-Secure-Shell-_0028ssh_0029-disk-images" href="#disk_005fimages_005fssh">2.7.13 Secure Shell (ssh) disk images</a></li>
<li><a name="toc-NVMe-disk-images" href="#disk_005fimages_005fnvme">2.7.14 NVMe disk images</a></li>
<li><a name="toc-Disk-image-file-locking" href="#disk_005fimage_005flocking">2.7.15 Disk image file locking</a></li>
</ul></li>
<li><a name="toc-Network-emulation" href="#pcsys_005fnetwork">2.8 Network emulation</a>
<ul class="no-bullet">
<li><a name="toc-Using-TAP-network-interfaces" href="#Using-TAP-network-interfaces">2.8.1 Using TAP network interfaces</a>
<ul class="no-bullet">
<li><a name="toc-Linux-host" href="#Linux-host">2.8.1.1 Linux host</a></li>
<li><a name="toc-Windows-host" href="#Windows-host">2.8.1.2 Windows host</a></li>
</ul></li>
<li><a name="toc-Using-the-user-mode-network-stack" href="#Using-the-user-mode-network-stack">2.8.2 Using the user mode network stack</a></li>
<li><a name="toc-Hubs" href="#Hubs">2.8.3 Hubs</a></li>
<li><a name="toc-Connecting-emulated-networks-between-QEMU-instances" href="#Connecting-emulated-networks-between-QEMU-instances">2.8.4 Connecting emulated networks between QEMU instances</a></li>
</ul></li>
<li><a name="toc-Other-Devices" href="#pcsys_005fother_005fdevs">2.9 Other Devices</a>
<ul class="no-bullet">
<li><a name="toc-Inter_002dVM-Shared-Memory-device" href="#Inter_002dVM-Shared-Memory-device">2.9.1 Inter-VM Shared Memory device</a>
<ul class="no-bullet">
<li><a name="toc-Migration-with-ivshmem" href="#Migration-with-ivshmem">2.9.1.1 Migration with ivshmem</a></li>
<li><a name="toc-ivshmem-and-hugepages" href="#ivshmem-and-hugepages">2.9.1.2 ivshmem and hugepages</a></li>
</ul></li>
</ul></li>
<li><a name="toc-Direct-Linux-Boot" href="#direct_005flinux_005fboot">2.10 Direct Linux Boot</a></li>
<li><a name="toc-USB-emulation" href="#pcsys_005fusb">2.11 USB emulation</a>
<ul class="no-bullet">
<li><a name="toc-Connecting-USB-devices" href="#usb_005fdevices">2.11.1 Connecting USB devices</a></li>
<li><a name="toc-Using-host-USB-devices-on-a-Linux-host" href="#host_005fusb_005fdevices">2.11.2 Using host USB devices on a Linux host</a></li>
</ul></li>
<li><a name="toc-VNC-security" href="#vnc_005fsecurity">2.12 VNC security</a>
<ul class="no-bullet">
<li><a name="toc-Without-passwords" href="#vnc_005fsec_005fnone">2.12.1 Without passwords</a></li>
<li><a name="toc-With-passwords" href="#vnc_005fsec_005fpassword">2.12.2 With passwords</a></li>
<li><a name="toc-With-x509-certificates" href="#vnc_005fsec_005fcertificate">2.12.3 With x509 certificates</a></li>
<li><a name="toc-With-x509-certificates-and-client-verification" href="#vnc_005fsec_005fcertificate_005fverify">2.12.4 With x509 certificates and client verification</a></li>
<li><a name="toc-With-x509-certificates_002c-client-verification-and-passwords" href="#vnc_005fsec_005fcertificate_005fpw">2.12.5 With x509 certificates, client verification and passwords</a></li>
<li><a name="toc-With-SASL-authentication" href="#vnc_005fsec_005fsasl">2.12.6 With SASL authentication</a></li>
<li><a name="toc-With-x509-certificates-and-SASL-authentication" href="#vnc_005fsec_005fcertificate_005fsasl">2.12.7 With x509 certificates and SASL authentication</a></li>
<li><a name="toc-Configuring-SASL-mechanisms" href="#vnc_005fsetup_005fsasl">2.12.8 Configuring SASL mechanisms</a></li>
</ul></li>
<li><a name="toc-TLS-setup-for-network-services" href="#network_005ftls">2.13 TLS setup for network services</a>
<ul class="no-bullet">
<li><a name="toc-Setup-the-Certificate-Authority" href="#tls_005fgenerate_005fca">2.13.1 Setup the Certificate Authority</a></li>
<li><a name="toc-Issuing-server-certificates" href="#tls_005fgenerate_005fserver">2.13.2 Issuing server certificates</a></li>
<li><a name="toc-Issuing-client-certificates" href="#tls_005fgenerate_005fclient">2.13.3 Issuing client certificates</a></li>
<li><a name="toc-TLS-x509-credential-configuration" href="#tls_005fcreds_005fsetup">2.13.4 TLS x509 credential configuration</a></li>
<li><a name="toc-TLS-Pre_002dShared-Keys-_0028PSK_0029" href="#tls_005fpsk">2.13.5 TLS Pre-Shared Keys (PSK)</a></li>
</ul></li>
<li><a name="toc-GDB-usage" href="#gdb_005fusage">2.14 GDB usage</a></li>
<li><a name="toc-Target-OS-specific-information" href="#pcsys_005fos_005fspecific">2.15 Target OS specific information</a>
<ul class="no-bullet">
<li><a name="toc-Linux-1" href="#Linux-1">2.15.1 Linux</a></li>
<li><a name="toc-Windows-1" href="#Windows-1">2.15.2 Windows</a>
<ul class="no-bullet">
<li><a name="toc-SVGA-graphic-modes-support" href="#SVGA-graphic-modes-support">2.15.2.1 SVGA graphic modes support</a></li>
<li><a name="toc-CPU-usage-reduction" href="#CPU-usage-reduction">2.15.2.2 CPU usage reduction</a></li>
<li><a name="toc-Windows-2000-disk-full-problem" href="#Windows-2000-disk-full-problem">2.15.2.3 Windows 2000 disk full problem</a></li>
<li><a name="toc-Windows-2000-shutdown" href="#Windows-2000-shutdown">2.15.2.4 Windows 2000 shutdown</a></li>
<li><a name="toc-Share-a-directory-between-Unix-and-Windows" href="#Share-a-directory-between-Unix-and-Windows">2.15.2.5 Share a directory between Unix and Windows</a></li>
<li><a name="toc-Windows-XP-security-problem" href="#Windows-XP-security-problem">2.15.2.6 Windows XP security problem</a></li>
</ul></li>
<li><a name="toc-MS_002dDOS-and-FreeDOS" href="#MS_002dDOS-and-FreeDOS">2.15.3 MS-DOS and FreeDOS</a>
<ul class="no-bullet">
<li><a name="toc-CPU-usage-reduction-1" href="#CPU-usage-reduction-1">2.15.3.1 CPU usage reduction</a></li>
</ul></li>
</ul></li>
</ul></li>
<li><a name="toc-QEMU-System-emulator-for-non-PC-targets-1" href="#QEMU-System-emulator-for-non-PC-targets">3 QEMU System emulator for non PC targets</a>
<ul class="no-bullet">
<li><a name="toc-PowerPC-System-emulator-1" href="#PowerPC-System-emulator">3.1 PowerPC System emulator</a></li>
<li><a name="toc-Sparc32-System-emulator-1" href="#Sparc32-System-emulator">3.2 Sparc32 System emulator</a></li>
<li><a name="toc-Sparc64-System-emulator-1" href="#Sparc64-System-emulator">3.3 Sparc64 System emulator</a></li>
<li><a name="toc-MIPS-System-emulator-1" href="#MIPS-System-emulator">3.4 MIPS System emulator</a></li>
<li><a name="toc-ARM-System-emulator-1" href="#ARM-System-emulator">3.5 ARM System emulator</a></li>
<li><a name="toc-ColdFire-System-emulator-1" href="#ColdFire-System-emulator">3.6 ColdFire System emulator</a></li>
<li><a name="toc-Cris-System-emulator-1" href="#Cris-System-emulator">3.7 Cris System emulator</a></li>
<li><a name="toc-Microblaze-System-emulator-1" href="#Microblaze-System-emulator">3.8 Microblaze System emulator</a></li>
<li><a name="toc-SH4-System-emulator-1" href="#SH4-System-emulator">3.9 SH4 System emulator</a></li>
<li><a name="toc-Xtensa-System-emulator-1" href="#Xtensa-System-emulator">3.10 Xtensa System emulator</a></li>
</ul></li>
<li><a name="toc-QEMU-Guest-Agent-invocation" href="#QEMU-Guest-Agent">4 QEMU Guest Agent invocation</a></li>
<li><a name="toc-QEMU-User-space-emulator-1" href="#QEMU-User-space-emulator">5 QEMU User space emulator</a>
<ul class="no-bullet">
<li><a name="toc-Supported-Operating-Systems-1" href="#Supported-Operating-Systems">5.1 Supported Operating Systems</a></li>
<li><a name="toc-Features-2" href="#Features">5.2 Features</a></li>
<li><a name="toc-Linux-User-space-emulator-1" href="#Linux-User-space-emulator">5.3 Linux User space emulator</a>
<ul class="no-bullet">
<li><a name="toc-Quick-Start-2" href="#Quick-Start">5.3.1 Quick Start</a></li>
<li><a name="toc-Wine-launch-1" href="#Wine-launch">5.3.2 Wine launch</a></li>
<li><a name="toc-Command-line-options-1" href="#Command-line-options">5.3.3 Command line options</a></li>
<li><a name="toc-Other-binaries-1" href="#Other-binaries">5.3.4 Other binaries</a></li>
</ul></li>
<li><a name="toc-BSD-User-space-emulator-1" href="#BSD-User-space-emulator">5.4 BSD User space emulator</a>
<ul class="no-bullet">
<li><a name="toc-BSD-Status-1" href="#BSD-Status">5.4.1 BSD Status</a></li>
<li><a name="toc-Quick-Start-3" href="#BSD-Quick-Start">5.4.2 Quick Start</a></li>
<li><a name="toc-Command-line-options-2" href="#BSD-Command-line-options">5.4.3 Command line options</a></li>
</ul></li>
</ul></li>
<li><a name="toc-Implementation-notes-1" href="#Implementation-notes">Appendix A Implementation notes</a>
<ul class="no-bullet">
<li><a name="toc-CPU-emulation-1" href="#CPU-emulation">A.1 CPU emulation</a>
<ul class="no-bullet">
<li><a name="toc-x86-and-x86_002d64-emulation" href="#x86">A.1.1 x86 and x86-64 emulation</a></li>
<li><a name="toc-ARM-emulation" href="#ARM">A.1.2 ARM emulation</a></li>
<li><a name="toc-MIPS-emulation" href="#MIPS">A.1.3 MIPS emulation</a></li>
<li><a name="toc-PowerPC-emulation" href="#PPC">A.1.4 PowerPC emulation</a></li>
<li><a name="toc-Sparc32-and-Sparc64-emulation" href="#SPARC">A.1.5 Sparc32 and Sparc64 emulation</a></li>
<li><a name="toc-Xtensa-emulation" href="#Xtensa">A.1.6 Xtensa emulation</a></li>
</ul></li>
<li><a name="toc-Translator-Internals-1" href="#Translator-Internals">A.2 Translator Internals</a></li>
<li><a name="toc-QEMU-compared-to-other-emulators-1" href="#QEMU-compared-to-other-emulators">A.3 QEMU compared to other emulators</a></li>
<li><a name="toc-Managed-start-up-options-1" href="#Managed-start-up-options">A.4 Managed start up options</a></li>
<li><a name="toc-Bibliography-1" href="#Bibliography">A.5 Bibliography</a></li>
</ul></li>
<li><a name="toc-Deprecated-features-1" href="#Deprecated-features">Appendix B Deprecated features</a>
<ul class="no-bullet">
<li><a name="toc-Build-options" href="#Build-options">B.1 Build options</a>
<ul class="no-bullet">
<li><a name="toc-GTK-2_002ex" href="#GTK-2_002ex">B.1.1 GTK 2.x</a></li>
<li><a name="toc-SDL-1_002e2" href="#SDL-1_002e2">B.1.2 SDL 1.2</a></li>
</ul></li>
<li><a name="toc-System-emulator-command-line-arguments" href="#System-emulator-command-line-arguments">B.2 System emulator command line arguments</a>
<ul class="no-bullet">
<li><a name="toc-_002dno_002dkvm-_0028since-1_002e3_002e0_0029" href="#g_t_002dno_002dkvm-_0028since-1_002e3_002e0_0029">B.2.1 -no-kvm (since 1.3.0)</a></li>
<li><a name="toc-_002dvnc-tls-_0028since-2_002e5_002e0_0029" href="#g_t_002dvnc-tls-_0028since-2_002e5_002e0_0029">B.2.2 -vnc tls (since 2.5.0)</a></li>
<li><a name="toc-_002dvnc-x509-_0028since-2_002e5_002e0_0029" href="#g_t_002dvnc-x509-_0028since-2_002e5_002e0_0029">B.2.3 -vnc x509 (since 2.5.0)</a></li>
<li><a name="toc-_002dvnc-x509verify-_0028since-2_002e5_002e0_0029" href="#g_t_002dvnc-x509verify-_0028since-2_002e5_002e0_0029">B.2.4 -vnc x509verify (since 2.5.0)</a></li>
<li><a name="toc-_002dtftp-_0028since-2_002e6_002e0_0029" href="#g_t_002dtftp-_0028since-2_002e6_002e0_0029">B.2.5 -tftp (since 2.6.0)</a></li>
<li><a name="toc-_002dbootp-_0028since-2_002e6_002e0_0029" href="#g_t_002dbootp-_0028since-2_002e6_002e0_0029">B.2.6 -bootp (since 2.6.0)</a></li>
<li><a name="toc-_002dredir-_0028since-2_002e6_002e0_0029" href="#g_t_002dredir-_0028since-2_002e6_002e0_0029">B.2.7 -redir (since 2.6.0)</a></li>
<li><a name="toc-_002dsmb-_0028since-2_002e6_002e0_0029" href="#g_t_002dsmb-_0028since-2_002e6_002e0_0029">B.2.8 -smb (since 2.6.0)</a></li>
<li><a name="toc-_002ddrive-cyls_003d_002e_002e_002e_002cheads_003d_002e_002e_002e_002csecs_003d_002e_002e_002e_002ctrans_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029" href="#g_t_002ddrive-cyls_003d_002e_002e_002e_002cheads_003d_002e_002e_002e_002csecs_003d_002e_002e_002e_002ctrans_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029">B.2.9 -drive cyls=...,heads=...,secs=...,trans=... (since 2.10.0)</a></li>
<li><a name="toc-_002ddrive-serial_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029" href="#g_t_002ddrive-serial_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029">B.2.10 -drive serial=... (since 2.10.0)</a></li>
<li><a name="toc-_002ddrive-addr_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029" href="#g_t_002ddrive-addr_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029">B.2.11 -drive addr=... (since 2.10.0)</a></li>
<li><a name="toc-_002dusbdevice-_0028since-2_002e10_002e0_0029" href="#g_t_002dusbdevice-_0028since-2_002e10_002e0_0029">B.2.12 -usbdevice (since 2.10.0)</a></li>
<li><a name="toc-_002dnodefconfig-_0028since-2_002e11_002e0_0029" href="#g_t_002dnodefconfig-_0028since-2_002e11_002e0_0029">B.2.13 -nodefconfig (since 2.11.0)</a></li>
<li><a name="toc-_002dballoon-_0028since-2_002e12_002e0_0029" href="#g_t_002dballoon-_0028since-2_002e12_002e0_0029">B.2.14 -balloon (since 2.12.0)</a></li>
<li><a name="toc-_002dmachine-s390_002dsquash_002dmcss_003don_007coff-_0028since-2_002e12_002e0_0029" href="#g_t_002dmachine-s390_002dsquash_002dmcss_003don_007coff-_0028since-2_002e12_002e0_0029">B.2.15 -machine s390-squash-mcss=on|off (since 2.12.0)</a></li>
<li><a name="toc-_002dfsdev-handle-_0028since-2_002e12_002e0_0029" href="#g_t_002dfsdev-handle-_0028since-2_002e12_002e0_0029">B.2.16 -fsdev handle (since 2.12.0)</a></li>
<li><a name="toc-_002dno_002dframe-_0028since-2_002e12_002e0_0029" href="#g_t_002dno_002dframe-_0028since-2_002e12_002e0_0029">B.2.17 -no-frame (since 2.12.0)</a></li>
<li><a name="toc-_002drtc_002dtd_002dhack-_0028since-2_002e12_002e0_0029" href="#g_t_002drtc_002dtd_002dhack-_0028since-2_002e12_002e0_0029">B.2.18 -rtc-td-hack (since 2.12.0)</a></li>
<li><a name="toc-_002dlocaltime-_0028since-2_002e12_002e0_0029" href="#g_t_002dlocaltime-_0028since-2_002e12_002e0_0029">B.2.19 -localtime (since 2.12.0)</a></li>
<li><a name="toc-_002dstartdate-_0028since-2_002e12_002e0_0029" href="#g_t_002dstartdate-_0028since-2_002e12_002e0_0029">B.2.20 -startdate (since 2.12.0)</a></li>
<li><a name="toc-_002dvirtioconsole-_0028since-3_002e0_002e0_0029" href="#g_t_002dvirtioconsole-_0028since-3_002e0_002e0_0029">B.2.21 -virtioconsole (since 3.0.0)</a></li>
<li><a name="toc-_002dclock-_0028since-3_002e0_002e0_0029" href="#g_t_002dclock-_0028since-3_002e0_002e0_0029">B.2.22 -clock (since 3.0.0)</a></li>
<li><a name="toc-_002denable_002dhax-_0028since-3_002e0_002e0_0029" href="#g_t_002denable_002dhax-_0028since-3_002e0_002e0_0029">B.2.23 -enable-hax (since 3.0.0)</a></li>
<li><a name="toc-_002ddrive-file_003djson_003a_007b_002e_002e_002e_007b_0027driver_0027_003a_0027file_0027_007d_007d-_0028since-3_002e0_0029" href="#g_t_002ddrive-file_003djson_003a_007b_002e_002e_002e_007b_0027driver_0027_003a_0027file_0027_007d_007d-_0028since-3_002e0_0029">B.2.24 -drive file=json:{...{&rsquo;driver&rsquo;:&rsquo;file&rsquo;}} (since 3.0)</a></li>
</ul></li>
<li><a name="toc-QEMU-Machine-Protocol-_0028QMP_0029-commands" href="#QEMU-Machine-Protocol-_0028QMP_0029-commands">B.3 QEMU Machine Protocol (QMP) commands</a>
<ul class="no-bullet">
<li><a name="toc-block_002ddirty_002dbitmap_002dadd-_0022autoload_0022-parameter-_0028since-2_002e12_002e0_0029" href="#block_002ddirty_002dbitmap_002dadd-_0022autoload_0022-parameter-_0028since-2_002e12_002e0_0029">B.3.1 block-dirty-bitmap-add &quot;autoload&quot; parameter (since 2.12.0)</a></li>
<li><a name="toc-query_002dcpus-_0028since-2_002e12_002e0_0029" href="#query_002dcpus-_0028since-2_002e12_002e0_0029">B.3.2 query-cpus (since 2.12.0)</a></li>
<li><a name="toc-query_002dcpus_002dfast-_0022arch_0022-output-member-_0028since-3_002e0_002e0_0029" href="#query_002dcpus_002dfast-_0022arch_0022-output-member-_0028since-3_002e0_002e0_0029">B.3.3 query-cpus-fast &quot;arch&quot; output member (since 3.0.0)</a></li>
</ul></li>
<li><a name="toc-System-emulator-devices" href="#System-emulator-devices">B.4 System emulator devices</a>
<ul class="no-bullet">
<li><a name="toc-ivshmem-_0028since-2_002e6_002e0_0029" href="#ivshmem-_0028since-2_002e6_002e0_0029">B.4.1 ivshmem (since 2.6.0)</a></li>
<li><a name="toc-Page-size-support-_003c-4k-for-embedded-PowerPC-CPUs-_0028since-2_002e12_002e0_0029" href="#Page-size-support-_003c-4k-for-embedded-PowerPC-CPUs-_0028since-2_002e12_002e0_0029">B.4.2 Page size support &lt; 4k for embedded PowerPC CPUs (since 2.12.0)</a></li>
</ul></li>
<li><a name="toc-System-emulator-machines" href="#System-emulator-machines">B.5 System emulator machines</a>
<ul class="no-bullet">
<li><a name="toc-pc_002d0_002e10-and-pc_002d0_002e11-_0028since-3_002e0_0029" href="#pc_002d0_002e10-and-pc_002d0_002e11-_0028since-3_002e0_0029">B.5.1 pc-0.10 and pc-0.11 (since 3.0)</a></li>
</ul></li>
<li><a name="toc-Device-options" href="#Device-options">B.6 Device options</a>
<ul class="no-bullet">
<li><a name="toc-Block-device-options-1" href="#Block-device-options-1">B.6.1 Block device options</a>
<ul class="no-bullet">
<li><a name="toc-_0022backing_0022_003a-_0022_0022-_0028since-2_002e12_002e0_0029" href="#g_t_0022backing_0022_003a-_0022_0022-_0028since-2_002e12_002e0_0029">B.6.1.1 &quot;backing&quot;: &quot;&quot; (since 2.12.0)</a></li>
</ul></li>
<li><a name="toc-vio_002dspapr_002ddevice-device-options" href="#vio_002dspapr_002ddevice-device-options">B.6.2 vio-spapr-device device options</a>
<ul class="no-bullet">
<li><a name="toc-_0022irq_0022_003a-_0022_0022-_0028since-3_002e0_002e0_0029" href="#g_t_0022irq_0022_003a-_0022_0022-_0028since-3_002e0_002e0_0029">B.6.2.1 &quot;irq&quot;: &quot;&quot; (since 3.0.0)</a></li>
</ul></li>
</ul></li>
</ul></li>
<li><a name="toc-Supported-build-platforms-1" href="#Supported-build-platforms">Appendix C Supported build platforms</a>
<ul class="no-bullet">
<li><a name="toc-Linux-OS" href="#Linux-OS">C.1 Linux OS</a></li>
<li><a name="toc-Windows-2" href="#Windows-2">C.2 Windows</a></li>
<li><a name="toc-macOS" href="#macOS">C.3 macOS</a></li>
<li><a name="toc-FreeBSD" href="#FreeBSD">C.4 FreeBSD</a></li>
<li><a name="toc-NetBSD" href="#NetBSD">C.5 NetBSD</a></li>
<li><a name="toc-OpenBSD" href="#OpenBSD">C.6 OpenBSD</a></li>
</ul></li>
<li><a name="toc-License-1" href="#License">Appendix D License</a></li>
<li><a name="toc-Index-1" href="#Index">Appendix E Index</a>
<ul class="no-bullet">
<li><a name="toc-Concept-Index-1" href="#Concept-Index">E.1 Concept Index</a></li>
<li><a name="toc-Function-Index-1" href="#Function-Index">E.2 Function Index</a></li>
<li><a name="toc-Keystroke-Index-1" href="#Keystroke-Index">E.3 Keystroke Index</a></li>
<li><a name="toc-Program-Index-1" href="#Program-Index">E.4 Program Index</a></li>
<li><a name="toc-Data-Type-Index-1" href="#Data-Type-Index">E.5 Data Type Index</a></li>
<li><a name="toc-Variable-Index-1" href="#Variable-Index">E.6 Variable Index</a></li>
</ul></li>
</ul>
</div>
<hr>
<a name="Introduction"></a>
<a name="Introduction-1"></a>
<h2 class="chapter">1 Introduction</h2>
<hr>
<a name="intro_005ffeatures"></a>
<a name="Features-1"></a>
<h3 class="section">1.1 Features</h3>
<p>QEMU is a FAST! processor emulator using dynamic translation to
achieve good emulation speed.
</p>
<a name="index-operating-modes"></a>
<p>QEMU has two operating modes:
</p>
<ul>
<li> <a name="index-system-emulation"></a>
Full system emulation. In this mode, QEMU emulates a full system (for
example a PC), including one or several processors and various
peripherals. It can be used to launch different Operating Systems
without rebooting the PC or to debug system code.
</li><li> <a name="index-user-mode-emulation"></a>
User mode emulation. In this mode, QEMU can launch
processes compiled for one CPU on another CPU. It can be used to
launch the Wine Windows API emulator (<a href="https://www.winehq.org">https://www.winehq.org</a>) or
to ease cross-compilation and cross-debugging.
</li></ul>
<p>QEMU has the following features:
</p>
<ul>
<li> QEMU can run without a host kernel driver and yet gives acceptable
performance. It uses dynamic translation to native code for reasonable speed,
with support for self-modifying code and precise exceptions.
</li><li> It is portable to several operating systems (GNU/Linux, *BSD, Mac OS X,
Windows) and architectures.
</li><li> It performs accurate software emulation of the FPU.
</li></ul>
<p>QEMU user mode emulation has the following features:
</p><ul>
<li> Generic Linux system call converter, including most ioctls.
</li><li> clone() emulation using native CPU clone() to use Linux scheduler for threads.
</li><li> Accurate signal handling by remapping host signals to target signals.
</li></ul>
<p>QEMU full system emulation has the following features:
</p><ul>
<li> QEMU uses a full software MMU for maximum portability.
</li><li> QEMU can optionally use an in-kernel accelerator, like kvm. The accelerators
execute most of the guest code natively, while
continuing to emulate the rest of the machine.
</li><li> Various hardware devices can be emulated and in some cases, host
devices (e.g. serial and parallel ports, USB, drives) can be used
transparently by the guest Operating System. Host device passthrough
can be used for talking to external physical peripherals (e.g. a
webcam, modem or tape drive).
</li><li> Symmetric multiprocessing (SMP) support. Currently, an in-kernel
accelerator is required to use more than one host CPU for emulation.
</li></ul>
<hr>
<a name="QEMU-PC-System-emulator"></a>
<a name="QEMU-PC-System-emulator-1"></a>
<h2 class="chapter">2 QEMU PC System emulator</h2>
<a name="index-system-emulation-_0028PC_0029"></a>
<hr>
<a name="pcsys_005fintroduction"></a>
<a name="Introduction-2"></a>
<h3 class="section">2.1 Introduction</h3>
<p>The QEMU PC System emulator simulates the
following peripherals:
</p>
<ul class="no-bullet">
<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 and ISA network adapters
</li><li>- Serial ports
</li><li>- IPMI BMC, either and internal or external one
</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>- Intel HD Audio Controller and HDA codec
</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, OHCI, EHCI or XHCI USB controller and a virtual USB-1.1 hub.
</li></ul>
<p>SMP is supported with up to 255 CPUs.
</p>
<p>QEMU uses the PC BIOS from the Seabios 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>Note that, by default, GUS shares IRQ(7) with parallel ports and so
QEMU must be told to not have parallel ports to have working GUS.
</p>
<div class="example">
<pre class="example">qemu-system-i386 dos.img -soundhw gus -parallel none
</pre></div>
<p>Alternatively:
</p><div class="example">
<pre class="example">qemu-system-i386 dos.img -device gus,irq=5
</pre></div>
<p>Or some other unclaimed IRQ.
</p>
<p>CS4231A is the chip used in Windows Sound System and GUSMAX products
</p>
<hr>
<a name="pcsys_005fquickstart"></a>
<a name="Quick-Start-1"></a>
<h3 class="section">2.2 Quick Start</h3>
<a name="index-quick-start"></a>
<p>Download and uncompress the linux image (<samp>linux.img</samp>) and type:
</p>
<div class="example">
<pre class="example">qemu-system-i386 linux.img
</pre></div>
<p>Linux should boot and give you a prompt.
</p>
<hr>
<a name="sec_005finvocation"></a>
<a name="Invocation"></a>
<h3 class="section">2.3 Invocation</h3>
<div class="example">
<pre class="example"><code>qemu-system-i386</code> [<var>options</var>] [<var>disk_image</var>]
</pre></div>
<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>
<a name="Standard-options"></a>
<h4 class="subsection">2.3.1 Standard options</h4>
<dl compact="compact">
<dt><samp>-h</samp></dt>
<dd><a name="index-_002dh"></a>
<p>Display help and exit
</p></dd>
<dt><samp>-version</samp></dt>
<dd><a name="index-_002dversion"></a>
<p>Display version information and exit
</p></dd>
<dt><samp>-machine [type=]<var>name</var>[,prop=<var>value</var>[,...]]</samp></dt>
<dd><a name="index-_002dmachine"></a>
<p>Select the emulated machine by <var>name</var>. Use <code>-machine help</code> to list
available machines.
</p>
<p>For architectures which aim to support live migration compatibility
across releases, each release will introduce a new versioned machine
type. For example, the 2.8.0 release introduced machine types
&ldquo;pc-i440fx-2.8&rdquo; and &ldquo;pc-q35-2.8&rdquo; for the x86_64/i686 architectures.
</p>
<p>To allow live migration of guests from QEMU version 2.8.0, to QEMU
version 2.9.0, the 2.9.0 version must support the &ldquo;pc-i440fx-2.8&rdquo;
and &ldquo;pc-q35-2.8&rdquo; machines too. To allow users live migrating VMs
to skip multiple intermediate releases when upgrading, new releases
of QEMU will support machine types from many previous versions.
</p>
<p>Supported machine properties are:
</p><dl compact="compact">
<dt><samp>accel=<var>accels1</var>[:<var>accels2</var>[:...]]</samp></dt>
<dd><p>This is used to enable an accelerator. Depending on the target architecture,
kvm, xen, hax, hvf, whpx or tcg can be available. By default, tcg is used. If there is
more than one accelerator specified, the next one is used if the previous one
fails to initialize.
</p></dd>
<dt><samp>kernel_irqchip=on|off</samp></dt>
<dd><p>Controls in-kernel irqchip support for the chosen accelerator when available.
</p></dd>
<dt><samp>gfx_passthru=on|off</samp></dt>
<dd><p>Enables IGD GFX passthrough support for the chosen machine when available.
</p></dd>
<dt><samp>vmport=on|off|auto</samp></dt>
<dd><p>Enables emulation of VMWare IO port, for vmmouse etc. auto says to select the
value based on accel. For accel=xen the default is off otherwise the default
is on.
</p></dd>
<dt><samp>kvm_shadow_mem=size</samp></dt>
<dd><p>Defines the size of the KVM shadow MMU.
</p></dd>
<dt><samp>dump-guest-core=on|off</samp></dt>
<dd><p>Include guest memory in a core dump. The default is on.
</p></dd>
<dt><samp>mem-merge=on|off</samp></dt>
<dd><p>Enables or disables memory merge support. This feature, when supported by
the host, de-duplicates identical memory pages among VMs instances
(enabled by default).
</p></dd>
<dt><samp>aes-key-wrap=on|off</samp></dt>
<dd><p>Enables or disables AES key wrapping support on s390-ccw hosts. This feature
controls whether AES wrapping keys will be created to allow
execution of AES cryptographic functions. The default is on.
</p></dd>
<dt><samp>dea-key-wrap=on|off</samp></dt>
<dd><p>Enables or disables DEA key wrapping support on s390-ccw hosts. This feature
controls whether DEA wrapping keys will be created to allow
execution of DEA cryptographic functions. The default is on.
</p></dd>
<dt><samp>nvdimm=on|off</samp></dt>
<dd><p>Enables or disables NVDIMM support. The default is off.
</p></dd>
<dt><samp>s390-squash-mcss=on|off</samp></dt>
<dd><p>Enables or disables squashing subchannels into the default css.
The default is off.
NOTE: This property is deprecated and will be removed in future releases.
The &ldquo;s390-squash-mcss=on&ldquo; property has been obsoleted by allowing the
cssid to be chosen freely. Instead of squashing subchannels into the
default channel subsystem image for guests that do not support multiple
channel subsystems, all devices can be put into the default channel
subsystem image.
</p></dd>
<dt><samp>enforce-config-section=on|off</samp></dt>
<dd><p>If <samp>enforce-config-section</samp> is set to <var>on</var>, force migration
code to send configuration section even if the machine-type sets the
<samp>migration.send-configuration</samp> property to <var>off</var>.
NOTE: this parameter is deprecated. Please use <samp>-global</samp>
<samp>migration.send-configuration</samp>=<var>on|off</var> instead.
</p></dd>
<dt><samp>memory-encryption=<var></var></samp></dt>
<dd><p>Memory encryption object to use. The default is none.
</p></dd>
</dl>
</dd>
<dt><samp>-cpu <var>model</var></samp></dt>
<dd><a name="index-_002dcpu"></a>
<p>Select CPU model (<code>-cpu help</code> for list and additional feature selection)
</p></dd>
<dt><samp>-accel <var>name</var>[,prop=<var>value</var>[,...]]</samp></dt>
<dd><a name="index-_002daccel"></a>
<p>This is used to enable an accelerator. Depending on the target architecture,
kvm, xen, hax, hvf, whpx or tcg can be available. By default, tcg is used. If there is
more than one accelerator specified, the next one is used if the previous one
fails to initialize.
</p><dl compact="compact">
<dt><samp>thread=single|multi</samp></dt>
<dd><p>Controls number of TCG threads. When the TCG is multi-threaded there will be one
thread per vCPU therefor taking advantage of additional host cores. The default
is to enable multi-threading where both the back-end and front-ends support it and
no incompatible TCG features have been enabled (e.g. icount/replay).
</p></dd>
</dl>
</dd>
<dt><samp>-smp [cpus=]<var>n</var>[,cores=<var>cores</var>][,threads=<var>threads</var>][,sockets=<var>sockets</var>][,maxcpus=<var>maxcpus</var>]</samp></dt>
<dd><a name="index-_002dsmp"></a>
<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.
For the PC target, the number of <var>cores</var> per socket, the number
of <var>threads</var> per cores and the total number of <var>sockets</var> can be
specified. Missing values will be computed. If any on the three values is
given, the total number of CPUs <var>n</var> can be omitted. <var>maxcpus</var>
specifies the maximum number of hotpluggable CPUs.
</p></dd>
<dt><samp>-numa node[,mem=<var>size</var>][,cpus=<var>firstcpu</var>[-<var>lastcpu</var>]][,nodeid=<var>node</var>]</samp></dt>
<dt><samp>-numa node[,memdev=<var>id</var>][,cpus=<var>firstcpu</var>[-<var>lastcpu</var>]][,nodeid=<var>node</var>]</samp></dt>
<dt><samp>-numa dist,src=<var>source</var>,dst=<var>destination</var>,val=<var>distance</var></samp></dt>
<dt><samp>-numa cpu,node-id=<var>node</var>[,socket-id=<var>x</var>][,core-id=<var>y</var>][,thread-id=<var>z</var>]</samp></dt>
<dd><a name="index-_002dnuma"></a>
<p>Define a NUMA node and assign RAM and VCPUs to it.
Set the NUMA distance from a source node to a destination node.
</p>
<p>Legacy VCPU assignment uses &lsquo;<samp>cpus</samp>&rsquo; option where
<var>firstcpu</var> and <var>lastcpu</var> are CPU indexes. Each
&lsquo;<samp>cpus</samp>&rsquo; option represent a contiguous range of CPU indexes
(or a single VCPU if <var>lastcpu</var> is omitted). A non-contiguous
set of VCPUs can be represented by providing multiple &lsquo;<samp>cpus</samp>&rsquo;
options. If &lsquo;<samp>cpus</samp>&rsquo; is omitted on all nodes, VCPUs are automatically
split between them.
</p>
<p>For example, the following option assigns VCPUs 0, 1, 2 and 5 to
a NUMA node:
</p><div class="example">
<pre class="example">-numa node,cpus=0-2,cpus=5
</pre></div>
<p>&lsquo;<samp>cpu</samp>&rsquo; option is a new alternative to &lsquo;<samp>cpus</samp>&rsquo; option
which uses &lsquo;<samp>socket-id|core-id|thread-id</samp>&rsquo; properties to assign
CPU objects to a <var>node</var> using topology layout properties of CPU.
The set of properties is machine specific, and depends on used
machine type/&lsquo;<samp>smp</samp>&rsquo; options. It could be queried with
&lsquo;<samp>hotpluggable-cpus</samp>&rsquo; monitor command.
&lsquo;<samp>node-id</samp>&rsquo; property specifies <var>node</var> to which CPU object
will be assigned, it&rsquo;s required for <var>node</var> to be declared
with &lsquo;<samp>node</samp>&rsquo; option before it&rsquo;s used with &lsquo;<samp>cpu</samp>&rsquo; option.
</p>
<p>For example:
</p><div class="example">
<pre class="example">-M pc \
-smp 1,sockets=2,maxcpus=2 \
-numa node,nodeid=0 -numa node,nodeid=1 \
-numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1
</pre></div>
<p>&lsquo;<samp>mem</samp>&rsquo; assigns a given RAM amount to a node. &lsquo;<samp>memdev</samp>&rsquo;
assigns RAM from a given memory backend device to a node. If
&lsquo;<samp>mem</samp>&rsquo; and &lsquo;<samp>memdev</samp>&rsquo; are omitted in all nodes, RAM is
split equally between them.
</p>
<p>&lsquo;<samp>mem</samp>&rsquo; and &lsquo;<samp>memdev</samp>&rsquo; are mutually exclusive. Furthermore,
if one node uses &lsquo;<samp>memdev</samp>&rsquo;, all of them have to use it.
</p>
<p><var>source</var> and <var>destination</var> are NUMA node IDs.
<var>distance</var> is the NUMA distance from <var>source</var> to <var>destination</var>.
The distance from a node to itself is always 10. If any pair of nodes is
given a distance, then all pairs must be given distances. Although, when
distances are only given in one direction for each pair of nodes, then
the distances in the opposite directions are assumed to be the same. If,
however, an asymmetrical pair of distances is given for even one node
pair, then all node pairs must be provided distance values for both
directions, even when they are symmetrical. When a node is unreachable
from another node, set the pair&rsquo;s distance to 255.
</p>
<p>Note that the -<samp>numa</samp> option doesn&rsquo;t allocate any of the
specified resources, it just assigns existing resources to NUMA
nodes. This means that one still has to use the <samp>-m</samp>,
<samp>-smp</samp> options to allocate RAM and VCPUs respectively.
</p>
</dd>
<dt><samp>-add-fd fd=<var>fd</var>,set=<var>set</var>[,opaque=<var>opaque</var>]</samp></dt>
<dd><a name="index-_002dadd_002dfd"></a>
<p>Add a file descriptor to an fd set. Valid options are:
</p>
<dl compact="compact">
<dt><samp>fd=<var>fd</var></samp></dt>
<dd><p>This option defines the file descriptor of which a duplicate is added to fd set.
The file descriptor cannot be stdin, stdout, or stderr.
</p></dd>
<dt><samp>set=<var>set</var></samp></dt>
<dd><p>This option defines the ID of the fd set to add the file descriptor to.
</p></dd>
<dt><samp>opaque=<var>opaque</var></samp></dt>
<dd><p>This option defines a free-form string that can be used to describe <var>fd</var>.
</p></dd>
</dl>
<p>You can open an image using pre-opened file descriptors from an fd set:
</p><div class="example">
<pre class="example">qemu-system-i386
-add-fd fd=3,set=2,opaque=&quot;rdwr:/path/to/file&quot;
-add-fd fd=4,set=2,opaque=&quot;rdonly:/path/to/file&quot;
-drive file=/dev/fdset/2,index=0,media=disk
</pre></div>
</dd>
<dt><samp>-set <var>group</var>.<var>id</var>.<var>arg</var>=<var>value</var></samp></dt>
<dd><a name="index-_002dset"></a>
<p>Set parameter <var>arg</var> for item <var>id</var> of type <var>group</var>
</p></dd>
<dt><samp>-global <var>driver</var>.<var>prop</var>=<var>value</var></samp></dt>
<dt><samp>-global driver=<var>driver</var>,property=<var>property</var>,value=<var>value</var></samp></dt>
<dd><a name="index-_002dglobal"></a>
<p>Set default value of <var>driver</var>&rsquo;s property <var>prop</var> to <var>value</var>, e.g.:
</p>
<div class="example">
<pre class="example">qemu-system-i386 -global ide-hd.physical_block_size=4096 disk-image.img
</pre></div>
<p>In particular, you can use this to set driver properties for devices which are
created automatically by the machine model. To create a device which is not
created automatically and set properties on it, use -<samp>device</samp>.
</p>
<p>-global <var>driver</var>.<var>prop</var>=<var>value</var> is shorthand for -global
driver=<var>driver</var>,property=<var>prop</var>,value=<var>value</var>. The
longhand syntax works even when <var>driver</var> contains a dot.
</p></dd>
<dt><samp>-boot [order=<var>drives</var>][,once=<var>drives</var>][,menu=on|off][,splash=<var>sp_name</var>][,splash-time=<var>sp_time</var>][,reboot-timeout=<var>rb_timeout</var>][,strict=on|off]</samp></dt>
<dd><a name="index-_002dboot"></a>
<p>Specify boot order <var>drives</var> as a string of drive letters. Valid
drive letters depend on the target architecture. The x86 PC uses: a, b
(floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot
from network adapter 1-4), hard disk boot is the default. To apply a
particular boot order only on the first startup, specify it via
<samp>once</samp>. Note that the <samp>order</samp> or <samp>once</samp> parameter
should not be used together with the <samp>bootindex</samp> property of
devices, since the firmware implementations normally do not support both
at the same time.
</p>
<p>Interactive boot menus/prompts can be enabled via <samp>menu=on</samp> as far
as firmware/BIOS supports them. The default is non-interactive boot.
</p>
<p>A splash picture could be passed to bios, enabling user to show it as logo,
when option splash=<var>sp_name</var> is given and menu=on, If firmware/BIOS
supports them. Currently Seabios for X86 system support it.
limitation: The splash file could be a jpeg file or a BMP file in 24 BPP
format(true color). The resolution should be supported by the SVGA mode, so
the recommended is 320x240, 640x480, 800x640.
</p>
<p>A timeout could be passed to bios, guest will pause for <var>rb_timeout</var> ms
when boot failed, then reboot. If <var>rb_timeout</var> is &rsquo;-1&rsquo;, guest will not
reboot, qemu passes &rsquo;-1&rsquo; to bios by default. Currently Seabios for X86
system support it.
</p>
<p>Do strict boot via <samp>strict=on</samp> as far as firmware/BIOS
supports it. This only effects when boot priority is changed by
bootindex options. The default is non-strict boot.
</p>
<div class="example">
<pre class="example"># try to boot from network first, then from hard disk
qemu-system-i386 -boot order=nc
# boot from CD-ROM first, switch back to default order after reboot
qemu-system-i386 -boot once=d
# boot with a splash picture for 5 seconds.
qemu-system-i386 -boot menu=on,splash=/root/boot.bmp,splash-time=5000
</pre></div>
<p>Note: The legacy format &rsquo;-boot <var>drives</var>&rsquo; is still supported but its
use is discouraged as it may be removed from future versions.
</p></dd>
<dt><samp>-m [size=]<var>megs</var>[,slots=n,maxmem=size]</samp></dt>
<dd><a name="index-_002dm"></a>
<p>Sets guest startup 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. Optional pair <var>slots</var>, <var>maxmem</var>
could be used to set amount of hotpluggable memory slots and maximum amount of
memory. Note that <var>maxmem</var> must be aligned to the page size.
</p>
<p>For example, the following command-line sets the guest startup RAM size to
1GB, creates 3 slots to hotplug additional memory and sets the maximum
memory the guest can reach to 4GB:
</p>
<div class="example">
<pre class="example">qemu-system-x86_64 -m 1G,slots=3,maxmem=4G
</pre></div>
<p>If <var>slots</var> and <var>maxmem</var> are not specified, memory hotplug won&rsquo;t
be enabled and the guest startup RAM will never increase.
</p></dd>
<dt><samp>-mem-path <var>path</var></samp></dt>
<dd><a name="index-_002dmem_002dpath"></a>
<p>Allocate guest RAM from a temporarily created file in <var>path</var>.
</p></dd>
<dt><samp>-mem-prealloc</samp></dt>
<dd><a name="index-_002dmem_002dprealloc"></a>
<p>Preallocate memory when using -mem-path.
</p></dd>
<dt><samp>-k <var>language</var></samp></dt>
<dd><a name="index-_002dk"></a>
<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 or curses
display). You don&rsquo;t normally need to use it on PC/Linux or PC/Windows
hosts.
</p>
<p>The available layouts are:
</p><div class="example">
<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></div>
<p>The default is <code>en-us</code>.
</p></dd>
<dt><samp>-audio-help</samp></dt>
<dd><a name="index-_002daudio_002dhelp"></a>
<p>Will show the audio subsystem help: list of drivers, tunable
parameters.
</p></dd>
<dt><samp>-soundhw <var>card1</var>[,<var>card2</var>,...] or -soundhw all</samp></dt>
<dd><a name="index-_002dsoundhw"></a>
<p>Enable audio and selected sound hardware. Use &rsquo;help&rsquo; to print all
available sound hardware.
</p>
<div class="example">
<pre class="example">qemu-system-i386 -soundhw sb16,adlib disk.img
qemu-system-i386 -soundhw es1370 disk.img
qemu-system-i386 -soundhw ac97 disk.img
qemu-system-i386 -soundhw hda disk.img
qemu-system-i386 -soundhw all disk.img
qemu-system-i386 -soundhw help
</pre></div>
<p>Note that Linux&rsquo;s i810_audio OSS kernel (for AC97) module might
require manually specifying clocking.
</p>
<div class="example">
<pre class="example">modprobe i810_audio clocking=48000
</pre></div>
</dd>
<dt><samp>-balloon virtio[,addr=<var>addr</var>]</samp></dt>
<dd><a name="index-_002dballoon"></a>
<p>Enable virtio balloon device, optionally with PCI address <var>addr</var>. This
option is deprecated, use <samp>-device virtio-balloon</samp> instead.
</p></dd>
<dt><samp>-device <var>driver</var>[,<var>prop</var>[=<var>value</var>][,...]]</samp></dt>
<dd><a name="index-_002ddevice"></a>
<p>Add device <var>driver</var>. <var>prop</var>=<var>value</var> sets driver
properties. Valid properties depend on the driver. To get help on
possible drivers and properties, use <code>-device help</code> and
<code>-device <var>driver</var>,help</code>.
</p>
<p>Some drivers are:
</p></dd>
<dt><samp>-device ipmi-bmc-sim,id=<var>id</var>[,slave_addr=<var>val</var>][,sdrfile=<var>file</var>][,furareasize=<var>val</var>][,furdatafile=<var>file</var>]</samp></dt>
<dd>
<p>Add an IPMI BMC. This is a simulation of a hardware management
interface processor that normally sits on a system. It provides
a watchdog and the ability to reset and power control the system.
You need to connect this to an IPMI interface to make it useful
</p>
<p>The IPMI slave address to use for the BMC. The default is 0x20.
This address is the BMC&rsquo;s address on the I2C network of management
controllers. If you don&rsquo;t know what this means, it is safe to ignore
it.
</p>
<dl compact="compact">
<dt><samp>bmc=<var>id</var></samp></dt>
<dd><p>The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
</p></dd>
<dt><samp>slave_addr=<var>val</var></samp></dt>
<dd><p>Define slave address to use for the BMC. The default is 0x20.
</p></dd>
<dt><samp>sdrfile=<var>file</var></samp></dt>
<dd><p>file containing raw Sensor Data Records (SDR) data. The default is none.
</p></dd>
<dt><samp>fruareasize=<var>val</var></samp></dt>
<dd><p>size of a Field Replaceable Unit (FRU) area. The default is 1024.
</p></dd>
<dt><samp>frudatafile=<var>file</var></samp></dt>
<dd><p>file containing raw Field Replaceable Unit (FRU) inventory data. The default is none.
</p></dd>
</dl>
</dd>
<dt><samp>-device ipmi-bmc-extern,id=<var>id</var>,chardev=<var>id</var>[,slave_addr=<var>val</var>]</samp></dt>
<dd>
<p>Add a connection to an external IPMI BMC simulator. Instead of
locally emulating the BMC like the above item, instead connect
to an external entity that provides the IPMI services.
</p>
<p>A connection is made to an external BMC simulator. If you do this, it
is strongly recommended that you use the &quot;reconnect=&quot; chardev option
to reconnect to the simulator if the connection is lost. Note that if
this is not used carefully, it can be a security issue, as the
interface has the ability to send resets, NMIs, and power off the VM.
It&rsquo;s best if QEMU makes a connection to an external simulator running
on a secure port on localhost, so neither the simulator nor QEMU is
exposed to any outside network.
</p>
<p>See the &quot;lanserv/README.vm&quot; file in the OpenIPMI library for more
details on the external interface.
</p>
</dd>
<dt><samp>-device isa-ipmi-kcs,bmc=<var>id</var>[,ioport=<var>val</var>][,irq=<var>val</var>]</samp></dt>
<dd>
<p>Add a KCS IPMI interafce on the ISA bus. This also adds a
corresponding ACPI and SMBIOS entries, if appropriate.
</p>
<dl compact="compact">
<dt><samp>bmc=<var>id</var></samp></dt>
<dd><p>The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
</p></dd>
<dt><samp>ioport=<var>val</var></samp></dt>
<dd><p>Define the I/O address of the interface. The default is 0xca0 for KCS.
</p></dd>
<dt><samp>irq=<var>val</var></samp></dt>
<dd><p>Define the interrupt to use. The default is 5. To disable interrupts,
set this to 0.
</p></dd>
</dl>
</dd>
<dt><samp>-device isa-ipmi-bt,bmc=<var>id</var>[,ioport=<var>val</var>][,irq=<var>val</var>]</samp></dt>
<dd>
<p>Like the KCS interface, but defines a BT interface. The default port is
0xe4 and the default interrupt is 5.
</p>
</dd>
<dt><samp>-name <var>name</var></samp></dt>
<dd><a name="index-_002dname"></a>
<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.
Also optionally set the top visible process name in Linux.
Naming of individual threads can also be enabled on Linux to aid debugging.
</p></dd>
<dt><samp>-uuid <var>uuid</var></samp></dt>
<dd><a name="index-_002duuid"></a>
<p>Set system UUID.
</p></dd>
</dl>
<a name="Block-device-options"></a>
<h4 class="subsection">2.3.2 Block device options</h4>
<dl compact="compact">
<dt><samp>-fda <var>file</var></samp></dt>
<dt><samp>-fdb <var>file</var></samp></dt>
<dd><a name="index-_002dfda"></a>
<a name="index-_002dfdb"></a>
<p>Use <var>file</var> as floppy disk 0/1 image (see <a href="#disk_005fimages">disk_images</a>).
</p></dd>
<dt><samp>-hda <var>file</var></samp></dt>
<dt><samp>-hdb <var>file</var></samp></dt>
<dt><samp>-hdc <var>file</var></samp></dt>
<dt><samp>-hdd <var>file</var></samp></dt>
<dd><a name="index-_002dhda"></a>
<a name="index-_002dhdb"></a>
<a name="index-_002dhdc"></a>
<a name="index-_002dhdd"></a>
<p>Use <var>file</var> as hard disk 0, 1, 2 or 3 image (see <a href="#disk_005fimages">disk_images</a>).
</p></dd>
<dt><samp>-cdrom <var>file</var></samp></dt>
<dd><a name="index-_002dcdrom"></a>
<p>Use <var>file</var> as CD-ROM image (you cannot use <samp>-hdc</samp> and
<samp>-cdrom</samp> at the same time). You can use the host CD-ROM by
using <samp>/dev/cdrom</samp> as filename (see <a href="#host_005fdrives">host_drives</a>).
</p></dd>
<dt><samp>-blockdev <var>option</var>[,<var>option</var>[,<var>option</var>[,...]]]</samp></dt>
<dd><a name="index-_002dblockdev"></a>
<p>Define a new block driver node. Some of the options apply to all block drivers,
other options are only accepted for a specific block driver. See below for a
list of generic options and options for the most common block drivers.
</p>
<p>Options that expect a reference to another node (e.g. <code>file</code>) can be
given in two ways. Either you specify the node name of an already existing node
(file=<var>node-name</var>), or you define a new node inline, adding options
for the referenced node after a dot (file.filename=<var>path</var>,file.aio=native).
</p>
<p>A block driver node created with <samp>-blockdev</samp> can be used for a guest
device by specifying its node name for the <code>drive</code> property in a
<samp>-device</samp> argument that defines a block device.
</p>
<dl compact="compact">
<dt><samp>Valid options for any block driver node:</samp></dt>
<dd>
<dl compact="compact">
<dt><code>driver</code></dt>
<dd><p>Specifies the block driver to use for the given node.
</p></dd>
<dt><code>node-name</code></dt>
<dd><p>This defines the name of the block driver node by which it will be referenced
later. The name must be unique, i.e. it must not match the name of a different
block driver node, or (if you use <samp>-drive</samp> as well) the ID of a drive.
</p>
<p>If no node name is specified, it is automatically generated. The generated node
name is not intended to be predictable and changes between QEMU invocations.
For the top level, an explicit node name must be specified.
</p></dd>
<dt><code>read-only</code></dt>
<dd><p>Open the node read-only. Guest write attempts will fail.
</p></dd>
<dt><code>cache.direct</code></dt>
<dd><p>The host page cache can be avoided with <samp>cache.direct=on</samp>. This will
attempt to do disk IO directly to the guest&rsquo;s memory. QEMU may still perform an
internal copy of the data.
</p></dd>
<dt><code>cache.no-flush</code></dt>
<dd><p>In case you don&rsquo;t care about data integrity over host failures, you can use
<samp>cache.no-flush=on</samp>. This option tells QEMU that it never needs to write
any data to the disk but can instead keep things in cache. If anything goes
wrong, like your host losing power, the disk storage getting disconnected
accidentally, etc. your image will most probably be rendered unusable.
</p></dd>
<dt><code>discard=<var>discard</var></code></dt>
<dd><p><var>discard</var> is one of &quot;ignore&quot; (or &quot;off&quot;) or &quot;unmap&quot; (or &quot;on&quot;) and controls
whether <code>discard</code> (also known as <code>trim</code> or <code>unmap</code>) requests are
ignored or passed to the filesystem. Some machine types may not support
discard requests.
</p></dd>
<dt><code>detect-zeroes=<var>detect-zeroes</var></code></dt>
<dd><p><var>detect-zeroes</var> is &quot;off&quot;, &quot;on&quot; or &quot;unmap&quot; and enables the automatic
conversion of plain zero writes by the OS to driver specific optimized
zero write commands. You may even choose &quot;unmap&quot; if <var>discard</var> is set
to &quot;unmap&quot; to allow a zero write to be converted to an <code>unmap</code> operation.
</p></dd>
</dl>
</dd>
<dt><samp>Driver-specific options for <code>file</code></samp></dt>
<dd>
<p>This is the protocol-level block driver for accessing regular files.
</p>
<dl compact="compact">
<dt><code>filename</code></dt>
<dd><p>The path to the image file in the local filesystem
</p></dd>
<dt><code>aio</code></dt>
<dd><p>Specifies the AIO backend (threads/native, default: threads)
</p></dd>
<dt><code>locking</code></dt>
<dd><p>Specifies whether the image file is protected with Linux OFD / POSIX locks. The
default is to use the Linux Open File Descriptor API if available, otherwise no
lock is applied. (auto/on/off, default: auto)
</p></dd>
</dl>
<p>Example:
</p><div class="example">
<pre class="example">-blockdev driver=file,node-name=disk,filename=disk.img
</pre></div>
</dd>
<dt><samp>Driver-specific options for <code>raw</code></samp></dt>
<dd>
<p>This is the image format block driver for raw images. It is usually
stacked on top of a protocol level block driver such as <code>file</code>.
</p>
<dl compact="compact">
<dt><code>file</code></dt>
<dd><p>Reference to or definition of the data source block driver node
(e.g. a <code>file</code> driver node)
</p></dd>
</dl>
<p>Example 1:
</p><div class="example">
<pre class="example">-blockdev driver=file,node-name=disk_file,filename=disk.img
-blockdev driver=raw,node-name=disk,file=disk_file
</pre></div>
<p>Example 2:
</p><div class="example">
<pre class="example">-blockdev driver=raw,node-name=disk,file.driver=file,file.filename=disk.img
</pre></div>
</dd>
<dt><samp>Driver-specific options for <code>qcow2</code></samp></dt>
<dd>
<p>This is the image format block driver for qcow2 images. It is usually
stacked on top of a protocol level block driver such as <code>file</code>.
</p>
<dl compact="compact">
<dt><code>file</code></dt>
<dd><p>Reference to or definition of the data source block driver node
(e.g. a <code>file</code> driver node)
</p>
</dd>
<dt><code>backing</code></dt>
<dd><p>Reference to or definition of the backing file block device (default is taken
from the image file). It is allowed to pass <code>null</code> here in order to disable
the default backing file.
</p>
</dd>
<dt><code>lazy-refcounts</code></dt>
<dd><p>Whether to enable the lazy refcounts feature (on/off; default is taken from the
image file)
</p>
</dd>
<dt><code>cache-size</code></dt>
<dd><p>The maximum total size of the L2 table and refcount block caches in bytes
(default: 1048576 bytes or 8 clusters, whichever is larger)
</p>
</dd>
<dt><code>l2-cache-size</code></dt>
<dd><p>The maximum size of the L2 table cache in bytes
(default: 4/5 of the total cache size)
</p>
</dd>
<dt><code>refcount-cache-size</code></dt>
<dd><p>The maximum size of the refcount block cache in bytes
(default: 1/5 of the total cache size)
</p>
</dd>
<dt><code>cache-clean-interval</code></dt>
<dd><p>Clean unused entries in the L2 and refcount caches. The interval is in seconds.
The default value is 0 and it disables this feature.
</p>
</dd>
<dt><code>pass-discard-request</code></dt>
<dd><p>Whether discard requests to the qcow2 device should be forwarded to the data
source (on/off; default: on if discard=unmap is specified, off otherwise)
</p>
</dd>
<dt><code>pass-discard-snapshot</code></dt>
<dd><p>Whether discard requests for the data source should be issued when a snapshot
operation (e.g. deleting a snapshot) frees clusters in the qcow2 file (on/off;
default: on)
</p>
</dd>
<dt><code>pass-discard-other</code></dt>
<dd><p>Whether discard requests for the data source should be issued on other
occasions where a cluster gets freed (on/off; default: off)
</p>
</dd>
<dt><code>overlap-check</code></dt>
<dd><p>Which overlap checks to perform for writes to the image
(none/constant/cached/all; default: cached). For details or finer
granularity control refer to the QAPI documentation of <code>blockdev-add</code>.
</p></dd>
</dl>
<p>Example 1:
</p><div class="example">
<pre class="example">-blockdev driver=file,node-name=my_file,filename=/tmp/disk.qcow2
-blockdev driver=qcow2,node-name=hda,file=my_file,overlap-check=none,cache-size=16777216
</pre></div>
<p>Example 2:
</p><div class="example">
<pre class="example">-blockdev driver=qcow2,node-name=disk,file.driver=http,file.filename=http://example.com/image.qcow2
</pre></div>
</dd>
<dt><samp>Driver-specific options for other drivers</samp></dt>
<dd><p>Please refer to the QAPI documentation of the <code>blockdev-add</code> QMP command.
</p>
</dd>
</dl>
</dd>
<dt><samp>-drive <var>option</var>[,<var>option</var>[,<var>option</var>[,...]]]</samp></dt>
<dd><a name="index-_002ddrive"></a>
<p>Define a new drive. This includes creating a block driver node (the backend) as
well as a guest device, and is mostly a shortcut for defining the corresponding
<samp>-blockdev</samp> and <samp>-device</samp> options.
</p>
<p><samp>-drive</samp> accepts all options that are accepted by <samp>-blockdev</samp>. In
addition, it knows the following options:
</p>
<dl compact="compact">
<dt><samp>file=<var>file</var></samp></dt>
<dd><p>This option defines which disk image (see <a href="#disk_005fimages">disk_images</a>) to use with
this drive. If the filename contains comma, you must double it
(for instance, &quot;file=my,,file&quot; to use file &quot;my,file&quot;).
</p>
<p>Special files such as iSCSI devices can be specified using protocol
specific URLs. See the section for &quot;Device URL Syntax&quot; for more information.
</p></dd>
<dt><samp>if=<var>interface</var></samp></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, none.
</p></dd>
<dt><samp>bus=<var>bus</var>,unit=<var>unit</var></samp></dt>
<dd><p>These options define where is connected the drive by defining the bus number and
the unit id.
</p></dd>
<dt><samp>index=<var>index</var></samp></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><samp>media=<var>media</var></samp></dt>
<dd><p>This option defines the type of the media: disk or cdrom.
</p></dd>
<dt><samp>cyls=<var>c</var>,heads=<var>h</var>,secs=<var>s</var>[,trans=<var>t</var>]</samp></dt>
<dd><p>Force disk physical geometry and the optional BIOS translation (trans=none or
lba). These parameters are deprecated, use the corresponding parameters
of <code>-device</code> instead.
</p></dd>
<dt><samp>snapshot=<var>snapshot</var></samp></dt>
<dd><p><var>snapshot</var> is &quot;on&quot; or &quot;off&quot; and controls snapshot mode for the given drive
(see <samp>-snapshot</samp>).
</p></dd>
<dt><samp>cache=<var>cache</var></samp></dt>
<dd><p><var>cache</var> is &quot;none&quot;, &quot;writeback&quot;, &quot;unsafe&quot;, &quot;directsync&quot; or &quot;writethrough&quot;
and controls how the host cache is used to access block data. This is a
shortcut that sets the <samp>cache.direct</samp> and <samp>cache.no-flush</samp>
options (as in <samp>-blockdev</samp>), and additionally <samp>cache.writeback</samp>,
which provides a default for the <samp>write-cache</samp> option of block guest
devices (as in <samp>-device</samp>). The modes correspond to the following
settings:
</p>
<div class="example">
<pre class="example">&nbsp; │ cache.writeback cache.direct cache.no-flush
─────────────┼─────────────────────────────────────────────────
writeback │ on off off
none │ on on off
writethrough │ off off off
directsync │ off on off
unsafe │ on off on
</pre></div>
<p>The default mode is <samp>cache=writeback</samp>.
</p>
</dd>
<dt><samp>aio=<var>aio</var></samp></dt>
<dd><p><var>aio</var> is &quot;threads&quot;, or &quot;native&quot; and selects between pthread based disk I/O and native Linux AIO.
</p></dd>
<dt><samp>format=<var>format</var></samp></dt>
<dd><p>Specify which disk <var>format</var> will be used rather than detecting
the format. Can be used to specify format=raw to avoid interpreting
an untrusted format header.
</p></dd>
<dt><samp>serial=<var>serial</var></samp></dt>
<dd><p>This option specifies the serial number to assign to the device. This
parameter is deprecated, use the corresponding parameter of <code>-device</code>
instead.
</p></dd>
<dt><samp>addr=<var>addr</var></samp></dt>
<dd><p>Specify the controller&rsquo;s PCI address (if=virtio only). This parameter is
deprecated, use the corresponding parameter of <code>-device</code> instead.
</p></dd>
<dt><samp>werror=<var>action</var>,rerror=<var>action</var></samp></dt>
<dd><p>Specify which <var>action</var> to take on write and read errors. Valid actions are:
&quot;ignore&quot; (ignore the error and try to continue), &quot;stop&quot; (pause QEMU),
&quot;report&quot; (report the error to the guest), &quot;enospc&quot; (pause QEMU only if the
host disk is full; report the error to the guest otherwise).
The default setting is <samp>werror=enospc</samp> and <samp>rerror=report</samp>.
</p></dd>
<dt><samp>copy-on-read=<var>copy-on-read</var></samp></dt>
<dd><p><var>copy-on-read</var> is &quot;on&quot; or &quot;off&quot; and enables whether to copy read backing
file sectors into the image file.
</p></dd>
<dt><samp>bps=<var>b</var>,bps_rd=<var>r</var>,bps_wr=<var>w</var></samp></dt>
<dd><p>Specify bandwidth throttling limits in bytes per second, either for all request
types or for reads or writes only. Small values can lead to timeouts or hangs
inside the guest. A safe minimum for disks is 2 MB/s.
</p></dd>
<dt><samp>bps_max=<var>bm</var>,bps_rd_max=<var>rm</var>,bps_wr_max=<var>wm</var></samp></dt>
<dd><p>Specify bursts in bytes per second, either for all request types or for reads
or writes only. Bursts allow the guest I/O to spike above the limit
temporarily.
</p></dd>
<dt><samp>iops=<var>i</var>,iops_rd=<var>r</var>,iops_wr=<var>w</var></samp></dt>
<dd><p>Specify request rate limits in requests per second, either for all request
types or for reads or writes only.
</p></dd>
<dt><samp>iops_max=<var>bm</var>,iops_rd_max=<var>rm</var>,iops_wr_max=<var>wm</var></samp></dt>
<dd><p>Specify bursts in requests per second, either for all request types or for reads
or writes only. Bursts allow the guest I/O to spike above the limit
temporarily.
</p></dd>
<dt><samp>iops_size=<var>is</var></samp></dt>
<dd><p>Let every <var>is</var> bytes of a request count as a new request for iops
throttling purposes. Use this option to prevent guests from circumventing iops
limits by sending fewer but larger requests.
</p></dd>
<dt><samp>group=<var>g</var></samp></dt>
<dd><p>Join a throttling quota group with given name <var>g</var>. All drives that are
members of the same group are accounted for together. Use this option to
prevent guests from circumventing throttling limits by using many small disks
instead of a single larger disk.
</p></dd>
</dl>
<p>By default, the <samp>cache.writeback=on</samp> mode is used. It will report data
writes as completed as soon as the data is present in the host page cache.
This is safe as long as your guest OS makes sure to correctly flush disk caches
where needed. If your guest OS does not handle volatile disk write caches
correctly and your host crashes or loses power, then the guest may experience
data corruption.
</p>
<p>For such guests, you should consider using <samp>cache.writeback=off</samp>. 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 after QEMU has made sure to flush
each write to the disk. Be aware that this has a major impact on performance.
</p>
<p>When using the <samp>-snapshot</samp> option, unsafe caching is always used.
</p>
<p>Copy-on-read avoids accessing the same backing file sectors repeatedly and is
useful when the backing file is over a slow network. By default copy-on-read
is off.
</p>
<p>Instead of <samp>-cdrom</samp> you can use:
</p><div class="example">
<pre class="example">qemu-system-i386 -drive file=file,index=2,media=cdrom
</pre></div>
<p>Instead of <samp>-hda</samp>, <samp>-hdb</samp>, <samp>-hdc</samp>, <samp>-hdd</samp>, you can
use:
</p><div class="example">
<pre class="example">qemu-system-i386 -drive file=file,index=0,media=disk
qemu-system-i386 -drive file=file,index=1,media=disk
qemu-system-i386 -drive file=file,index=2,media=disk
qemu-system-i386 -drive file=file,index=3,media=disk
</pre></div>
<p>You can open an image using pre-opened file descriptors from an fd set:
</p><div class="example">
<pre class="example">qemu-system-i386
-add-fd fd=3,set=2,opaque=&quot;rdwr:/path/to/file&quot;
-add-fd fd=4,set=2,opaque=&quot;rdonly:/path/to/file&quot;
-drive file=/dev/fdset/2,index=0,media=disk
</pre></div>
<p>You can connect a CDROM to the slave of ide0:
</p><div class="example">
<pre class="example">qemu-system-i386 -drive file=file,if=ide,index=1,media=cdrom
</pre></div>
<p>If you don&rsquo;t specify the &quot;file=&quot; argument, you define an empty drive:
</p><div class="example">
<pre class="example">qemu-system-i386 -drive if=ide,index=1,media=cdrom
</pre></div>
<p>Instead of <samp>-fda</samp>, <samp>-fdb</samp>, you can use:
</p><div class="example">
<pre class="example">qemu-system-i386 -drive file=file,index=0,if=floppy
qemu-system-i386 -drive file=file,index=1,if=floppy
</pre></div>
<p>By default, <var>interface</var> is &quot;ide&quot; and <var>index</var> is automatically
incremented:
</p><div class="example">
<pre class="example">qemu-system-i386 -drive file=a -drive file=b&quot;
</pre></div>
<p>is interpreted like:
</p><div class="example">
<pre class="example">qemu-system-i386 -hda a -hdb b
</pre></div>
</dd>
<dt><samp>-mtdblock <var>file</var></samp></dt>
<dd><a name="index-_002dmtdblock"></a>
<p>Use <var>file</var> as on-board Flash memory image.
</p></dd>
<dt><samp>-sd <var>file</var></samp></dt>
<dd><a name="index-_002dsd"></a>
<p>Use <var>file</var> as SecureDigital card image.
</p></dd>
<dt><samp>-pflash <var>file</var></samp></dt>
<dd><a name="index-_002dpflash"></a>
<p>Use <var>file</var> as a parallel flash image.
</p></dd>
<dt><samp>-snapshot</samp></dt>
<dd><a name="index-_002dsnapshot"></a>
<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 <tt class="key">C-a s</tt> (see <a href="#disk_005fimages">disk_images</a>).
</p>
</dd>
<dt><samp>-fsdev <var>fsdriver</var>,id=<var>id</var>,path=<var>path</var>,[security_model=<var>security_model</var>][,writeout=<var>writeout</var>][,readonly][,socket=<var>socket</var>|sock_fd=<var>sock_fd</var>][,fmode=<var>fmode</var>][,dmode=<var>dmode</var>]</samp></dt>
<dd><a name="index-_002dfsdev"></a>
<p>Define a new file system device. Valid options are:
</p><dl compact="compact">
<dt><samp><var>fsdriver</var></samp></dt>
<dd><p>This option specifies the fs driver backend to use.
Currently &quot;local&quot;, &quot;handle&quot; and &quot;proxy&quot; file system drivers are supported.
</p></dd>
<dt><samp>id=<var>id</var></samp></dt>
<dd><p>Specifies identifier for this device
</p></dd>
<dt><samp>path=<var>path</var></samp></dt>
<dd><p>Specifies the export path for the file system device. Files under
this path will be available to the 9p client on the guest.
</p></dd>
<dt><samp>security_model=<var>security_model</var></samp></dt>
<dd><p>Specifies the security model to be used for this export path.
Supported security models are &quot;passthrough&quot;, &quot;mapped-xattr&quot;, &quot;mapped-file&quot; and &quot;none&quot;.
In &quot;passthrough&quot; security model, files are stored using the same
credentials as they are created on the guest. This requires QEMU
to run as root. In &quot;mapped-xattr&quot; security model, some of the file
attributes like uid, gid, mode bits and link target are stored as
file attributes. For &quot;mapped-file&quot; these attributes are stored in the
hidden .virtfs_metadata directory. Directories exported by this security model cannot
interact with other unix tools. &quot;none&quot; security model is same as
passthrough except the sever won&rsquo;t report failures if it fails to
set file attributes like ownership. Security model is mandatory
only for local fsdriver. Other fsdrivers (like handle, proxy) don&rsquo;t take
security model as a parameter.
</p></dd>
<dt><samp>writeout=<var>writeout</var></samp></dt>
<dd><p>This is an optional argument. The only supported value is &quot;immediate&quot;.
This means that 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></dd>
<dt><samp>readonly</samp></dt>
<dd><p>Enables exporting 9p share as a readonly mount for guests. By default
read-write access is given.
</p></dd>
<dt><samp>socket=<var>socket</var></samp></dt>
<dd><p>Enables proxy filesystem driver to use passed socket file for communicating
with virtfs-proxy-helper
</p></dd>
<dt><samp>sock_fd=<var>sock_fd</var></samp></dt>
<dd><p>Enables proxy filesystem driver to use passed socket descriptor for
communicating with virtfs-proxy-helper. Usually a helper like libvirt
will create socketpair and pass one of the fds as sock_fd
</p></dd>
<dt><samp>fmode=<var>fmode</var></samp></dt>
<dd><p>Specifies the default mode for newly created files on the host. Works only
with security models &quot;mapped-xattr&quot; and &quot;mapped-file&quot;.
</p></dd>
<dt><samp>dmode=<var>dmode</var></samp></dt>
<dd><p>Specifies the default mode for newly created directories on the host. Works
only with security models &quot;mapped-xattr&quot; and &quot;mapped-file&quot;.
</p></dd>
</dl>
<p>-fsdev option is used along with -device driver &quot;virtio-9p-pci&quot;.
</p></dd>
<dt><samp>-device virtio-9p-pci,fsdev=<var>id</var>,mount_tag=<var>mount_tag</var></samp></dt>
<dd><p>Options for virtio-9p-pci driver are:
</p><dl compact="compact">
<dt><samp>fsdev=<var>id</var></samp></dt>
<dd><p>Specifies the id value specified along with -fsdev option
</p></dd>
<dt><samp>mount_tag=<var>mount_tag</var></samp></dt>
<dd><p>Specifies the tag name to be used by the guest to mount this export point
</p></dd>
</dl>
</dd>
<dt><samp>-virtfs <var>fsdriver</var>[,path=<var>path</var>],mount_tag=<var>mount_tag</var>[,security_model=<var>security_model</var>][,writeout=<var>writeout</var>][,readonly][,socket=<var>socket</var>|sock_fd=<var>sock_fd</var>][,fmode=<var>fmode</var>][,dmode=<var>dmode</var>]</samp></dt>
<dd><a name="index-_002dvirtfs"></a>
<p>The general form of a Virtual File system pass-through options are:
</p><dl compact="compact">
<dt><samp><var>fsdriver</var></samp></dt>
<dd><p>This option specifies the fs driver backend to use.
Currently &quot;local&quot;, &quot;handle&quot; and &quot;proxy&quot; file system drivers are supported.
</p></dd>
<dt><samp>id=<var>id</var></samp></dt>
<dd><p>Specifies identifier for this device
</p></dd>
<dt><samp>path=<var>path</var></samp></dt>
<dd><p>Specifies the export path for the file system device. Files under
this path will be available to the 9p client on the guest.
</p></dd>
<dt><samp>security_model=<var>security_model</var></samp></dt>
<dd><p>Specifies the security model to be used for this export path.
Supported security models are &quot;passthrough&quot;, &quot;mapped-xattr&quot;, &quot;mapped-file&quot; and &quot;none&quot;.
In &quot;passthrough&quot; security model, files are stored using the same
credentials as they are created on the guest. This requires QEMU
to run as root. In &quot;mapped-xattr&quot; security model, some of the file
attributes like uid, gid, mode bits and link target are stored as
file attributes. For &quot;mapped-file&quot; these attributes are stored in the
hidden .virtfs_metadata directory. Directories exported by this security model cannot
interact with other unix tools. &quot;none&quot; security model is same as
passthrough except the sever won&rsquo;t report failures if it fails to
set file attributes like ownership. Security model is mandatory only
for local fsdriver. Other fsdrivers (like handle, proxy) don&rsquo;t take security
model as a parameter.
</p></dd>
<dt><samp>writeout=<var>writeout</var></samp></dt>
<dd><p>This is an optional argument. The only supported value is &quot;immediate&quot;.
This means that 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></dd>
<dt><samp>readonly</samp></dt>
<dd><p>Enables exporting 9p share as a readonly mount for guests. By default
read-write access is given.
</p></dd>
<dt><samp>socket=<var>socket</var></samp></dt>
<dd><p>Enables proxy filesystem driver to use passed socket file for
communicating with virtfs-proxy-helper. Usually a helper like libvirt
will create socketpair and pass one of the fds as sock_fd
</p></dd>
<dt><samp>sock_fd</samp></dt>
<dd><p>Enables proxy filesystem driver to use passed &rsquo;sock_fd&rsquo; as the socket
descriptor for interfacing with virtfs-proxy-helper
</p></dd>
<dt><samp>fmode=<var>fmode</var></samp></dt>
<dd><p>Specifies the default mode for newly created files on the host. Works only
with security models &quot;mapped-xattr&quot; and &quot;mapped-file&quot;.
</p></dd>
<dt><samp>dmode=<var>dmode</var></samp></dt>
<dd><p>Specifies the default mode for newly created directories on the host. Works
only with security models &quot;mapped-xattr&quot; and &quot;mapped-file&quot;.
</p></dd>
</dl>
</dd>
<dt><samp>-virtfs_synth</samp></dt>
<dd><a name="index-_002dvirtfs_005fsynth"></a>
<p>Create synthetic file system image
</p></dd>
<dt><samp>-iscsi</samp></dt>
<dd><a name="index-_002discsi"></a>
<p>Configure iSCSI session parameters.
</p></dd>
</dl>
<a name="USB-options"></a>
<h4 class="subsection">2.3.3 USB options</h4>
<dl compact="compact">
<dt><samp>-usb</samp></dt>
<dd><a name="index-_002dusb"></a>
<p>Enable the USB driver (if it is not used by default yet).
</p>
</dd>
<dt><samp>-usbdevice <var>devname</var></samp></dt>
<dd><a name="index-_002dusbdevice"></a>
<p>Add the USB device <var>devname</var>. Note that this option is deprecated,
please use <code>-device usb-...</code> instead. See <a href="#usb_005fdevices">usb_devices</a>.
</p>
<dl compact="compact">
<dt><samp>mouse</samp></dt>
<dd><p>Virtual Mouse. This will override the PS/2 mouse emulation when activated.
</p>
</dd>
<dt><samp>tablet</samp></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><samp>braille</samp></dt>
<dd><p>Braille device. This will use BrlAPI to display the braille output on a real
or fake device.
</p>
</dd>
</dl>
</dd>
</dl>
<a name="Display-options"></a>
<h4 class="subsection">2.3.4 Display options</h4>
<dl compact="compact">
<dt><samp>-display <var>type</var></samp></dt>
<dd><a name="index-_002ddisplay"></a>
<p>Select type of display to use. This option is a replacement for the
old style -sdl/-curses/... options. Valid values for <var>type</var> are
</p><dl compact="compact">
<dt><samp>sdl</samp></dt>
<dd><p>Display video output via SDL (usually in a separate graphics
window; see the SDL documentation for other possibilities).
</p></dd>
<dt><samp>curses</samp></dt>
<dd><p>Display video output via curses. For graphics device models which
support a text mode, QEMU can display this output using a
curses/ncurses interface. Nothing is displayed when the graphics
device is in graphical mode or if the graphics device does not support
a text mode. Generally only the VGA device models support text mode.
</p></dd>
<dt><samp>none</samp></dt>
<dd><p>Do not display video output. The guest will still see an emulated
graphics card, but its output will not be displayed to the QEMU
user. This option differs from the -nographic option in that it
only affects what is done with video output; -nographic also changes
the destination of the serial and parallel port data.
</p></dd>
<dt><samp>gtk</samp></dt>
<dd><p>Display video output in a GTK window. This interface provides drop-down
menus and other UI elements to configure and control the VM during
runtime.
</p></dd>
<dt><samp>vnc</samp></dt>
<dd><p>Start a VNC server on display &lt;arg&gt;
</p></dd>
</dl>
</dd>
<dt><samp>-nographic</samp></dt>
<dd><a name="index-_002dnographic"></a>
<p>Normally, if QEMU is compiled with graphical window support, it displays
output such as guest graphics, guest console, and the QEMU monitor in a
window. 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 and muxed with the monitor (unless
redirected elsewhere explicitly). Therefore, you can still use QEMU to
debug a Linux kernel with a serial console. Use <tt class="key">C-a h</tt> for help on
switching between the console and monitor.
</p></dd>
<dt><samp>-curses</samp></dt>
<dd><a name="index-_002dcurses"></a>
<p>Normally, if QEMU is compiled with graphical window support, it displays
output such as guest graphics, guest console, and the QEMU monitor in a
window. 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><samp>-no-frame</samp></dt>
<dd><a name="index-_002dno_002dframe"></a>
<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><samp>-alt-grab</samp></dt>
<dd><a name="index-_002dalt_002dgrab"></a>
<p>Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this also
affects the special keys (for fullscreen, monitor-mode switching, etc).
</p></dd>
<dt><samp>-ctrl-grab</samp></dt>
<dd><a name="index-_002dctrl_002dgrab"></a>
<p>Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this also
affects the special keys (for fullscreen, monitor-mode switching, etc).
</p></dd>
<dt><samp>-no-quit</samp></dt>
<dd><a name="index-_002dno_002dquit"></a>
<p>Disable SDL window close capability.
</p></dd>
<dt><samp>-sdl</samp></dt>
<dd><a name="index-_002dsdl"></a>
<p>Enable SDL.
</p></dd>
<dt><samp>-spice <var>option</var>[,<var>option</var>[,...]]</samp></dt>
<dd><a name="index-_002dspice"></a>
<p>Enable the spice remote desktop protocol. Valid options are
</p>
<dl compact="compact">
<dt><samp>port=&lt;nr&gt;</samp></dt>
<dd><p>Set the TCP port spice is listening on for plaintext channels.
</p>
</dd>
<dt><samp>addr=&lt;addr&gt;</samp></dt>
<dd><p>Set the IP address spice is listening on. Default is any address.
</p>
</dd>
<dt><samp>ipv4</samp></dt>
<dt><samp>ipv6</samp></dt>
<dt><samp>unix</samp></dt>
<dd><p>Force using the specified IP version.
</p>
</dd>
<dt><samp>password=&lt;secret&gt;</samp></dt>
<dd><p>Set the password you need to authenticate.
</p>
</dd>
<dt><samp>sasl</samp></dt>
<dd><p>Require that the client use SASL to authenticate with the spice.
The exact choice of authentication method used is controlled from the
system / user&rsquo;s SASL configuration file for the &rsquo;qemu&rsquo; 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 &rsquo;tls&rsquo; and
&rsquo;x509&rsquo; settings to enable use of SSL and server certificates. This
ensures a data encryption preventing compromise of authentication
credentials.
</p>
</dd>
<dt><samp>disable-ticketing</samp></dt>
<dd><p>Allow client connects without authentication.
</p>
</dd>
<dt><samp>disable-copy-paste</samp></dt>
<dd><p>Disable copy paste between the client and the guest.
</p>
</dd>
<dt><samp>disable-agent-file-xfer</samp></dt>
<dd><p>Disable spice-vdagent based file-xfer between the client and the guest.
</p>
</dd>
<dt><samp>tls-port=&lt;nr&gt;</samp></dt>
<dd><p>Set the TCP port spice is listening on for encrypted channels.
</p>
</dd>
<dt><samp>x509-dir=&lt;dir&gt;</samp></dt>
<dd><p>Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir
</p>
</dd>
<dt><samp>x509-key-file=&lt;file&gt;</samp></dt>
<dt><samp>x509-key-password=&lt;file&gt;</samp></dt>
<dt><samp>x509-cert-file=&lt;file&gt;</samp></dt>
<dt><samp>x509-cacert-file=&lt;file&gt;</samp></dt>
<dt><samp>x509-dh-key-file=&lt;file&gt;</samp></dt>
<dd><p>The x509 file names can also be configured individually.
</p>
</dd>
<dt><samp>tls-ciphers=&lt;list&gt;</samp></dt>
<dd><p>Specify which ciphers to use.
</p>
</dd>
<dt><samp>tls-channel=[main|display|cursor|inputs|record|playback]</samp></dt>
<dt><samp>plaintext-channel=[main|display|cursor|inputs|record|playback]</samp></dt>
<dd><p>Force specific channel to be used with or without TLS encryption. The
options can be specified multiple times to configure multiple
channels. The special name &quot;default&quot; can be used to set the default
mode. For channels which are not explicitly forced into one mode the
spice client is allowed to pick tls/plaintext as he pleases.
</p>
</dd>
<dt><samp>image-compression=[auto_glz|auto_lz|quic|glz|lz|off]</samp></dt>
<dd><p>Configure image compression (lossless).
Default is auto_glz.
</p>
</dd>
<dt><samp>jpeg-wan-compression=[auto|never|always]</samp></dt>
<dt><samp>zlib-glz-wan-compression=[auto|never|always]</samp></dt>
<dd><p>Configure wan image compression (lossy for slow links).
Default is auto.
</p>
</dd>
<dt><samp>streaming-video=[off|all|filter]</samp></dt>
<dd><p>Configure video stream detection. Default is off.
</p>
</dd>
<dt><samp>agent-mouse=[on|off]</samp></dt>
<dd><p>Enable/disable passing mouse events via vdagent. Default is on.
</p>
</dd>
<dt><samp>playback-compression=[on|off]</samp></dt>
<dd><p>Enable/disable audio stream compression (using celt 0.5.1). Default is on.
</p>
</dd>
<dt><samp>seamless-migration=[on|off]</samp></dt>
<dd><p>Enable/disable spice seamless migration. Default is off.
</p>
</dd>
<dt><samp>gl=[on|off]</samp></dt>
<dd><p>Enable/disable OpenGL context. Default is off.
</p>
</dd>
<dt><samp>rendernode=&lt;file&gt;</samp></dt>
<dd><p>DRM render node for OpenGL rendering. If not specified, it will pick
the first available. (Since 2.9)
</p>
</dd>
</dl>
</dd>
<dt><samp>-portrait</samp></dt>
<dd><a name="index-_002dportrait"></a>
<p>Rotate graphical output 90 deg left (only PXA LCD).
</p></dd>
<dt><samp>-rotate <var>deg</var></samp></dt>
<dd><a name="index-_002drotate"></a>
<p>Rotate graphical output some deg left (only PXA LCD).
</p></dd>
<dt><samp>-vga <var>type</var></samp></dt>
<dd><a name="index-_002dvga"></a>
<p>Select type of VGA card to emulate. Valid values for <var>type</var> are
</p><dl compact="compact">
<dt><samp>cirrus</samp></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 card was the default before QEMU 2.2)
</p></dd>
<dt><samp>std</samp></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. (This card is the default since QEMU 2.2)
</p></dd>
<dt><samp>vmware</samp></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><samp>qxl</samp></dt>
<dd><p>QXL paravirtual graphic card. It is VGA compatible (including VESA
2.0 VBE support). Works best with qxl guest drivers installed though.
Recommended choice when using the spice protocol.
</p></dd>
<dt><samp>tcx</samp></dt>
<dd><p>(sun4m only) Sun TCX framebuffer. This is the default framebuffer for
sun4m machines and offers both 8-bit and 24-bit colour depths at a
fixed resolution of 1024x768.
</p></dd>
<dt><samp>cg3</samp></dt>
<dd><p>(sun4m only) Sun cgthree framebuffer. This is a simple 8-bit framebuffer
for sun4m machines available in both 1024x768 (OpenBIOS) and 1152x900 (OBP)
resolutions aimed at people wishing to run older Solaris versions.
</p></dd>
<dt><samp>virtio</samp></dt>
<dd><p>Virtio VGA card.
</p></dd>
<dt><samp>none</samp></dt>
<dd><p>Disable VGA card.
</p></dd>
</dl>
</dd>
<dt><samp>-full-screen</samp></dt>
<dd><a name="index-_002dfull_002dscreen"></a>
<p>Start in full screen.
</p></dd>
<dt><samp>-g <var>width</var>x<var>height</var>[x<var>depth</var>]</samp></dt>
<dd><a name="index-_002dg"></a>
<p>Set the initial graphical resolution and depth (PPC, SPARC only).
</p></dd>
<dt><samp>-vnc <var>display</var>[,<var>option</var>[,<var>option</var>[,...]]]</samp></dt>
<dd><a name="index-_002dvnc"></a>
<p>Normally, if QEMU is compiled with graphical window support, it displays
output such as guest graphics, guest console, and the QEMU monitor in a
window. With this option, you can have QEMU listen on VNC display
<var>display</var> and redirect the VGA display over the VNC session. It is
very useful to enable the usb tablet device when using this option
(option <samp>-device usb-tablet</samp>). When using the VNC display, you
must use the <samp>-k</samp> 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><samp>to=<var>L</var></samp></dt>
<dd>
<p>With this option, QEMU will try next available VNC <var>display</var>s, until the
number <var>L</var>, if the origianlly defined &quot;-vnc <var>display</var>&quot; is not
available, e.g. port 5900+<var>display</var> is already used by another
application. By default, to=0.
</p>
</dd>
<dt><samp><var>host</var>:<var>d</var></samp></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><samp>unix:<var>path</var></samp></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><samp>none</samp></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><samp>reverse</samp></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><samp>websocket</samp></dt>
<dd>
<p>Opens an additional TCP listening port dedicated to VNC Websocket connections.
If a bare <var>websocket</var> option is given, the Websocket port is
5700+<var>display</var>. An alternative port can be specified with the
syntax <code>websocket</code>=<var>port</var>.
</p>
<p>If <var>host</var> is specified connections will only be allowed from this host.
It is possible to control the websocket listen address independently, using
the syntax <code>websocket</code>=<var>host</var>:<var>port</var>.
</p>
<p>If no TLS credentials are provided, the websocket connection runs in
unencrypted mode. If TLS credentials are provided, the websocket connection
requires encrypted client connections.
</p>
</dd>
<dt><samp>password</samp></dt>
<dd>
<p>Require that password based authentication is used for client connections.
</p>
<p>The password must be set separately using the <code>set_password</code> command in
the <a href="#pcsys_005fmonitor">pcsys_monitor</a>. The syntax to change your password is:
<code>set_password &lt;protocol&gt; &lt;password&gt;</code> where &lt;protocol&gt; could be either
&quot;vnc&quot; or &quot;spice&quot;.
</p>
<p>If you would like to change &lt;protocol&gt; password expiration, you should use
<code>expire_password &lt;protocol&gt; &lt;expiration-time&gt;</code> where expiration time could
be one of the following options: now, never, +seconds or UNIX time of
expiration, e.g. +60 to make password expire in 60 seconds, or 1335196800
to make password expire on &quot;Mon Apr 23 12:00:00 EDT 2012&quot; (UNIX time for this
date and time).
</p>
<p>You can also use keywords &quot;now&quot; or &quot;never&quot; for the expiration time to
allow &lt;protocol&gt; password to expire immediately or never expire.
</p>
</dd>
<dt><samp>tls-creds=<var>ID</var></samp></dt>
<dd>
<p>Provides the ID of a set of TLS credentials to use to secure the
VNC server. They will apply to both the normal VNC server socket
and the websocket socket (if enabled). Setting TLS credentials
will cause the VNC server socket to enable the VeNCrypt auth
mechanism. The credentials should have been previously created
using the <samp>-object tls-creds</samp> argument.
</p>
<p>The <samp>tls-creds</samp> parameter obsoletes the <samp>tls</samp>,
<samp>x509</samp>, and <samp>x509verify</samp> options, and as such
it is not permitted to set both new and old type options at
the same time.
</p>
</dd>
<dt><samp>tls</samp></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
<samp>x509</samp> or <samp>x509verify</samp> options.
</p>
<p>This option is now deprecated in favor of using the <samp>tls-creds</samp>
argument.
</p>
</dd>
<dt><samp>x509=<var>/path/to/certificate/dir</var></samp></dt>
<dd>
<p>Valid if <samp>tls</samp> is specified. Require that x509 credentials are used
for negotiating the TLS session. The server will send its x509 certificate
to the client. It is recommended that a password be set on the VNC server
to provide authentication of the client when this is used. The path following
this option specifies where the x509 certificates are to be loaded from.
See the <a href="#vnc_005fsecurity">vnc_security</a> section for details on generating certificates.
</p>
<p>This option is now deprecated in favour of using the <samp>tls-creds</samp>
argument.
</p>
</dd>
<dt><samp>x509verify=<var>/path/to/certificate/dir</var></samp></dt>
<dd>
<p>Valid if <samp>tls</samp> is specified. Require that x509 credentials are used
for negotiating the TLS session. The server will send its x509 certificate
to the client, and request that the client send its own x509 certificate.
The server will validate the client&rsquo;s certificate against the CA certificate,
and reject clients when validation fails. If the certificate authority is
trusted, this is a sufficient authentication mechanism. You may still wish
to set a password on the VNC server as a second authentication layer. The
path following this option specifies where the x509 certificates are to
be loaded from. See the <a href="#vnc_005fsecurity">vnc_security</a> section for details on generating
certificates.
</p>
<p>This option is now deprecated in favour of using the <samp>tls-creds</samp>
argument.
</p>
</dd>
<dt><samp>sasl</samp></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&rsquo;s SASL configuration file for the &rsquo;qemu&rsquo; 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 &rsquo;tls&rsquo; and
&rsquo;x509&rsquo; settings to enable use of SSL and server certificates. This
ensures a data encryption preventing compromise of authentication
credentials. See the <a href="#vnc_005fsecurity">vnc_security</a> section for details on using
SASL authentication.
</p>
</dd>
<dt><samp>acl</samp></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&rsquo;s distinguished name. This is something that looks like
<code>C=GB,O=ACME,L=Boston,CN=bob</code>. For SASL party, the ACL check is
made against the username, which depending on the SASL plugin, may
include a realm component, eg <code>bob</code> or <code>bob@EXAMPLE.COM</code>.
When the <samp>acl</samp> flag is set, the initial access list will be
empty, with a <code>deny</code> policy. Thus no one will be allowed to
use the VNC server until the ACLs have been loaded. This can be
achieved using the <code>acl</code> monitor command.
</p>
</dd>
<dt><samp>lossy</samp></dt>
<dd>
<p>Enable lossy compression methods (gradient, JPEG, ...). If this
option is set, VNC client may receive lossy framebuffer updates
depending on its encoding settings. Enabling this option can save
a lot of bandwidth at the expense of quality.
</p>
</dd>
<dt><samp>non-adaptive</samp></dt>
<dd>
<p>Disable adaptive encodings. Adaptive encodings are enabled by default.
An adaptive encoding will try to detect frequently updated screen regions,
and send updates in these regions using a lossy encoding (like JPEG).
This can be really helpful to save bandwidth when playing videos. Disabling
adaptive encodings restores the original static behavior of encodings
like Tight.
</p>
</dd>
<dt><samp>share=[allow-exclusive|force-shared|ignore]</samp></dt>
<dd>
<p>Set display sharing policy. &rsquo;allow-exclusive&rsquo; allows clients to ask
for exclusive access. As suggested by the rfb spec this is
implemented by dropping other connections. Connecting multiple
clients in parallel requires all clients asking for a shared session
(vncviewer: -shared switch). This is the default. &rsquo;force-shared&rsquo;
disables exclusive client access. Useful for shared desktop sessions,
where you don&rsquo;t want someone forgetting specify -shared disconnect
everybody else. &rsquo;ignore&rsquo; completely ignores the shared flag and
allows everybody connect unconditionally. Doesn&rsquo;t conform to the rfb
spec but is traditional QEMU behavior.
</p>
</dd>
<dt><samp>key-delay-ms</samp></dt>
<dd>
<p>Set keyboard delay, for key down and key up events, in milliseconds.
Default is 10. Keyboards are low-bandwidth devices, so this slowdown
can help the device and guest to keep up and not lose events in case
events are arriving in bulk. Possible causes for the latter are flaky
network connections, or scripts for automated testing.
</p>
</dd>
</dl>
</dd>
</dl>
<a name="i386-target-only"></a>
<h4 class="subsection">2.3.5 i386 target only</h4>
<dl compact="compact">
<dt><samp>-win2k-hack</samp></dt>
<dd><a name="index-_002dwin2k_002dhack"></a>
<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><samp>-no-fd-bootchk</samp></dt>
<dd><a name="index-_002dno_002dfd_002dbootchk"></a>
<p>Disable boot signature checking for floppy disks in BIOS. May
be needed to boot from old floppy disks.
</p></dd>
<dt><samp>-no-acpi</samp></dt>
<dd><a name="index-_002dno_002dacpi"></a>
<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><samp>-no-hpet</samp></dt>
<dd><a name="index-_002dno_002dhpet"></a>
<p>Disable HPET support.
</p></dd>
<dt><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></dt>
<dd><a name="index-_002dacpitable"></a>
<p>Add ACPI table with specified header fields and context from specified files.
For file=, take whole ACPI table from the specified files, including all
ACPI headers (possible overridden by other options).
For data=, only data
portion of the table is used, all header information is specified in the
command line.
If a SLIC table is supplied to QEMU, then the SLIC&rsquo;s oem_id and oem_table_id
fields will override the same in the RSDT and the FADT (a.k.a. FACP), in order
to ensure the field matches required by the Microsoft SLIC spec and the ACPI
spec.
</p></dd>
<dt><samp>-smbios file=<var>binary</var></samp></dt>
<dd><a name="index-_002dsmbios"></a>
<p>Load SMBIOS entry from binary file.
</p>
</dd>
<dt><samp>-smbios type=0[,vendor=<var>str</var>][,version=<var>str</var>][,date=<var>str</var>][,release=<var>%d.%d</var>][,uefi=on|off]</samp></dt>
<dd><p>Specify SMBIOS type 0 fields
</p>
</dd>
<dt><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></dt>
<dd><p>Specify SMBIOS type 1 fields
</p>
</dd>
<dt><samp>-smbios type=2[,manufacturer=<var>str</var>][,product=<var>str</var>][,version=<var>str</var>][,serial=<var>str</var>][,asset=<var>str</var>][,location=<var>str</var>][,family=<var>str</var>]</samp></dt>
<dd><p>Specify SMBIOS type 2 fields
</p>
</dd>
<dt><samp>-smbios type=3[,manufacturer=<var>str</var>][,version=<var>str</var>][,serial=<var>str</var>][,asset=<var>str</var>][,sku=<var>str</var>]</samp></dt>
<dd><p>Specify SMBIOS type 3 fields
</p>
</dd>
<dt><samp>-smbios type=4[,sock_pfx=<var>str</var>][,manufacturer=<var>str</var>][,version=<var>str</var>][,serial=<var>str</var>][,asset=<var>str</var>][,part=<var>str</var>]</samp></dt>
<dd><p>Specify SMBIOS type 4 fields
</p>
</dd>
<dt><samp>-smbios type=17[,loc_pfx=<var>str</var>][,bank=<var>str</var>][,manufacturer=<var>str</var>][,serial=<var>str</var>][,asset=<var>str</var>][,part=<var>str</var>][,speed=<var>%d</var>]</samp></dt>
<dd><p>Specify SMBIOS type 17 fields
</p></dd>
</dl>
<a name="Network-options"></a>
<h4 class="subsection">2.3.6 Network options</h4>
<dl compact="compact">
<dt><samp>-nic [tap|bridge|user|l2tpv3|vde|netmap|vhost-user|socket][,...][,mac=macaddr][,model=mn]</samp></dt>
<dd><a name="index-_002dnic"></a>
<p>This option is a shortcut for configuring both the on-board (default) guest
NIC hardware and the host network backend in one go. The host backend options
are the same as with the corresponding <samp>-netdev</samp> options below.
The guest NIC model can be set with <samp>model=<var>modelname</var></samp>.
Use <samp>model=help</samp> to list the available device types.
The hardware MAC address can be set with <samp>mac=<var>macaddr</var></samp>.
</p>
<p>The following two example do exactly the same, to show how <samp>-nic</samp> can
be used to shorten the command line length (note that the e1000 is the default
on i386, so the <samp>model=e1000</samp> parameter could even be omitted here, too):
</p><div class="example">
<pre class="example">qemu-system-i386 -netdev user,id=n1,ipv6=off -device e1000,netdev=n1,mac=52:54:98:76:54:32
qemu-system-i386 -nic user,ipv6=off,model=e1000,mac=52:54:98:76:54:32
</pre></div>
</dd>
<dt><samp>-nic none</samp></dt>
<dd><p>Indicate that no network devices should be configured. It is used to override
the default configuration (default NIC with &ldquo;user&rdquo; host network backend)
which is activated if no other networking options are provided.
</p>
</dd>
<dt><samp>-netdev user,id=<var>id</var>[,<var>option</var>][,<var>option</var>][,...]</samp></dt>
<dd><a name="index-_002dnetdev"></a>
<p>Configure user mode host network backend which requires no administrator
privilege to run. Valid options are:
</p>
<dl compact="compact">
<dt><samp>id=<var>id</var></samp></dt>
<dd><p>Assign symbolic name for use in monitor commands.
</p>
</dd>
<dt><samp>ipv4=on|off and ipv6=on|off</samp></dt>
<dd><p>Specify that either IPv4 or IPv6 must be enabled. If neither is specified
both protocols are enabled.
</p>
</dd>
<dt><samp>net=<var>addr</var>[/<var>mask</var>]</samp></dt>
<dd><p>Set IP network address the guest will see. Optionally specify the netmask,
either in the form a.b.c.d or as number of valid top-most bits. Default is
10.0.2.0/24.
</p>
</dd>
<dt><samp>host=<var>addr</var></samp></dt>
<dd><p>Specify the guest-visible address of the host. Default is the 2nd IP in the
guest network, i.e. x.x.x.2.
</p>
</dd>
<dt><samp>ipv6-net=<var>addr</var>[/<var>int</var>]</samp></dt>
<dd><p>Set IPv6 network address the guest will see (default is fec0::/64). The
network prefix is given in the usual hexadecimal IPv6 address
notation. The prefix size is optional, and is given as the number of
valid top-most bits (default is 64).
</p>
</dd>
<dt><samp>ipv6-host=<var>addr</var></samp></dt>
<dd><p>Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 in
the guest network, i.e. xxxx::2.
</p>
</dd>
<dt><samp>restrict=on|off</samp></dt>
<dd><p>If this option is enabled, the guest will be isolated, i.e. it will not be
able to contact the host and no guest IP packets will be routed over the host
to the outside. This option does not affect any explicitly set forwarding rules.
</p>
</dd>
<dt><samp>hostname=<var>name</var></samp></dt>
<dd><p>Specifies the client hostname reported by the built-in DHCP server.
</p>
</dd>
<dt><samp>dhcpstart=<var>addr</var></samp></dt>
<dd><p>Specify the first of the 16 IPs the built-in DHCP server can assign. Default
is the 15th to 31st IP in the guest network, i.e. x.x.x.15 to x.x.x.31.
</p>
</dd>
<dt><samp>dns=<var>addr</var></samp></dt>
<dd><p>Specify the guest-visible address of the virtual nameserver. The address must
be different from the host address. Default is the 3rd IP in the guest network,
i.e. x.x.x.3.
</p>
</dd>
<dt><samp>ipv6-dns=<var>addr</var></samp></dt>
<dd><p>Specify the guest-visible address of the IPv6 virtual nameserver. The address
must be different from the host address. Default is the 3rd IP in the guest
network, i.e. xxxx::3.
</p>
</dd>
<dt><samp>dnssearch=<var>domain</var></samp></dt>
<dd><p>Provides an entry for the domain-search list sent by the built-in
DHCP server. More than one domain suffix can be transmitted by specifying
this option multiple times. If supported, this will cause the guest to
automatically try to append the given domain suffix(es) in case a domain name
can not be resolved.
</p>
<p>Example:
</p><div class="example">
<pre class="example">qemu-system-i386 -nic user,dnssearch=mgmt.example.org,dnssearch=example.org
</pre></div>
</dd>
<dt><samp>domainname=<var>domain</var></samp></dt>
<dd><p>Specifies the client domain name reported by the built-in DHCP server.
</p>
</dd>
<dt><samp>tftp=<var>dir</var></samp></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).
</p>
</dd>
<dt><samp>bootfile=<var>file</var></samp></dt>
<dd><p>When using the user mode network stack, broadcast <var>file</var> as the BOOTP
filename. In conjunction with <samp>tftp</samp>, this can be used to network boot
a guest from a local directory.
</p>
<p>Example (using pxelinux):
</p><div class="example">
<pre class="example">qemu-system-i386 -hda linux.img -boot n -device e1000,netdev=n1 \
-netdev user,id=n1,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
</pre></div>
</dd>
<dt><samp>smb=<var>dir</var>[,smbserver=<var>addr</var>]</samp></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 <samp><var>dir</var></samp>
transparently. The IP address of the SMB server can be set to <var>addr</var>. By
default the 4th IP in the guest network is used, i.e. x.x.x.4.
</p>
<p>In the guest Windows OS, the line:
</p><div class="example">
<pre class="example">10.0.2.4 smbserver
</pre></div>
<p>must be added in the file <samp>C:\WINDOWS\LMHOSTS</samp> (for windows 9x/Me)
or <samp>C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS</samp> (Windows NT/2000).
</p>
<p>Then <samp><var>dir</var></samp> can be accessed in <samp>\\smbserver\qemu</samp>.
</p>
<p>Note that a SAMBA server must be installed on the host OS.
</p>
</dd>
<dt><samp>hostfwd=[tcp|udp]:[<var>hostaddr</var>]:<var>hostport</var>-[<var>guestaddr</var>]:<var>guestport</var></samp></dt>
<dd><p>Redirect incoming TCP or UDP connections to the host port <var>hostport</var> to
the guest IP address <var>guestaddr</var> on guest port <var>guestport</var>. If
<var>guestaddr</var> is not specified, its value is x.x.x.15 (default first address
given by the built-in DHCP server). By specifying <var>hostaddr</var>, the rule can
be bound to a specific host interface. If no connection type is set, TCP is
used. This option can be given multiple times.
</p>
<p>For example, to redirect host X11 connection from screen 1 to guest
screen 0, use the following:
</p>
<div class="example">
<pre class="example"># on the host
qemu-system-i386 -nic user,hostfwd=tcp:127.0.0.1:6001-:6000
# this host xterm should open in the guest X11 server
xterm -display :1
</pre></div>
<p>To redirect telnet connections from host port 5555 to telnet port on
the guest, use the following:
</p>
<div class="example">
<pre class="example"># on the host
qemu-system-i386 -nic user,hostfwd=tcp::5555-:23
telnet localhost 5555
</pre></div>
<p>Then when you use on the host <code>telnet localhost 5555</code>, you
connect to the guest telnet server.
</p>
</dd>
<dt><samp>guestfwd=[tcp]:<var>server</var>:<var>port</var>-<var>dev</var></samp></dt>
<dt><samp>guestfwd=[tcp]:<var>server</var>:<var>port</var>-<var>cmd:command</var></samp></dt>
<dd><p>Forward guest TCP connections to the IP address <var>server</var> on port <var>port</var>
to the character device <var>dev</var> or to a program executed by <var>cmd:command</var>
which gets spawned for each connection. This option can be given multiple times.
</p>
<p>You can either use a chardev directly and have that one used throughout QEMU&rsquo;s
lifetime, like in the following example:
</p>
<div class="example">
<pre class="example"># open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever
# the guest accesses it
qemu-system-i386 -nic user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321
</pre></div>
<p>Or you can execute a command on every TCP connection established by the guest,
so that QEMU behaves similar to an inetd process for that virtual server:
</p>
<div class="example">
<pre class="example"># call &quot;netcat 10.10.1.1 4321&quot; on every TCP connection to 10.0.2.100:1234
# and connect the TCP stream to its stdin/stdout
qemu-system-i386 -nic 'user,id=n1,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
</pre></div>
</dd>
</dl>
<p>Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still
processed and applied to -net user. Mixing them with the new configuration
syntax gives undefined results. Their use for new applications is discouraged
as they will be removed from future versions.
</p>
</dd>
<dt><samp>-netdev tap,id=<var>id</var>[,fd=<var>h</var>][,ifname=<var>name</var>][,script=<var>file</var>][,downscript=<var>dfile</var>][,br=<var>bridge</var>][,helper=<var>helper</var>]</samp></dt>
<dd><p>Configure a host TAP network backend with ID <var>id</var>.
</p>
<p>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. The default network configure script is
<samp>/etc/qemu-ifup</samp> and the default network deconfigure script is
<samp>/etc/qemu-ifdown</samp>. Use <samp>script=no</samp> or <samp>downscript=no</samp>
to disable script execution.
</p>
<p>If running QEMU as an unprivileged user, use the network helper
<var>helper</var> to configure the TAP interface and attach it to the bridge.
The default network helper executable is <samp>/path/to/qemu-bridge-helper</samp>
and the default bridge device is <samp>br0</samp>.
</p>
<p><samp>fd</samp>=<var>h</var> can be used to specify the handle of an already
opened host TAP interface.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">#launch a QEMU instance with the default network script
qemu-system-i386 linux.img -nic tap
</pre></div>
<div class="example">
<pre class="example">#launch a QEMU instance with two NICs, each one connected
#to a TAP device
qemu-system-i386 linux.img \
-netdev tap,id=nd0,ifname=tap0 -device e1000,netdev=nd0 \
-netdev tap,id=nd1,ifname=tap1 -device rtl8139,netdev=nd1
</pre></div>
<div class="example">
<pre class="example">#launch a QEMU instance with the default network helper to
#connect a TAP device to bridge br0
qemu-system-i386 linux.img -device virtio-net-pci,netdev=n1 \
-netdev tap,id=n1,&quot;helper=/path/to/qemu-bridge-helper&quot;
</pre></div>
</dd>
<dt><samp>-netdev bridge,id=<var>id</var>[,br=<var>bridge</var>][,helper=<var>helper</var>]</samp></dt>
<dd><p>Connect a host TAP network interface to a host bridge device.
</p>
<p>Use the network helper <var>helper</var> to configure the TAP interface and
attach it to the bridge. The default network helper executable is
<samp>/path/to/qemu-bridge-helper</samp> and the default bridge
device is <samp>br0</samp>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">#launch a QEMU instance with the default network helper to
#connect a TAP device to bridge br0
qemu-system-i386 linux.img -netdev bridge,id=n1 -device virtio-net,netdev=n1
</pre></div>
<div class="example">
<pre class="example">#launch a QEMU instance with the default network helper to
#connect a TAP device to bridge qemubr0
qemu-system-i386 linux.img -netdev bridge,br=qemubr0,id=n1 -device virtio-net,netdev=n1
</pre></div>
</dd>
<dt><samp>-netdev socket,id=<var>id</var>[,fd=<var>h</var>][,listen=[<var>host</var>]:<var>port</var>][,connect=<var>host</var>:<var>port</var>]</samp></dt>
<dd>
<p>This host network backend can be used to connect the guest&rsquo;s network to
another QEMU virtual machine using a TCP socket connection. If <samp>listen</samp>
is specified, QEMU waits for incoming connections on <var>port</var>
(<var>host</var> is optional). <samp>connect</samp> is used to connect to
another QEMU instance using the <samp>listen</samp> option. <samp>fd</samp>=<var>h</var>
specifies an already opened TCP socket.
</p>
<p>Example:
</p><div class="example">
<pre class="example"># launch a first QEMU instance
qemu-system-i386 linux.img \
-device e1000,netdev=n1,mac=52:54:00:12:34:56 \
-netdev socket,id=n1,listen=:1234
# connect the network of this instance to the network of the first instance
qemu-system-i386 linux.img \
-device e1000,netdev=n2,mac=52:54:00:12:34:57 \
-netdev socket,id=n2,connect=127.0.0.1:1234
</pre></div>
</dd>
<dt><samp>-netdev socket,id=<var>id</var>[,fd=<var>h</var>][,mcast=<var>maddr</var>:<var>port</var>[,localaddr=<var>addr</var>]]</samp></dt>
<dd>
<p>Configure a socket host network backend to share the guest&rsquo;s network traffic
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 <samp>eth<var>N</var>=mcast</samp>), see
<a href="http://user-mode-linux.sf.net">http://user-mode-linux.sf.net</a>.
</li><li> Use <samp>fd=h</samp> to specify an already opened UDP multicast socket.
</li></ol>
<p>Example:
</p><div class="example">
<pre class="example"># launch one QEMU instance
qemu-system-i386 linux.img \
-device e1000,netdev=n1,mac=52:54:00:12:34:56 \
-netdev socket,id=n1,mcast=230.0.0.1:1234
# launch another QEMU instance on same &quot;bus&quot;
qemu-system-i386 linux.img \
-device e1000,netdev=n2,mac=52:54:00:12:34:57 \
-netdev socket,id=n2,mcast=230.0.0.1:1234
# launch yet another QEMU instance on same &quot;bus&quot;
qemu-system-i386 linux.img \
-device e1000,netdev=n3,macaddr=52:54:00:12:34:58 \
-netdev socket,id=n3,mcast=230.0.0.1:1234
</pre></div>
<p>Example (User Mode Linux compat.):
</p><div class="example">
<pre class="example"># launch QEMU instance (note mcast address selected is UML's default)
qemu-system-i386 linux.img \
-device e1000,netdev=n1,mac=52:54:00:12:34:56 \
-netdev socket,id=n1,mcast=239.192.168.1:1102
# launch UML
/path/to/linux ubd0=/path/to/root_fs eth0=mcast
</pre></div>
<p>Example (send packets from host&rsquo;s 1.2.3.4):
</p><div class="example">
<pre class="example">qemu-system-i386 linux.img \
-device e1000,netdev=n1,mac=52:54:00:12:34:56 \
-netdev socket,id=n1,mcast=239.192.168.1:1102,localaddr=1.2.3.4
</pre></div>
</dd>
<dt><samp>-netdev l2tpv3,id=<var>id</var>,src=<var>srcaddr</var>,dst=<var>dstaddr</var>[,srcport=<var>srcport</var>][,dstport=<var>dstport</var>],txsession=<var>txsession</var>[,rxsession=<var>rxsession</var>][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=<var>txcookie</var>][,rxcookie=<var>rxcookie</var>][,offset=<var>offset</var>]</samp></dt>
<dd><p>Configure a L2TPv3 pseudowire host network backend. L2TPv3 (RFC3391) is a
popular protocol to transport Ethernet (and other Layer 2) data frames between
two systems. It is present in routers, firewalls and the Linux kernel
(from version 3.3 onwards).
</p>
<p>This transport allows a VM to communicate to another VM, router or firewall directly.
</p>
<dl compact="compact">
<dt><samp>src=<var>srcaddr</var></samp></dt>
<dd><p>source address (mandatory)
</p></dd>
<dt><samp>dst=<var>dstaddr</var></samp></dt>
<dd><p>destination address (mandatory)
</p></dd>
<dt><samp>udp</samp></dt>
<dd><p>select udp encapsulation (default is ip).
</p></dd>
<dt><samp>srcport=<var>srcport</var></samp></dt>
<dd><p>source udp port.
</p></dd>
<dt><samp>dstport=<var>dstport</var></samp></dt>
<dd><p>destination udp port.
</p></dd>
<dt><samp>ipv6</samp></dt>
<dd><p>force v6, otherwise defaults to v4.
</p></dd>
<dt><samp>rxcookie=<var>rxcookie</var></samp></dt>
<dt><samp>txcookie=<var>txcookie</var></samp></dt>
<dd><p>Cookies are a weak form of security in the l2tpv3 specification.
Their function is mostly to prevent misconfiguration. By default they are 32
bit.
</p></dd>
<dt><samp>cookie64</samp></dt>
<dd><p>Set cookie size to 64 bit instead of the default 32
</p></dd>
<dt><samp>counter=off</samp></dt>
<dd><p>Force a &rsquo;cut-down&rsquo; L2TPv3 with no counter as in
draft-mkonstan-l2tpext-keyed-ipv6-tunnel-00
</p></dd>
<dt><samp>pincounter=on</samp></dt>
<dd><p>Work around broken counter handling in peer. This may also help on
networks which have packet reorder.
</p></dd>
<dt><samp>offset=<var>offset</var></samp></dt>
<dd><p>Add an extra offset between header and data
</p></dd>
</dl>
<p>For example, to attach a VM running on host 4.3.2.1 via L2TPv3 to the bridge br-lan
on the remote Linux host 1.2.3.4:
</p><div class="example">
<pre class="example"># Setup tunnel on linux host using raw ip as encapsulation
# on 1.2.3.4
ip l2tp add tunnel remote 4.3.2.1 local 1.2.3.4 tunnel_id 1 peer_tunnel_id 1 \
encap udp udp_sport 16384 udp_dport 16384
ip l2tp add session tunnel_id 1 name vmtunnel0 session_id \
0xFFFFFFFF peer_session_id 0xFFFFFFFF
ifconfig vmtunnel0 mtu 1500
ifconfig vmtunnel0 up
brctl addif br-lan vmtunnel0
# on 4.3.2.1
# launch QEMU instance - if your network has reorder or is very lossy add ,pincounter
qemu-system-i386 linux.img -device e1000,netdev=n1 \
-netdev l2tpv3,id=n1,src=4.2.3.1,dst=1.2.3.4,udp,srcport=16384,dstport=16384,rxsession=0xffffffff,txsession=0xffffffff,counter
</pre></div>
</dd>
<dt><samp>-netdev vde,id=<var>id</var>[,sock=<var>socketpath</var>][,port=<var>n</var>][,group=<var>groupname</var>][,mode=<var>octalmode</var>]</samp></dt>
<dd><p>Configure VDE backend to connect 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 only available if QEMU has been compiled
with vde support enabled.
</p>
<p>Example:
</p><div class="example">
<pre class="example"># launch vde switch
vde_switch -F -sock /tmp/myswitch
# launch QEMU instance
qemu-system-i386 linux.img -nic vde,sock=/tmp/myswitch
</pre></div>
</dd>
<dt><samp>-netdev vhost-user,chardev=<var>id</var>[,vhostforce=on|off][,queues=n]</samp></dt>
<dd>
<p>Establish a vhost-user netdev, backed by a chardev <var>id</var>. The chardev should
be a unix domain socket backed one. The vhost-user uses a specifically defined
protocol to pass vhost ioctl replacement messages to an application on the other
end of the socket. On non-MSIX guests, the feature can be forced with
<var>vhostforce</var>. Use &rsquo;queues=<var>n</var>&rsquo; to specify the number of queues to
be created for multiqueue vhost-user.
</p>
<p>Example:
</p><div class="example">
<pre class="example">qemu -m 512 -object memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \
-numa node,memdev=mem \
-chardev socket,id=chr0,path=/path/to/socket \
-netdev type=vhost-user,id=net0,chardev=chr0 \
-device virtio-net-pci,netdev=net0
</pre></div>
</dd>
<dt><samp>-netdev hubport,id=<var>id</var>,hubid=<var>hubid</var>[,netdev=<var>nd</var>]</samp></dt>
<dd>
<p>Create a hub port on the emulated hub with ID <var>hubid</var>.
</p>
<p>The hubport netdev lets you connect a NIC to a QEMU emulated hub instead of a
single netdev. Alternatively, you can also connect the hubport to another
netdev with ID <var>nd</var> by using the <samp>netdev=<var>nd</var></samp> option.
</p>
</dd>
<dt><samp>-net nic[,netdev=<var>nd</var>][,macaddr=<var>mac</var>][,model=<var>type</var>] [,name=<var>name</var>][,addr=<var>addr</var>][,vectors=<var>v</var>]</samp></dt>
<dd><a name="index-_002dnet"></a>
<p>Legacy option to configure or create an on-board (or machine default) Network
Interface Card(NIC) and connect it either to the emulated hub with ID 0 (i.e.
the default hub), or to the netdev <var>nd</var>.
The NIC is an e1000 by default on the PC target. Optionally, the MAC address
can be changed to <var>mac</var>, the device address set to <var>addr</var> (PCI cards
only), and a <var>name</var> can be assigned for use in monitor commands.
Optionally, for PCI cards, you can specify the number <var>v</var> of MSI-X vectors
that the card should have; this option currently only affects virtio cards; set
<var>v</var> = 0 to disable MSI-X. If no <samp>-net</samp> option is specified, a single
NIC is created. QEMU can emulate several different models of network card.
Use <code>-net nic,model=help</code> for a list of available devices for your target.
</p>
</dd>
<dt><samp>-net user|tap|bridge|socket|l2tpv3|vde[,...][,name=<var>name</var>]</samp></dt>
<dd><p>Configure a host network backend (with the options corresponding to the same
<samp>-netdev</samp> option) and connect it to the emulated hub 0 (the default
hub). Use <var>name</var> to specify the name of the hub port.
</p></dd>
</dl>
<a name="Character-device-options"></a>
<h4 class="subsection">2.3.7 Character device options</h4>
<p>The general form of a character device option is:
</p><dl compact="compact">
<dt><samp>-chardev <var>backend</var>,id=<var>id</var>[,mux=on|off][,<var>options</var>]</samp></dt>
<dd><a name="index-_002dchardev"></a>
<p>Backend is one of:
<samp>null</samp>,
<samp>socket</samp>,
<samp>udp</samp>,
<samp>msmouse</samp>,
<samp>vc</samp>,
<samp>ringbuf</samp>,
<samp>file</samp>,
<samp>pipe</samp>,
<samp>console</samp>,
<samp>serial</samp>,
<samp>pty</samp>,
<samp>stdio</samp>,
<samp>braille</samp>,
<samp>tty</samp>,
<samp>parallel</samp>,
<samp>parport</samp>,
<samp>spicevmc</samp>,
<samp>spiceport</samp>.
The specific backend will determine the applicable options.
</p>
<p>Use <code>-chardev help</code> to print all available chardev backend types.
</p>
<p>All devices must have an id, which can be any string up to 127 characters long.
It is used to uniquely identify this device in other command line directives.
</p>
<p>A character device may be used in multiplexing mode by multiple front-ends.
Specify <samp>mux=on</samp> to enable this mode.
A multiplexer is a &quot;1:N&quot; device, and here the &quot;1&quot; end is your specified chardev
backend, and the &quot;N&quot; end is the various parts of QEMU that can talk to a chardev.
If you create a chardev with <samp>id=myid</samp> and <samp>mux=on</samp>, QEMU will
create a multiplexer with your specified ID, and you can then configure multiple
front ends to use that chardev ID for their input/output. Up to four different
front ends can be connected to a single multiplexed chardev. (Without
multiplexing enabled, a chardev can only be used by a single front end.)
For instance you could use this to allow a single stdio chardev to be used by
two serial ports and the QEMU monitor:
</p>
<div class="example">
<pre class="example">-chardev stdio,mux=on,id=char0 \
-mon chardev=char0,mode=readline \
-serial chardev:char0 \
-serial chardev:char0
</pre></div>
<p>You can have more than one multiplexer in a system configuration; for instance
you could have a TCP port multiplexed between UART 0 and UART 1, and stdio
multiplexed between the QEMU monitor and a parallel port:
</p>
<div class="example">
<pre class="example">-chardev stdio,mux=on,id=char0 \
-mon chardev=char0,mode=readline \
-parallel chardev:char0 \
-chardev tcp,...,mux=on,id=char1 \
-serial chardev:char1 \
-serial chardev:char1
</pre></div>
<p>When you&rsquo;re using a multiplexed character device, some escape sequences are
interpreted in the input. See <a href="#mux_005fkeys">Keys in the character backend
multiplexer</a>.
</p>
<p>Note that some other command line options may implicitly create multiplexed
character backends; for instance <samp>-serial mon:stdio</samp> creates a
multiplexed stdio backend connected to the serial port and the QEMU monitor,
and <samp>-nographic</samp> also multiplexes the console and the monitor to
stdio.
</p>
<p>There is currently no support for multiplexing in the other direction
(where a single QEMU front end takes input and output from multiple chardevs).
</p>
<p>Every backend supports the <samp>logfile</samp> option, which supplies the path
to a file to record all data transmitted via the backend. The <samp>logappend</samp>
option controls whether the log file will be truncated or appended to when
opened.
</p>
</dd>
</dl>
<p>The available backends are:
</p>
<dl compact="compact">
<dt><samp>-chardev null,id=<var>id</var></samp></dt>
<dd><p>A void device. This device will not emit any data, and will drop any data it
receives. The null backend does not take any options.
</p>
</dd>
<dt><samp>-chardev socket,id=<var>id</var>[,<var>TCP options</var> or <var>unix options</var>][,server][,nowait][,telnet][,reconnect=<var>seconds</var>][,tls-creds=<var>id</var>]</samp></dt>
<dd>
<p>Create a two-way stream socket, which can be either a TCP or a unix socket. A
unix socket will be created if <samp>path</samp> is specified. Behaviour is
undefined if TCP options are specified for a unix socket.
</p>
<p><samp>server</samp> specifies that the socket shall be a listening socket.
</p>
<p><samp>nowait</samp> specifies that QEMU should not block waiting for a client to
connect to a listening socket.
</p>
<p><samp>telnet</samp> specifies that traffic on the socket should interpret telnet
escape sequences.
</p>
<p><samp>reconnect</samp> sets the timeout for reconnecting on non-server sockets when
the remote end goes away. qemu will delay this many seconds and then attempt
to reconnect. Zero disables reconnecting, and is the default.
</p>
<p><samp>tls-creds</samp> requests enablement of the TLS protocol for encryption,
and specifies the id of the TLS credentials to use for the handshake. The
credentials must be previously created with the <samp>-object tls-creds</samp>
argument.
</p>
<p>TCP and unix socket options are given below:
</p>
<dl compact="compact">
<dt><samp>TCP options: port=<var>port</var>[,host=<var>host</var>][,to=<var>to</var>][,ipv4][,ipv6][,nodelay]</samp></dt>
<dd>
<p><samp>host</samp> for a listening socket specifies the local address to be bound.
For a connecting socket species the remote host to connect to. <samp>host</samp> is
optional for listening sockets. If not specified it defaults to <code>0.0.0.0</code>.
</p>
<p><samp>port</samp> for a listening socket specifies the local port to be bound. For a
connecting socket specifies the port on the remote host to connect to.
<samp>port</samp> can be given as either a port number or a service name.
<samp>port</samp> is required.
</p>
<p><samp>to</samp> is only relevant to listening sockets. If it is specified, and
<samp>port</samp> cannot be bound, QEMU will attempt to bind to subsequent ports up
to and including <samp>to</samp> until it succeeds. <samp>to</samp> must be specified
as a port number.
</p>
<p><samp>ipv4</samp> and <samp>ipv6</samp> specify that either IPv4 or IPv6 must be used.
If neither is specified the socket may use either protocol.
</p>
<p><samp>nodelay</samp> disables the Nagle algorithm.
</p>
</dd>
<dt><samp>unix options: path=<var>path</var></samp></dt>
<dd>
<p><samp>path</samp> specifies the local path of the unix socket. <samp>path</samp> is
required.
</p>
</dd>
</dl>
</dd>
<dt><samp>-chardev udp,id=<var>id</var>[,host=<var>host</var>],port=<var>port</var>[,localaddr=<var>localaddr</var>][,localport=<var>localport</var>][,ipv4][,ipv6]</samp></dt>
<dd>
<p>Sends all traffic from the guest to a remote host over UDP.
</p>
<p><samp>host</samp> specifies the remote host to connect to. If not specified it
defaults to <code>localhost</code>.
</p>
<p><samp>port</samp> specifies the port on the remote host to connect to. <samp>port</samp>
is required.
</p>
<p><samp>localaddr</samp> specifies the local address to bind to. If not specified it
defaults to <code>0.0.0.0</code>.
</p>
<p><samp>localport</samp> specifies the local port to bind to. If not specified any
available local port will be used.
</p>
<p><samp>ipv4</samp> and <samp>ipv6</samp> specify that either IPv4 or IPv6 must be used.
If neither is specified the device may use either protocol.
</p>
</dd>
<dt><samp>-chardev msmouse,id=<var>id</var></samp></dt>
<dd>
<p>Forward QEMU&rsquo;s emulated msmouse events to the guest. <samp>msmouse</samp> does not
take any options.
</p>
</dd>
<dt><samp>-chardev vc,id=<var>id</var>[[,width=<var>width</var>][,height=<var>height</var>]][[,cols=<var>cols</var>][,rows=<var>rows</var>]]</samp></dt>
<dd>
<p>Connect to a QEMU text console. <samp>vc</samp> may optionally be given a specific
size.
</p>
<p><samp>width</samp> and <samp>height</samp> specify the width and height respectively of
the console, in pixels.
</p>
<p><samp>cols</samp> and <samp>rows</samp> specify that the console be sized to fit a text
console with the given dimensions.
</p>
</dd>
<dt><samp>-chardev ringbuf,id=<var>id</var>[,size=<var>size</var>]</samp></dt>
<dd>
<p>Create a ring buffer with fixed size <samp>size</samp>.
<var>size</var> must be a power of two and defaults to <code>64K</code>.
</p>
</dd>
<dt><samp>-chardev file,id=<var>id</var>,path=<var>path</var></samp></dt>
<dd>
<p>Log all traffic received from the guest to a file.
</p>
<p><samp>path</samp> specifies the path of the file to be opened. This file will be
created if it does not already exist, and overwritten if it does. <samp>path</samp>
is required.
</p>
</dd>
<dt><samp>-chardev pipe,id=<var>id</var>,path=<var>path</var></samp></dt>
<dd>
<p>Create a two-way connection to the guest. The behaviour differs slightly between
Windows hosts and other hosts:
</p>
<p>On Windows, a single duplex pipe will be created at
<samp>\\.pipe\<samp>path</samp></samp>.
</p>
<p>On other hosts, 2 pipes will be created called <samp><samp>path</samp>.in</samp> and
<samp><samp>path</samp>.out</samp>. Data written to <samp><samp>path</samp>.in</samp> will be
received by the guest. Data written by the guest can be read from
<samp><samp>path</samp>.out</samp>. QEMU will not create these fifos, and requires them to
be present.
</p>
<p><samp>path</samp> forms part of the pipe path as described above. <samp>path</samp> is
required.
</p>
</dd>
<dt><samp>-chardev console,id=<var>id</var></samp></dt>
<dd>
<p>Send traffic from the guest to QEMU&rsquo;s standard output. <samp>console</samp> does not
take any options.
</p>
<p><samp>console</samp> is only available on Windows hosts.
</p>
</dd>
<dt><samp>-chardev serial,id=<var>id</var>,path=<samp>path</samp></samp></dt>
<dd>
<p>Send traffic from the guest to a serial device on the host.
</p>
<p>On Unix hosts serial will actually accept any tty device,
not only serial lines.
</p>
<p><samp>path</samp> specifies the name of the serial device to open.
</p>
</dd>
<dt><samp>-chardev pty,id=<var>id</var></samp></dt>
<dd>
<p>Create a new pseudo-terminal on the host and connect to it. <samp>pty</samp> does
not take any options.
</p>
<p><samp>pty</samp> is not available on Windows hosts.
</p>
</dd>
<dt><samp>-chardev stdio,id=<var>id</var>[,signal=on|off]</samp></dt>
<dd><p>Connect to standard input and standard output of the QEMU process.
</p>
<p><samp>signal</samp> controls if signals are enabled on the terminal, that includes
exiting QEMU with the key sequence <tt class="key">Control-c</tt>. This option is enabled by
default, use <samp>signal=off</samp> to disable it.
</p>
</dd>
<dt><samp>-chardev braille,id=<var>id</var></samp></dt>
<dd>
<p>Connect to a local BrlAPI server. <samp>braille</samp> does not take any options.
</p>
</dd>
<dt><samp>-chardev tty,id=<var>id</var>,path=<var>path</var></samp></dt>
<dd>
<p><samp>tty</samp> is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and
DragonFlyBSD hosts. It is an alias for <samp>serial</samp>.
</p>
<p><samp>path</samp> specifies the path to the tty. <samp>path</samp> is required.
</p>
</dd>
<dt><samp>-chardev parallel,id=<var>id</var>,path=<var>path</var></samp></dt>
<dt><samp>-chardev parport,id=<var>id</var>,path=<var>path</var></samp></dt>
<dd>
<p><samp>parallel</samp> is only available on Linux, FreeBSD and DragonFlyBSD hosts.
</p>
<p>Connect to a local parallel port.
</p>
<p><samp>path</samp> specifies the path to the parallel port device. <samp>path</samp> is
required.
</p>
</dd>
<dt><samp>-chardev spicevmc,id=<var>id</var>,debug=<var>debug</var>,name=<var>name</var></samp></dt>
<dd>
<p><samp>spicevmc</samp> is only available when spice support is built in.
</p>
<p><samp>debug</samp> debug level for spicevmc
</p>
<p><samp>name</samp> name of spice channel to connect to
</p>
<p>Connect to a spice virtual machine channel, such as vdiport.
</p>
</dd>
<dt><samp>-chardev spiceport,id=<var>id</var>,debug=<var>debug</var>,name=<var>name</var></samp></dt>
<dd>
<p><samp>spiceport</samp> is only available when spice support is built in.
</p>
<p><samp>debug</samp> debug level for spicevmc
</p>
<p><samp>name</samp> name of spice port to connect to
</p>
<p>Connect to a spice port, allowing a Spice client to handle the traffic
identified by a name (preferably a fqdn).
</p></dd>
</dl>
<a name="Bluetooth_0028R_0029-options"></a>
<h4 class="subsection">2.3.8 Bluetooth(R) options</h4>
<dl compact="compact">
<dt><samp>-bt hci[...]</samp></dt>
<dd><a name="index-_002dbt"></a>
<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&rsquo;s
logic. The Transport Layer is decided by the machine type. Currently
the machines <code>n800</code> and <code>n810</code> have one HCI and all other
machines have none.
</p>
<a name="bt_002dhcis"></a><p>The following three types are recognized:
</p>
<dl compact="compact">
<dt><samp>-bt hci,null</samp></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><samp>-bt hci,host[:<var>id</var>]</samp></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><samp>-bt hci[,vlan=<var>n</var>]</samp></dt>
<dd><p>Add a virtual, standard HCI that will participate in the Bluetooth
scatternet <var>n</var> (default <code>0</code>). Similarly to <samp>-net</samp>
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><samp>-bt vhci[,vlan=<var>n</var>]</samp></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>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
</pre></div>
</dd>
<dt><samp>-bt device:<var>dev</var>[,vlan=<var>n</var>]</samp></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><samp>keyboard</samp></dt>
<dd><p>Virtual wireless keyboard implementing the HIDP bluetooth profile.
</p></dd>
</dl>
</dd>
</dl>
<a name="TPM-device-options"></a>
<h4 class="subsection">2.3.9 TPM device options</h4>
<p>The general form of a TPM device option is:
</p><dl compact="compact">
<dt><samp>-tpmdev <var>backend</var>,id=<var>id</var>[,<var>options</var>]</samp></dt>
<dd><a name="index-_002dtpmdev"></a>
<p>The specific backend type will determine the applicable options.
The <code>-tpmdev</code> option creates the TPM backend and requires a
<code>-device</code> option that specifies the TPM frontend interface model.
</p>
<p>Use <code>-tpmdev help</code> to print all available TPM backend types.
</p>
</dd>
</dl>
<p>The available backends are:
</p>
<dl compact="compact">
<dt><samp>-tpmdev passthrough,id=<var>id</var>,path=<var>path</var>,cancel-path=<var>cancel-path</var></samp></dt>
<dd>
<p>(Linux-host only) Enable access to the host&rsquo;s TPM using the passthrough
driver.
</p>
<p><samp>path</samp> specifies the path to the host&rsquo;s TPM device, i.e., on
a Linux host this would be <code>/dev/tpm0</code>.
<samp>path</samp> is optional and by default <code>/dev/tpm0</code> is used.
</p>
<p><samp>cancel-path</samp> specifies the path to the host TPM device&rsquo;s sysfs
entry allowing for cancellation of an ongoing TPM command.
<samp>cancel-path</samp> is optional and by default QEMU will search for the
sysfs entry to use.
</p>
<p>Some notes about using the host&rsquo;s TPM with the passthrough driver:
</p>
<p>The TPM device accessed by the passthrough driver must not be
used by any other application on the host.
</p>
<p>Since the host&rsquo;s firmware (BIOS/UEFI) has already initialized the TPM,
the VM&rsquo;s firmware (BIOS/UEFI) will not be able to initialize the
TPM again and may therefore not show a TPM-specific menu that would
otherwise allow the user to configure the TPM, e.g., allow the user to
enable/disable or activate/deactivate the TPM.
Further, if TPM ownership is released from within a VM then the host&rsquo;s TPM
will get disabled and deactivated. To enable and activate the
TPM again afterwards, the host has to be rebooted and the user is
required to enter the firmware&rsquo;s menu to enable and activate the TPM.
If the TPM is left disabled and/or deactivated most TPM commands will fail.
</p>
<p>To create a passthrough TPM use the following two options:
</p><div class="example">
<pre class="example">-tpmdev passthrough,id=tpm0 -device tpm-tis,tpmdev=tpm0
</pre></div>
<p>Note that the <code>-tpmdev</code> id is <code>tpm0</code> and is referenced by
<code>tpmdev=tpm0</code> in the device option.
</p>
</dd>
<dt><samp>-tpmdev emulator,id=<var>id</var>,chardev=<var>dev</var></samp></dt>
<dd>
<p>(Linux-host only) Enable access to a TPM emulator using Unix domain socket based
chardev backend.
</p>
<p><samp>chardev</samp> specifies the unique ID of a character device backend that provides connection to the software TPM server.
</p>
<p>To create a TPM emulator backend device with chardev socket backend:
</p><div class="example">
<pre class="example">
-chardev socket,id=chrtpm,path=/tmp/swtpm-sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0
</pre></div>
</dd>
</dl>
<a name="Linux_002fMultiboot-boot-specific"></a>
<h4 class="subsection">2.3.10 Linux/Multiboot boot specific</h4>
<p>When using these options, you can use a given Linux or Multiboot
kernel without installing it in the disk image. It can be useful
for easier testing of various kernels.
</p>
<dl compact="compact">
<dt><samp>-kernel <var>bzImage</var></samp></dt>
<dd><a name="index-_002dkernel"></a>
<p>Use <var>bzImage</var> as kernel image. The kernel can be either a Linux kernel
or in multiboot format.
</p></dd>
<dt><samp>-append <var>cmdline</var></samp></dt>
<dd><a name="index-_002dappend"></a>
<p>Use <var>cmdline</var> as kernel command line
</p></dd>
<dt><samp>-initrd <var>file</var></samp></dt>
<dd><a name="index-_002dinitrd"></a>
<p>Use <var>file</var> as initial ram disk.
</p>
</dd>
<dt><samp>-initrd &quot;<var>file1</var> arg=foo,<var>file2</var>&quot;</samp></dt>
<dd>
<p>This syntax is only available with multiboot.
</p>
<p>Use <var>file1</var> and <var>file2</var> as modules and pass arg=foo as parameter to the
first module.
</p></dd>
<dt><samp>-dtb <var>file</var></samp></dt>
<dd><a name="index-_002ddtb"></a>
<p>Use <var>file</var> as a device tree binary (dtb) image and pass it to the kernel
on boot.
</p></dd>
</dl>
<a name="Debug_002fExpert-options"></a>
<h4 class="subsection">2.3.11 Debug/Expert options</h4>
<dl compact="compact">
<dt><samp>-fw_cfg [name=]<var>name</var>,file=<var>file</var></samp></dt>
<dd><a name="index-_002dfw_005fcfg"></a>
<p>Add named fw_cfg entry with contents from file <var>file</var>.
</p>
</dd>
<dt><samp>-fw_cfg [name=]<var>name</var>,string=<var>str</var></samp></dt>
<dd><p>Add named fw_cfg entry with contents from string <var>str</var>.
</p>
<p>The terminating NUL character of the contents of <var>str</var> will not be
included as part of the fw_cfg item data. To insert contents with
embedded NUL characters, you have to use the <var>file</var> parameter.
</p>
<p>The fw_cfg entries are passed by QEMU through to the guest.
</p>
<p>Example:
</p><div class="example">
<pre class="example">-fw_cfg name=opt/com.mycompany/blob,file=./my_blob.bin
</pre></div>
<p>creates an fw_cfg entry named opt/com.mycompany/blob with contents
from ./my_blob.bin.
</p>
</dd>
<dt><samp>-serial <var>dev</var></samp></dt>
<dd><a name="index-_002dserial"></a>
<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><samp>vc[:<var>W</var>x<var>H</var>]</samp></dt>
<dd><p>Virtual console. Optionally, a width and height can be given in pixel with
</p><div class="example">
<pre class="example">vc:800x600
</pre></div>
<p>It is also possible to specify width or height in characters:
</p><div class="example">
<pre class="example">vc:80Cx24C
</pre></div>
</dd>
<dt><samp>pty</samp></dt>
<dd><p>[Linux only] Pseudo TTY (a new PTY is automatically allocated)
</p></dd>
<dt><samp>none</samp></dt>
<dd><p>No device is allocated.
</p></dd>
<dt><samp>null</samp></dt>
<dd><p>void device
</p></dd>
<dt><samp>chardev:<var>id</var></samp></dt>
<dd><p>Use a named character device defined with the <code>-chardev</code> option.
</p></dd>
<dt><samp>/dev/XXX</samp></dt>
<dd><p>[Linux only] Use host tty, e.g. <samp>/dev/ttyS0</samp>. The host serial port
parameters are set according to the emulated ones.
</p></dd>
<dt><samp>/dev/parport<var>N</var></samp></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><samp>file:<var>filename</var></samp></dt>
<dd><p>Write output to <var>filename</var>. No character can be read.
</p></dd>
<dt><samp>stdio</samp></dt>
<dd><p>[Unix only] standard input/output
</p></dd>
<dt><samp>pipe:<var>filename</var></samp></dt>
<dd><p>name pipe <var>filename</var>
</p></dd>
<dt><samp>COM<var>n</var></samp></dt>
<dd><p>[Windows only] Use host serial port <var>n</var>
</p></dd>
<dt><samp>udp:[<var>remote_host</var>]:<var>remote_port</var>[@[<var>src_ip</var>]:<var>src_port</var>]</samp></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>
<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 set 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><samp>tcp:[<var>host</var>]:<var>port</var>[,<var>server</var>][,nowait][,nodelay][,reconnect=<var>seconds</var>]</samp></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. The <code>reconnect</code> option only applies if <var>noserver</var> is
set, if the connection goes down it will attempt to reconnect at the
given interval. 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><samp>telnet:<var>host</var>:<var>port</var>[,server][,nowait][,nodelay]</samp></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><samp>unix:<var>path</var>[,server][,nowait][,reconnect=<var>seconds</var>]</samp></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><samp>mon:<var>dev_string</var></samp></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
<tt class="key">Control-a</tt> and then pressing <tt class="key">c</tt>.
<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>
<p>When the monitor is multiplexed to stdio in this way, Ctrl+C will not terminate
QEMU any more but will be passed to the guest instead.
</p>
</dd>
<dt><samp>braille</samp></dt>
<dd><p>Braille device. This will use BrlAPI to display the braille output on a real
or fake device.
</p>
</dd>
<dt><samp>msmouse</samp></dt>
<dd><p>Three button serial mouse. Configure the guest to use Microsoft protocol.
</p></dd>
</dl>
</dd>
<dt><samp>-parallel <var>dev</var></samp></dt>
<dd><a name="index-_002dparallel"></a>
<p>Redirect the virtual parallel port to host device <var>dev</var> (same
devices as the serial port). On Linux hosts, <samp>/dev/parportN</samp> 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><samp>-monitor <var>dev</var></samp></dt>
<dd><a name="index-_002dmonitor"></a>
<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.
Use <code>-monitor none</code> to disable the default monitor.
</p></dd>
<dt><samp>-qmp <var>dev</var></samp></dt>
<dd><a name="index-_002dqmp"></a>
<p>Like -monitor but opens in &rsquo;control&rsquo; mode.
</p></dd>
<dt><samp>-qmp-pretty <var>dev</var></samp></dt>
<dd><a name="index-_002dqmp_002dpretty"></a>
<p>Like -qmp but uses pretty JSON formatting.
</p></dd>
<dt><samp>-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]</samp></dt>
<dd><a name="index-_002dmon"></a>
<p>Setup monitor on chardev <var>name</var>. <code>pretty</code> turns on JSON pretty printing
easing human reading and debugging.
</p></dd>
<dt><samp>-debugcon <var>dev</var></samp></dt>
<dd><a name="index-_002ddebugcon"></a>
<p>Redirect the debug console to host device <var>dev</var> (same devices as the
serial port). The debug console is an I/O port which is typically port
0xe9; writing to that I/O port sends output to this device.
The default device is <code>vc</code> in graphical mode and <code>stdio</code> in
non graphical mode.
</p></dd>
<dt><samp>-pidfile <var>file</var></samp></dt>
<dd><a name="index-_002dpidfile"></a>
<p>Store the QEMU process PID in <var>file</var>. It is useful if you launch QEMU
from a script.
</p></dd>
<dt><samp>-singlestep</samp></dt>
<dd><a name="index-_002dsinglestep"></a>
<p>Run the emulation in single step mode.
</p></dd>
<dt><samp>--preconfig</samp></dt>
<dd><a name="index-_002d_002dpreconfig"></a>
<p>Pause QEMU for interactive configuration before the machine is created,
which allows querying and configuring properties that will affect
machine initialization. Use QMP command &rsquo;x-exit-preconfig&rsquo; to exit
the preconfig state and move to the next state (i.e. run guest if -S
isn&rsquo;t used or pause the second time if -S is used). This option is
experimental.
</p></dd>
<dt><samp>-S</samp></dt>
<dd><a name="index-_002dS"></a>
<p>Do not start CPU at startup (you must type &rsquo;c&rsquo; in the monitor).
</p></dd>
<dt><samp>-realtime mlock=on|off</samp></dt>
<dd><a name="index-_002drealtime"></a>
<p>Run qemu with realtime features.
mlocking qemu and guest memory can be enabled via <samp>mlock=on</samp>
(enabled by default).
</p></dd>
<dt><samp>-overcommit mem-lock=on|off</samp></dt>
<dt><samp>-overcommit cpu-pm=on|off</samp></dt>
<dd><a name="index-_002dovercommit"></a>
<p>Run qemu with hints about host resource overcommit. The default is
to assume that host overcommits all resources.
</p>
<p>Locking qemu and guest memory can be enabled via <samp>mem-lock=on</samp> (disabled
by default). This works when host memory is not overcommitted and reduces the
worst-case latency for guest. This is equivalent to <samp>realtime</samp>.
</p>
<p>Guest ability to manage power state of host cpus (increasing latency for other
processes on the same host cpu, but decreasing latency for guest) can be
enabled via <samp>cpu-pm=on</samp> (disabled by default). This works best when
host CPU is not overcommitted. When used, host estimates of CPU cycle and power
utilization will be incorrect, not taking into account guest idle time.
</p></dd>
<dt><samp>-gdb <var>dev</var></samp></dt>
<dd><a name="index-_002dgdb"></a>
<p>Wait for gdb connection on device <var>dev</var> (see <a href="#gdb_005fusage">gdb_usage</a>). Typical
connections will likely be TCP-based, but also UDP, pseudo TTY, or even
stdio are reasonable use case. The latter is allowing to start QEMU from
within gdb and establish the connection via a pipe:
</p><div class="example">
<pre class="example">(gdb) target remote | exec qemu-system-i386 -gdb stdio ...
</pre></div>
</dd>
<dt><samp>-s</samp></dt>
<dd><a name="index-_002ds"></a>
<p>Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
(see <a href="#gdb_005fusage">gdb_usage</a>).
</p></dd>
<dt><samp>-d <var>item1</var>[,...]</samp></dt>
<dd><a name="index-_002dd"></a>
<p>Enable logging of specified items. Use &rsquo;-d help&rsquo; for a list of log items.
</p></dd>
<dt><samp>-D <var>logfile</var></samp></dt>
<dd><a name="index-_002dD"></a>
<p>Output log in <var>logfile</var> instead of to stderr
</p></dd>
<dt><samp>-dfilter <var>range1</var>[,...]</samp></dt>
<dd><a name="index-_002ddfilter"></a>
<p>Filter debug output to that relevant to a range of target addresses. The filter
spec can be either <var>start</var>+<var>size</var>, <var>start</var>-<var>size</var> or
<var>start</var>..<var>end</var> where <var>start</var> <var>end</var> and <var>size</var> are the
addresses and sizes required. For example:
</p><div class="example">
<pre class="example">-dfilter 0x8000..0x8fff,0xffffffc000080000+0x200,0xffffffc000060000-0x1000
</pre></div>
<p>Will dump output for any code in the 0x1000 sized block starting at 0x8000 and
the 0x200 sized block starting at 0xffffffc000080000 and another 0x1000 sized
block starting at 0xffffffc00005f000.
</p></dd>
<dt><samp>-L <var>path</var></samp></dt>
<dd><a name="index-_002dL"></a>
<p>Set the directory for the BIOS, VGA BIOS and keymaps.
</p>
<p>To list all the data directories, use <code>-L help</code>.
</p></dd>
<dt><samp>-bios <var>file</var></samp></dt>
<dd><a name="index-_002dbios"></a>
<p>Set the filename for the BIOS.
</p></dd>
<dt><samp>-enable-kvm</samp></dt>
<dd><a name="index-_002denable_002dkvm"></a>
<p>Enable KVM full virtualization support. This option is only available
if KVM support is enabled when compiling.
</p></dd>
<dt><samp>-enable-hax</samp></dt>
<dd><a name="index-_002denable_002dhax"></a>
<p>Enable HAX (Hardware-based Acceleration eXecution) support. This option
is only available if HAX support is enabled when compiling. HAX is only
applicable to MAC and Windows platform, and thus does not conflict with
KVM. This option is deprecated, use <samp>-accel hax</samp> instead.
</p></dd>
<dt><samp>-xen-domid <var>id</var></samp></dt>
<dd><a name="index-_002dxen_002ddomid"></a>
<p>Specify xen guest domain <var>id</var> (XEN only).
</p></dd>
<dt><samp>-xen-create</samp></dt>
<dd><a name="index-_002dxen_002dcreate"></a>
<p>Create domain using xen hypercalls, bypassing xend.
Warning: should not be used when xend is in use (XEN only).
</p></dd>
<dt><samp>-xen-attach</samp></dt>
<dd><a name="index-_002dxen_002dattach"></a>
<p>Attach to existing xen domain.
xend will use this when starting QEMU (XEN only).
<a name="index-_002dxen_002ddomid_002drestrict"></a>
Restrict set of available xen operations to specified domain id (XEN only).
</p></dd>
<dt><samp>-no-reboot</samp></dt>
<dd><a name="index-_002dno_002dreboot"></a>
<p>Exit instead of rebooting.
</p></dd>
<dt><samp>-no-shutdown</samp></dt>
<dd><a name="index-_002dno_002dshutdown"></a>
<p>Don&rsquo;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><samp>-loadvm <var>file</var></samp></dt>
<dd><a name="index-_002dloadvm"></a>
<p>Start right away with a saved state (<code>loadvm</code> in monitor)
</p></dd>
<dt><samp>-daemonize</samp></dt>
<dd><a name="index-_002ddaemonize"></a>
<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><samp>-option-rom <var>file</var></samp></dt>
<dd><a name="index-_002doption_002drom"></a>
<p>Load the contents of <var>file</var> as an option ROM.
This option is useful to load things like EtherBoot.
</p>
</dd>
<dt><samp>-rtc [base=utc|localtime|<var>date</var>][,clock=host|vm][,driftfix=none|slew]</samp></dt>
<dd><a name="index-_002drtc"></a>
<p>Specify <samp>base</samp> as <code>utc</code> or <code>localtime</code> to let the RTC start at the current
UTC or local time, respectively. <code>localtime</code> is required for correct date in
MS-DOS or Windows. To start at a specific point in time, provide <var>date</var> in the
format <code>2006-06-17T16:01:21</code> or <code>2006-06-17</code>. The default base is UTC.
</p>
<p>By default the RTC is driven by the host system time. This allows using of the
RTC as accurate reference clock inside the guest, specifically if the host
time is smoothly following an accurate external reference clock, e.g. via NTP.
If you want to isolate the guest time from the host, you can set <samp>clock</samp>
to <code>rt</code> instead. To even prevent it from progressing during suspension,
you can set it to <code>vm</code>.
</p>
<p>Enable <samp>driftfix</samp> (i386 targets only) if you experience time drift problems,
specifically with Windows&rsquo; 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><samp>-icount [shift=<var>N</var>|auto][,rr=record|replay,rrfile=<var>filename</var>,rrsnapshot=<var>snapshot</var>]</samp></dt>
<dd><a name="index-_002dicount"></a>
<p>Enable virtual instruction counter. The virtual cpu will execute one
instruction every 2^<var>N</var> ns of virtual time. If <code>auto</code> is specified
then the virtual cpu speed will be automatically adjusted to keep virtual
time within a few seconds of real time.
</p>
<p>When the virtual cpu is sleeping, the virtual time will advance at default
speed unless <samp>sleep=on|off</samp> is specified.
With <samp>sleep=on|off</samp>, the virtual time will jump to the next timer deadline
instantly whenever the virtual cpu goes to sleep mode and will not advance
if no timer is enabled. This behavior give deterministic execution times from
the guest point of view.
</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>
<p><samp>align=on</samp> will activate the delay algorithm which will try
to synchronise the host clock and the virtual clock. The goal is to
have a guest running at the real frequency imposed by the shift option.
Whenever the guest clock is behind the host clock and if
<samp>align=on</samp> is specified then we print a message to the user
to inform about the delay.
Currently this option does not work when <samp>shift</samp> is <code>auto</code>.
Note: The sync algorithm will work for those shift values for which
the guest clock runs ahead of the host clock. Typically this happens
when the shift value is high (how high depends on the host machine).
</p>
<p>When <samp>rr</samp> option is specified deterministic record/replay is enabled.
Replay log is written into <var>filename</var> file in record mode and
read from this file in replay mode.
</p>
<p>Option rrsnapshot is used to create new vm snapshot named <var>snapshot</var>
at the start of execution recording. In replay mode this option is used
to load the initial VM state.
</p></dd>
<dt><samp>-watchdog <var>model</var></samp></dt>
<dd><a name="index-_002dwatchdog"></a>
<p>Create a virtual hardware watchdog device. Once enabled (by a guest
action), the watchdog must be periodically polled by an agent inside
the guest or else the guest will be restarted. Choose a model for
which your guest has drivers.
</p>
<p>The <var>model</var> is the model of hardware watchdog to emulate. Use
<code>-watchdog help</code> to list available hardware models. Only one
watchdog can be enabled for a guest.
</p>
<p>The following models may be available:
</p><dl compact="compact">
<dt><samp>ib700</samp></dt>
<dd><p>iBASE 700 is a very simple ISA watchdog with a single timer.
</p></dd>
<dt><samp>i6300esb</samp></dt>
<dd><p>Intel 6300ESB I/O controller hub is a much more featureful PCI-based
dual-timer watchdog.
</p></dd>
<dt><samp>diag288</samp></dt>
<dd><p>A virtual watchdog for s390x backed by the diagnose 288 hypercall
(currently KVM only).
</p></dd>
</dl>
</dd>
<dt><samp>-watchdog-action <var>action</var></samp></dt>
<dd><a name="index-_002dwatchdog_002daction"></a>
<p>The <var>action</var> controls what QEMU will do when the watchdog timer
expires.
The default is
<code>reset</code> (forcefully reset the guest).
Other possible actions are:
<code>shutdown</code> (attempt to gracefully shutdown the guest),
<code>poweroff</code> (forcefully poweroff the guest),
<code>inject-nmi</code> (inject a NMI into the guest),
<code>pause</code> (pause the guest),
<code>debug</code> (print a debug message and continue), or
<code>none</code> (do nothing).
</p>
<p>Note that the <code>shutdown</code> action requires that the guest responds
to ACPI signals, which it may not be able to do in the sort of
situations where the watchdog would have expired, and thus
<code>-watchdog-action shutdown</code> is not recommended for production use.
</p>
<p>Examples:
</p>
<dl compact="compact">
<dt><code>-watchdog i6300esb -watchdog-action pause</code></dt>
<dt><code>-watchdog ib700</code></dt>
</dl>
</dd>
<dt><samp>-echr <var>numeric_ascii_value</var></samp></dt>
<dd><a name="index-_002dechr"></a>
<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><samp>-virtioconsole <var>c</var></samp></dt>
<dd><a name="index-_002dvirtioconsole"></a>
<p>Set virtio console.
This option is deprecated, please use <samp>-device virtconsole</samp> instead.
</p></dd>
<dt><samp>-show-cursor</samp></dt>
<dd><a name="index-_002dshow_002dcursor"></a>
<p>Show cursor.
</p></dd>
<dt><samp>-tb-size <var>n</var></samp></dt>
<dd><a name="index-_002dtb_002dsize"></a>
<p>Set TB size.
</p></dd>
<dt><samp>-incoming tcp:[<var>host</var>]:<var>port</var>[,to=<var>maxport</var>][,ipv4][,ipv6]</samp></dt>
<dt><samp>-incoming rdma:<var>host</var>:<var>port</var>[,ipv4][,ipv6]</samp></dt>
<dd><a name="index-_002dincoming"></a>
<p>Prepare for incoming migration, listen on a given tcp port.
</p>
</dd>
<dt><samp>-incoming unix:<var>socketpath</var></samp></dt>
<dd><p>Prepare for incoming migration, listen on a given unix socket.
</p>
</dd>
<dt><samp>-incoming fd:<var>fd</var></samp></dt>
<dd><p>Accept incoming migration from a given filedescriptor.
</p>
</dd>
<dt><samp>-incoming exec:<var>cmdline</var></samp></dt>
<dd><p>Accept incoming migration as an output from specified external command.
</p>
</dd>
<dt><samp>-incoming defer</samp></dt>
<dd><p>Wait for the URI to be specified via migrate_incoming. The monitor can
be used to change settings (such as migration parameters) prior to issuing
the migrate_incoming to allow the migration to begin.
</p></dd>
<dt><samp>-only-migratable</samp></dt>
<dd><a name="index-_002donly_002dmigratable"></a>
<p>Only allow migratable devices. Devices will not be allowed to enter an
unmigratable state.
</p></dd>
<dt><samp>-nodefaults</samp></dt>
<dd><a name="index-_002dnodefaults"></a>
<p>Don&rsquo;t create default devices. Normally, QEMU sets the default devices like serial
port, parallel port, virtual console, monitor device, VGA adapter, floppy and
CD-ROM drive and others. The <code>-nodefaults</code> option will disable all those
default devices.
</p></dd>
<dt><samp>-chroot <var>dir</var></samp></dt>
<dd><a name="index-_002dchroot"></a>
<p>Immediately before starting guest execution, chroot to the specified
directory. Especially useful in combination with -runas.
This option is not supported for Windows hosts.
</p></dd>
<dt><samp>-runas <var>user</var></samp></dt>
<dd><a name="index-_002drunas"></a>
<p>Immediately before starting guest execution, drop root privileges, switching
to the specified user.
</p></dd>
<dt><samp>-prom-env <var>variable</var>=<var>value</var></samp></dt>
<dd><a name="index-_002dprom_002denv"></a>
<p>Set OpenBIOS nvram <var>variable</var> to given <var>value</var> (PPC, SPARC only).
</p></dd>
<dt><samp>-semihosting</samp></dt>
<dd><a name="index-_002dsemihosting"></a>
<p>Enable semihosting mode (ARM, M68K, Xtensa, MIPS only).
</p></dd>
<dt><samp>-semihosting-config [enable=on|off][,target=native|gdb|auto][,arg=str[,...]]</samp></dt>
<dd><a name="index-_002dsemihosting_002dconfig"></a>
<p>Enable and configure semihosting (ARM, M68K, Xtensa, MIPS only).
</p><dl compact="compact">
<dt><samp>target=<code>native|gdb|auto</code></samp></dt>
<dd><p>Defines where the semihosting calls will be addressed, to QEMU (<code>native</code>)
or to GDB (<code>gdb</code>). The default is <code>auto</code>, which means <code>gdb</code>
during debug sessions and <code>native</code> otherwise.
</p></dd>
<dt><samp>arg=<var>str1</var>,arg=<var>str2</var>,...</samp></dt>
<dd><p>Allows the user to pass input arguments, and can be used multiple times to build
up a list. The old-style <code>-kernel</code>/<code>-append</code> method of passing a
command line is still supported for backward compatibility. If both the
<code>--semihosting-config arg</code> and the <code>-kernel</code>/<code>-append</code> are
specified, the former is passed to semihosting as it always takes precedence.
</p></dd>
</dl>
</dd>
<dt><samp>-old-param</samp></dt>
<dd><a name="index-_002dold_002dparam-_0028ARM_0029"></a>
<p>Old param mode (ARM only).
</p></dd>
<dt><samp>-sandbox <var>arg</var>[,obsolete=<var>string</var>][,elevateprivileges=<var>string</var>][,spawn=<var>string</var>][,resourcecontrol=<var>string</var>]</samp></dt>
<dd><a name="index-_002dsandbox"></a>
<p>Enable Seccomp mode 2 system call filter. &rsquo;on&rsquo; will enable syscall filtering and &rsquo;off&rsquo; will
disable it. The default is &rsquo;off&rsquo;.
</p><dl compact="compact">
<dt><samp>obsolete=<var>string</var></samp></dt>
<dd><p>Enable Obsolete system calls
</p></dd>
<dt><samp>elevateprivileges=<var>string</var></samp></dt>
<dd><p>Disable set*uid|gid system calls
</p></dd>
<dt><samp>spawn=<var>string</var></samp></dt>
<dd><p>Disable *fork and execve
</p></dd>
<dt><samp>resourcecontrol=<var>string</var></samp></dt>
<dd><p>Disable process affinity and schedular priority
</p></dd>
</dl>
</dd>
<dt><samp>-readconfig <var>file</var></samp></dt>
<dd><a name="index-_002dreadconfig"></a>
<p>Read device configuration from <var>file</var>. This approach is useful when you want to spawn
QEMU process with many command line options but you don&rsquo;t want to exceed the command line
character limit.
</p></dd>
<dt><samp>-writeconfig <var>file</var></samp></dt>
<dd><a name="index-_002dwriteconfig"></a>
<p>Write device configuration to <var>file</var>. The <var>file</var> can be either filename to save
command line and device configuration into file or dash <code>-</code>) character to print the
output to stdout. This can be later used as input file for <code>-readconfig</code> option.
</p></dd>
<dt><samp>-no-user-config</samp></dt>
<dd><a name="index-_002dno_002duser_002dconfig"></a>
<p>The <code>-no-user-config</code> option makes QEMU not load any of the user-provided
config files on <var>sysconfdir</var>.
</p></dd>
<dt><samp>-trace-unassigned</samp></dt>
<dd><a name="index-_002dtrace_002dunassigned"></a>
<p>Trace unassigned memory or i/o accesses to stderr.
</p></dd>
<dt><samp>-trace [[enable=]<var>pattern</var>][,events=<var>file</var>][,file=<var>file</var>]</samp></dt>
<dd><a name="index-_002dtrace"></a>
<p>Specify tracing options.
</p>
<dl compact="compact">
<dt><samp>[enable=]<var>pattern</var></samp></dt>
<dd><p>Immediately enable events matching <var>pattern</var>
(either event name or a globbing pattern). This option is only
available if QEMU has been compiled with the <var>simple</var>, <var>log</var>
or <var>ftrace</var> tracing backend. To specify multiple events or patterns,
specify the <samp>-trace</samp> option multiple times.
</p>
<p>Use <code>-trace help</code> to print a list of names of trace points.
</p>
</dd>
<dt><samp>events=<var>file</var></samp></dt>
<dd><p>Immediately enable events listed in <var>file</var>.
The file must contain one event name (as listed in the <samp>trace-events-all</samp>
file) per line; globbing patterns are accepted too. This option is only
available if QEMU has been compiled with the <var>simple</var>, <var>log</var> or
<var>ftrace</var> tracing backend.
</p>
</dd>
<dt><samp>file=<var>file</var></samp></dt>
<dd><p>Log output traces to <var>file</var>.
This option is only available if QEMU has been compiled with
the <var>simple</var> tracing backend.
</p></dd>
</dl>
</dd>
<dt><samp>-enable-fips</samp></dt>
<dd><a name="index-_002denable_002dfips"></a>
<p>Enable FIPS 140-2 compliance mode.
</p></dd>
<dt><samp>-msg timestamp[=on|off]</samp></dt>
<dd><a name="index-_002dmsg"></a>
<p>prepend a timestamp to each log message.(default:on)
</p></dd>
<dt><samp>-dump-vmstate <var>file</var></samp></dt>
<dd><a name="index-_002ddump_002dvmstate"></a>
<p>Dump json-encoded vmstate information for current machine type to file
in <var>file</var>
</p></dd>
</dl>
<a name="Generic-object-creation"></a>
<h4 class="subsection">2.3.12 Generic object creation</h4>
<dl compact="compact">
<dt><samp>-object <var>typename</var>[,<var>prop1</var>=<var>value1</var>,...]</samp></dt>
<dd><a name="index-_002dobject"></a>
<p>Create a new object of type <var>typename</var> setting properties
in the order they are specified. Note that the &rsquo;id&rsquo;
property must be set. These objects are placed in the
&rsquo;/objects&rsquo; path.
</p>
<dl compact="compact">
<dt><samp>-object memory-backend-file,id=<var>id</var>,size=<var>size</var>,mem-path=<var>dir</var>,share=<var>on|off</var>,discard-data=<var>on|off</var>,merge=<var>on|off</var>,dump=<var>on|off</var>,prealloc=<var>on|off</var>,host-nodes=<var>host-nodes</var>,policy=<var>default|preferred|bind|interleave</var>,align=<var>align</var></samp></dt>
<dd>
<p>Creates a memory file backend object, which can be used to back
the guest RAM with huge pages.
</p>
<p>The <samp>id</samp> parameter is a unique ID that will be used to reference this
memory region when configuring the <samp>-numa</samp> argument.
</p>
<p>The <samp>size</samp> option provides the size of the memory region, and accepts
common suffixes, eg <samp>500M</samp>.
</p>
<p>The <samp>mem-path</samp> provides the path to either a shared memory or huge page
filesystem mount.
</p>
<p>The <samp>share</samp> boolean option determines whether the memory
region is marked as private to QEMU, or shared. The latter allows
a co-operating external process to access the QEMU memory region.
</p>
<p>The <samp>share</samp> is also required for pvrdma devices due to
limitations in the RDMA API provided by Linux.
</p>
<p>Setting share=on might affect the ability to configure NUMA
bindings for the memory backend under some circumstances, see
Documentation/vm/numa_memory_policy.txt on the Linux kernel
source tree for additional details.
</p>
<p>Setting the <samp>discard-data</samp> boolean option to <var>on</var>
indicates that file contents can be destroyed when QEMU exits,
to avoid unnecessarily flushing data to the backing file. Note
that <samp>discard-data</samp> is only an optimization, and QEMU
might not discard file contents if it aborts unexpectedly or is
terminated using SIGKILL.
</p>
<p>The <samp>merge</samp> boolean option enables memory merge, also known as
MADV_MERGEABLE, so that Kernel Samepage Merging will consider the pages for
memory deduplication.
</p>
<p>Setting the <samp>dump</samp> boolean option to <var>off</var> excludes the memory from
core dumps. This feature is also known as MADV_DONTDUMP.
</p>
<p>The <samp>prealloc</samp> boolean option enables memory preallocation.
</p>
<p>The <samp>host-nodes</samp> option binds the memory range to a list of NUMA host
nodes.
</p>
<p>The <samp>policy</samp> option sets the NUMA policy to one of the following values:
</p>
<dl compact="compact">
<dt><samp><var>default</var></samp></dt>
<dd><p>default host policy
</p>
</dd>
<dt><samp><var>preferred</var></samp></dt>
<dd><p>prefer the given host node list for allocation
</p>
</dd>
<dt><samp><var>bind</var></samp></dt>
<dd><p>restrict memory allocation to the given host node list
</p>
</dd>
<dt><samp><var>interleave</var></samp></dt>
<dd><p>interleave memory allocations across the given host node list
</p></dd>
</dl>
<p>The <samp>align</samp> option specifies the base address alignment when
QEMU mmap(2) <samp>mem-path</samp>, and accepts common suffixes, eg
<samp>2M</samp>. Some backend store specified by <samp>mem-path</samp>
requires an alignment different than the default one used by QEMU, eg
the device DAX /dev/dax0.0 requires 2M alignment rather than 4K. In
such cases, users can specify the required alignment via this option.
</p>
</dd>
<dt><samp>-object memory-backend-ram,id=<var>id</var>,merge=<var>on|off</var>,dump=<var>on|off</var>,share=<var>on|off</var>,prealloc=<var>on|off</var>,size=<var>size</var>,host-nodes=<var>host-nodes</var>,policy=<var>default|preferred|bind|interleave</var></samp></dt>
<dd>
<p>Creates a memory backend object, which can be used to back the guest RAM.
Memory backend objects offer more control than the <samp>-m</samp> option that is
traditionally used to define guest RAM. Please refer to
<samp>memory-backend-file</samp> for a description of the options.
</p>
</dd>
<dt><samp>-object memory-backend-memfd,id=<var>id</var>,merge=<var>on|off</var>,dump=<var>on|off</var>,prealloc=<var>on|off</var>,size=<var>size</var>,host-nodes=<var>host-nodes</var>,policy=<var>default|preferred|bind|interleave</var>,seal=<var>on|off</var>,hugetlb=<var>on|off</var>,hugetlbsize=<var>size</var></samp></dt>
<dd>
<p>Creates an anonymous memory file backend object, which allows QEMU to
share the memory with an external process (e.g. when using
vhost-user). The memory is allocated with memfd and optional
sealing. (Linux only)
</p>
<p>The <samp>seal</samp> option creates a sealed-file, that will block
further resizing the memory (&rsquo;on&rsquo; by default).
</p>
<p>The <samp>hugetlb</samp> option specify the file to be created resides in
the hugetlbfs filesystem (since Linux 4.14). Used in conjunction with
the <samp>hugetlb</samp> option, the <samp>hugetlbsize</samp> option specify
the hugetlb page size on systems that support multiple hugetlb page
sizes (it must be a power of 2 value supported by the system).
</p>
<p>In some versions of Linux, the <samp>hugetlb</samp> option is incompatible
with the <samp>seal</samp> option (requires at least Linux 4.16).
</p>
<p>Please refer to <samp>memory-backend-file</samp> for a description of the
other options.
</p>
</dd>
<dt><samp>-object rng-random,id=<var>id</var>,filename=<var>/dev/random</var></samp></dt>
<dd>
<p>Creates a random number generator backend which obtains entropy from
a device on the host. The <samp>id</samp> parameter is a unique ID that
will be used to reference this entropy backend from the <samp>virtio-rng</samp>
device. The <samp>filename</samp> parameter specifies which file to obtain
entropy from and if omitted defaults to <samp>/dev/random</samp>.
</p>
</dd>
<dt><samp>-object rng-egd,id=<var>id</var>,chardev=<var>chardevid</var></samp></dt>
<dd>
<p>Creates a random number generator backend which obtains entropy from
an external daemon running on the host. The <samp>id</samp> parameter is
a unique ID that will be used to reference this entropy backend from
the <samp>virtio-rng</samp> device. The <samp>chardev</samp> parameter is
the unique ID of a character device backend that provides the connection
to the RNG daemon.
</p>
</dd>
<dt><samp>-object tls-creds-anon,id=<var>id</var>,endpoint=<var>endpoint</var>,dir=<var>/path/to/cred/dir</var>,verify-peer=<var>on|off</var></samp></dt>
<dd>
<p>Creates a TLS anonymous credentials object, which can be used to provide
TLS support on network backends. The <samp>id</samp> parameter is a unique
ID which network backends will use to access the credentials. The
<samp>endpoint</samp> is either <samp>server</samp> or <samp>client</samp> depending
on whether the QEMU network backend that uses the credentials will be
acting as a client or as a server. If <samp>verify-peer</samp> is enabled
(the default) then once the handshake is completed, the peer credentials
will be verified, though this is a no-op for anonymous credentials.
</p>
<p>The <var>dir</var> parameter tells QEMU where to find the credential
files. For server endpoints, this directory may contain a file
<var>dh-params.pem</var> providing diffie-hellman parameters to use
for the TLS server. If the file is missing, QEMU will generate
a set of DH parameters at startup. This is a computationally
expensive operation that consumes random pool entropy, so it is
recommended that a persistent set of parameters be generated
upfront and saved.
</p>
</dd>
<dt><samp>-object tls-creds-psk,id=<var>id</var>,endpoint=<var>endpoint</var>,dir=<var>/path/to/keys/dir</var>[,username=<var>username</var>]</samp></dt>
<dd>
<p>Creates a TLS Pre-Shared Keys (PSK) credentials object, which can be used to provide
TLS support on network backends. The <samp>id</samp> parameter is a unique
ID which network backends will use to access the credentials. The
<samp>endpoint</samp> is either <samp>server</samp> or <samp>client</samp> depending
on whether the QEMU network backend that uses the credentials will be
acting as a client or as a server. For clients only, <samp>username</samp>
is the username which will be sent to the server. If omitted
it defaults to &ldquo;qemu&rdquo;.
</p>
<p>The <var>dir</var> parameter tells QEMU where to find the keys file.
It is called &ldquo;<var>dir</var>/keys.psk&rdquo; and contains &ldquo;username:key&rdquo;
pairs. This file can most easily be created using the GnuTLS
<code>psktool</code> program.
</p>
<p>For server endpoints, <var>dir</var> may also contain a file
<var>dh-params.pem</var> providing diffie-hellman parameters to use
for the TLS server. If the file is missing, QEMU will generate
a set of DH parameters at startup. This is a computationally
expensive operation that consumes random pool entropy, so it is
recommended that a persistent set of parameters be generated
up front and saved.
</p>
</dd>
<dt><samp>-object tls-creds-x509,id=<var>id</var>,endpoint=<var>endpoint</var>,dir=<var>/path/to/cred/dir</var>,priority=<var>priority</var>,verify-peer=<var>on|off</var>,passwordid=<var>id</var></samp></dt>
<dd>
<p>Creates a TLS anonymous credentials object, which can be used to provide
TLS support on network backends. The <samp>id</samp> parameter is a unique
ID which network backends will use to access the credentials. The
<samp>endpoint</samp> is either <samp>server</samp> or <samp>client</samp> depending
on whether the QEMU network backend that uses the credentials will be
acting as a client or as a server. If <samp>verify-peer</samp> is enabled
(the default) then once the handshake is completed, the peer credentials
will be verified. With x509 certificates, this implies that the clients
must be provided with valid client certificates too.
</p>
<p>The <var>dir</var> parameter tells QEMU where to find the credential
files. For server endpoints, this directory may contain a file
<var>dh-params.pem</var> providing diffie-hellman parameters to use
for the TLS server. If the file is missing, QEMU will generate
a set of DH parameters at startup. This is a computationally
expensive operation that consumes random pool entropy, so it is
recommended that a persistent set of parameters be generated
upfront and saved.
</p>
<p>For x509 certificate credentials the directory will contain further files
providing the x509 certificates. The certificates must be stored
in PEM format, in filenames <var>ca-cert.pem</var>, <var>ca-crl.pem</var> (optional),
<var>server-cert.pem</var> (only servers), <var>server-key.pem</var> (only servers),
<var>client-cert.pem</var> (only clients), and <var>client-key.pem</var> (only clients).
</p>
<p>For the <var>server-key.pem</var> and <var>client-key.pem</var> files which
contain sensitive private keys, it is possible to use an encrypted
version by providing the <var>passwordid</var> parameter. This provides
the ID of a previously created <code>secret</code> object containing the
password for decryption.
</p>
<p>The <var>priority</var> parameter allows to override the global default
priority used by gnutls. This can be useful if the system administrator
needs to use a weaker set of crypto priorities for QEMU without
potentially forcing the weakness onto all applications. Or conversely
if one wants wants a stronger default for QEMU than for all other
applications, they can do this through this parameter. Its format is
a gnutls priority string as described at
<a href="https://gnutls.org/manual/html_node/Priority-Strings.html">https://gnutls.org/manual/html_node/Priority-Strings.html</a>.
</p>
</dd>
<dt><samp>-object filter-buffer,id=<var>id</var>,netdev=<var>netdevid</var>,interval=<var>t</var>[,queue=<var>all|rx|tx</var>][,status=<var>on|off</var>]</samp></dt>
<dd>
<p>Interval <var>t</var> can&rsquo;t be 0, this filter batches the packet delivery: all
packets arriving in a given interval on netdev <var>netdevid</var> are delayed
until the end of the interval. Interval is in microseconds.
<samp>status</samp> is optional that indicate whether the netfilter is
on (enabled) or off (disabled), the default status for netfilter will be &rsquo;on&rsquo;.
</p>
<p>queue <var>all|rx|tx</var> is an option that can be applied to any netfilter.
</p>
<p><samp>all</samp>: the filter is attached both to the receive and the transmit
queue of the netdev (default).
</p>
<p><samp>rx</samp>: the filter is attached to the receive queue of the netdev,
where it will receive packets sent to the netdev.
</p>
<p><samp>tx</samp>: the filter is attached to the transmit queue of the netdev,
where it will receive packets sent by the netdev.
</p>
</dd>
<dt><samp>-object filter-mirror,id=<var>id</var>,netdev=<var>netdevid</var>,outdev=<var>chardevid</var>,queue=<var>all|rx|tx</var>[,vnet_hdr_support]</samp></dt>
<dd>
<p>filter-mirror on netdev <var>netdevid</var>,mirror net packet to chardev<var>chardevid</var>, if it has the vnet_hdr_support flag, filter-mirror will mirror packet with vnet_hdr_len.
</p>
</dd>
<dt><samp>-object filter-redirector,id=<var>id</var>,netdev=<var>netdevid</var>,indev=<var>chardevid</var>,outdev=<var>chardevid</var>,queue=<var>all|rx|tx</var>[,vnet_hdr_support]</samp></dt>
<dd>
<p>filter-redirector on netdev <var>netdevid</var>,redirect filter&rsquo;s net packet to chardev
<var>chardevid</var>,and redirect indev&rsquo;s packet to filter.if it has the vnet_hdr_support flag,
filter-redirector will redirect packet with vnet_hdr_len.
Create a filter-redirector we need to differ outdev id from indev id, id can not
be the same. we can just use indev or outdev, but at least one of indev or outdev
need to be specified.
</p>
</dd>
<dt><samp>-object filter-rewriter,id=<var>id</var>,netdev=<var>netdevid</var>,queue=<var>all|rx|tx</var>,[vnet_hdr_support]</samp></dt>
<dd>
<p>Filter-rewriter is a part of COLO project.It will rewrite tcp packet to
secondary from primary to keep secondary tcp connection,and rewrite
tcp packet to primary from secondary make tcp packet can be handled by
client.if it has the vnet_hdr_support flag, we can parse packet with vnet header.
</p>
<p>usage:
colo secondary:
-object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
-object filter-rewriter,id=rew0,netdev=hn0,queue=all
</p>
</dd>
<dt><samp>-object filter-dump,id=<var>id</var>,netdev=<var>dev</var>[,file=<var>filename</var>][,maxlen=<var>len</var>]</samp></dt>
<dd>
<p>Dump the network traffic on netdev <var>dev</var> to the file specified by
<var>filename</var>. 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><samp>-object colo-compare,id=<var>id</var>,primary_in=<var>chardevid</var>,secondary_in=<var>chardevid</var>,outdev=<var>chardevid</var>[,vnet_hdr_support]</samp></dt>
<dd>
<p>Colo-compare gets packet from primary_in<var>chardevid</var> and secondary_in<var>chardevid</var>, than compare primary packet with
secondary packet. If the packets are same, we will output primary
packet to outdev<var>chardevid</var>, else we will notify colo-frame
do checkpoint and send primary packet to outdev<var>chardevid</var>.
if it has the vnet_hdr_support flag, colo compare will send/recv packet with vnet_hdr_len.
</p>
<p>we must use it with the help of filter-mirror and filter-redirector.
</p>
<div class="example">
<pre class="example">
primary:
-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
-device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
-chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
-chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
-chardev socket,id=compare0-0,host=3.3.3.3,port=9001
-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
-chardev socket,id=compare_out0,host=3.3.3.3,port=9005
-object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
-object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
-object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0
secondary:
-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdown
-device e1000,netdev=hn0,mac=52:a4:00:12:78:66
-chardev socket,id=red0,host=3.3.3.3,port=9003
-chardev socket,id=red1,host=3.3.3.3,port=9004
-object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
</pre></div>
<p>If you want to know the detail of above command line, you can read
the colo-compare git log.
</p>
</dd>
<dt><samp>-object cryptodev-backend-builtin,id=<var>id</var>[,queues=<var>queues</var>]</samp></dt>
<dd>
<p>Creates a cryptodev backend which executes crypto opreation from
the QEMU cipher APIS. The <var>id</var> parameter is
a unique ID that will be used to reference this cryptodev backend from
the <samp>virtio-crypto</samp> device. The <var>queues</var> parameter is optional,
which specify the queue number of cryptodev backend, the default of
<var>queues</var> is 1.
</p>
<div class="example">
<pre class="example">
# qemu-system-x86_64 \
[...] \
-object cryptodev-backend-builtin,id=cryptodev0 \
-device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \
[...]
</pre></div>
</dd>
<dt><samp>-object cryptodev-vhost-user,id=<var>id</var>,chardev=<var>chardevid</var>[,queues=<var>queues</var>]</samp></dt>
<dd>
<p>Creates a vhost-user cryptodev backend, backed by a chardev <var>chardevid</var>.
The <var>id</var> parameter is a unique ID that will be used to reference this
cryptodev backend from the <samp>virtio-crypto</samp> device.
The chardev should be a unix domain socket backed one. The vhost-user uses
a specifically defined protocol to pass vhost ioctl replacement messages
to an application on the other end of the socket.
The <var>queues</var> parameter is optional, which specify the queue number
of cryptodev backend for multiqueue vhost-user, the default of <var>queues</var> is 1.
</p>
<div class="example">
<pre class="example">
# qemu-system-x86_64 \
[...] \
-chardev socket,id=chardev0,path=/path/to/socket \
-object cryptodev-vhost-user,id=cryptodev0,chardev=chardev0 \
-device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \
[...]
</pre></div>
</dd>
<dt><samp>-object secret,id=<var>id</var>,data=<var>string</var>,format=<var>raw|base64</var>[,keyid=<var>secretid</var>,iv=<var>string</var>]</samp></dt>
<dt><samp>-object secret,id=<var>id</var>,file=<var>filename</var>,format=<var>raw|base64</var>[,keyid=<var>secretid</var>,iv=<var>string</var>]</samp></dt>
<dd>
<p>Defines a secret to store a password, encryption key, or some other sensitive
data. The sensitive data can either be passed directly via the <var>data</var>
parameter, or indirectly via the <var>file</var> parameter. Using the <var>data</var>
parameter is insecure unless the sensitive data is encrypted.
</p>
<p>The sensitive data can be provided in raw format (the default), or base64.
When encoded as JSON, the raw format only supports valid UTF-8 characters,
so base64 is recommended for sending binary data. QEMU will convert from
which ever format is provided to the format it needs internally. eg, an
RBD password can be provided in raw format, even though it will be base64
encoded when passed onto the RBD sever.
</p>
<p>For added protection, it is possible to encrypt the data associated with
a secret using the AES-256-CBC cipher. Use of encryption is indicated
by providing the <var>keyid</var> and <var>iv</var> parameters. The <var>keyid</var>
parameter provides the ID of a previously defined secret that contains
the AES-256 decryption key. This key should be 32-bytes long and be
base64 encoded. The <var>iv</var> parameter provides the random initialization
vector used for encryption of this particular secret and should be a
base64 encrypted string of the 16-byte IV.
</p>
<p>The simplest (insecure) usage is to provide the secret inline
</p>
<div class="example">
<pre class="example">
# $QEMU -object secret,id=sec0,data=letmein,format=raw
</pre></div>
<p>The simplest secure usage is to provide the secret via a file
</p>
<p># printf &quot;letmein&quot; &gt; mypasswd.txt
# $QEMU -object secret,id=sec0,file=mypasswd.txt,format=raw
</p>
<p>For greater security, AES-256-CBC should be used. To illustrate usage,
consider the openssl command line tool which can encrypt the data. Note
that when encrypting, the plaintext must be padded to the cipher block
size (32 bytes) using the standard PKCS#5/6 compatible padding algorithm.
</p>
<p>First a master key needs to be created in base64 encoding:
</p>
<div class="example">
<pre class="example"># openssl rand -base64 32 &gt; key.b64
# KEY=$(base64 -d key.b64 | hexdump -v -e '/1 &quot;%02X&quot;')
</pre></div>
<p>Each secret to be encrypted needs to have a random initialization vector
generated. These do not need to be kept secret
</p>
<div class="example">
<pre class="example"># openssl rand -base64 16 &gt; iv.b64
# IV=$(base64 -d iv.b64 | hexdump -v -e '/1 &quot;%02X&quot;')
</pre></div>
<p>The secret to be defined can now be encrypted, in this case we&rsquo;re
telling openssl to base64 encode the result, but it could be left
as raw bytes if desired.
</p>
<div class="example">
<pre class="example"># SECRET=$(printf &quot;letmein&quot; |
openssl enc -aes-256-cbc -a -K $KEY -iv $IV)
</pre></div>
<p>When launching QEMU, create a master secret pointing to <code>key.b64</code>
and specify that to be used to decrypt the user password. Pass the
contents of <code>iv.b64</code> to the second secret
</p>
<div class="example">
<pre class="example"># $QEMU \
-object secret,id=secmaster0,format=base64,file=key.b64 \
-object secret,id=sec0,keyid=secmaster0,format=base64,\
data=$SECRET,iv=$(&lt;iv.b64)
</pre></div>
</dd>
<dt><samp>-object sev-guest,id=<var>id</var>,cbitpos=<var>cbitpos</var>,reduced-phys-bits=<var>val</var>,[sev-device=<var>string</var>,policy=<var>policy</var>,handle=<var>handle</var>,dh-cert-file=<var>file</var>,session-file=<var>file</var>]</samp></dt>
<dd>
<p>Create a Secure Encrypted Virtualization (SEV) guest object, which can be used
to provide the guest memory encryption support on AMD processors.
</p>
<p>When memory encryption is enabled, one of the physical address bit (aka the
C-bit) is utilized to mark if a memory page is protected. The <samp>cbitpos</samp>
is used to provide the C-bit position. The C-bit position is Host family dependent
hence user must provide this value. On EPYC, the value should be 47.
</p>
<p>When memory encryption is enabled, we loose certain bits in physical address space.
The <samp>reduced-phys-bits</samp> is used to provide the number of bits we loose in
physical address space. Similar to C-bit, the value is Host family dependent.
On EPYC, the value should be 5.
</p>
<p>The <samp>sev-device</samp> provides the device file to use for communicating with
the SEV firmware running inside AMD Secure Processor. The default device is
&rsquo;/dev/sev&rsquo;. If hardware supports memory encryption then /dev/sev devices are
created by CCP driver.
</p>
<p>The <samp>policy</samp> provides the guest policy to be enforced by the SEV firmware
and restrict what configuration and operational commands can be performed on this
guest by the hypervisor. The policy should be provided by the guest owner and is
bound to the guest and cannot be changed throughout the lifetime of the guest.
The default is 0.
</p>
<p>If guest <samp>policy</samp> allows sharing the key with another SEV guest then
<samp>handle</samp> can be use to provide handle of the guest from which to share
the key.
</p>
<p>The <samp>dh-cert-file</samp> and <samp>session-file</samp> provides the guest owner&rsquo;s
Public Diffie-Hillman key defined in SEV spec. The PDH and session parameters
are used for establishing a cryptographic session with the guest owner to
negotiate keys used for attestation. The file must be encoded in base64.
</p>
<p>e.g to launch a SEV guest
</p><div class="example">
<pre class="example"># $QEMU \
......
-object sev-guest,id=sev0,cbitpos=47,reduced-phys-bits=5 \
-machine ...,memory-encryption=sev0
.....
</pre></div>
</dd>
</dl>
</dd>
</dl>
<a name="Device-URL-Syntax"></a>
<h4 class="subsection">2.3.13 Device URL Syntax</h4>
<p>In addition to using normal file images for the emulated storage devices,
QEMU can also use networked resources such as iSCSI devices. These are
specified using a special URL syntax.
</p>
<dl compact="compact">
<dt><samp>iSCSI</samp></dt>
<dd><p>iSCSI support allows QEMU to access iSCSI resources directly and use as
images for the guest storage. Both disk and cdrom images are supported.
</p>
<p>Syntax for specifying iSCSI LUNs is
&ldquo;iscsi://&lt;target-ip&gt;[:&lt;port&gt;]/&lt;target-iqn&gt;/&lt;lun&gt;&rdquo;
</p>
<p>By default qemu will use the iSCSI initiator-name
&rsquo;iqn.2008-11.org.linux-kvm[:&lt;name&gt;]&rsquo; but this can also be set from the command
line or a configuration file.
</p>
<p>Since version Qemu 2.4 it is possible to specify a iSCSI request timeout to detect
stalled requests and force a reestablishment of the session. The timeout
is specified in seconds. The default is 0 which means no timeout. Libiscsi
1.15.0 or greater is required for this feature.
</p>
<p>Example (without authentication):
</p><div class="example">
<pre class="example">qemu-system-i386 -iscsi initiator-name=iqn.2001-04.com.example:my-initiator \
-cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \
-drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
</pre></div>
<p>Example (CHAP username/password via URL):
</p><div class="example">
<pre class="example">qemu-system-i386 -drive file=iscsi://user%password@192.0.2.1/iqn.2001-04.com.example/1
</pre></div>
<p>Example (CHAP username/password via environment variables):
</p><div class="example">
<pre class="example">LIBISCSI_CHAP_USERNAME=&quot;user&quot; \
LIBISCSI_CHAP_PASSWORD=&quot;password&quot; \
qemu-system-i386 -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
</pre></div>
</dd>
<dt><samp>NBD</samp></dt>
<dd><p>QEMU supports NBD (Network Block Devices) both using TCP protocol as well
as Unix Domain Sockets.
</p>
<p>Syntax for specifying a NBD device using TCP
&ldquo;nbd:&lt;server-ip&gt;:&lt;port&gt;[:exportname=&lt;export&gt;]&rdquo;
</p>
<p>Syntax for specifying a NBD device using Unix Domain Sockets
&ldquo;nbd:unix:&lt;domain-socket&gt;[:exportname=&lt;export&gt;]&rdquo;
</p>
<p>Example for TCP
</p><div class="example">
<pre class="example">qemu-system-i386 --drive file=nbd:192.0.2.1:30000
</pre></div>
<p>Example for Unix Domain Sockets
</p><div class="example">
<pre class="example">qemu-system-i386 --drive file=nbd:unix:/tmp/nbd-socket
</pre></div>
</dd>
<dt><samp>SSH</samp></dt>
<dd><p>QEMU supports SSH (Secure Shell) access to remote disks.
</p>
<p>Examples:
</p><div class="example">
<pre class="example">qemu-system-i386 -drive file=ssh://user@host/path/to/disk.img
qemu-system-i386 -drive file.driver=ssh,file.user=user,file.host=host,file.port=22,file.path=/path/to/disk.img
</pre></div>
<p>Currently authentication must be done using ssh-agent. Other
authentication methods may be supported in future.
</p>
</dd>
<dt><samp>Sheepdog</samp></dt>
<dd><p>Sheepdog is a distributed storage system for QEMU.
QEMU supports using either local sheepdog devices or remote networked
devices.
</p>
<p>Syntax for specifying a sheepdog device
</p><div class="example">
<pre class="example">sheepdog[+tcp|+unix]://[host:port]/vdiname[?socket=path][#snapid|#tag]
</pre></div>
<p>Example
</p><div class="example">
<pre class="example">qemu-system-i386 --drive file=sheepdog://192.0.2.1:30000/MyVirtualMachine
</pre></div>
<p>See also <a href="https://sheepdog.github.io/sheepdog/">https://sheepdog.github.io/sheepdog/</a>.
</p>
</dd>
<dt><samp>GlusterFS</samp></dt>
<dd><p>GlusterFS is a user space distributed file system.
QEMU supports the use of GlusterFS volumes for hosting VM disk images using
TCP, Unix Domain Sockets and RDMA transport protocols.
</p>
<p>Syntax for specifying a VM disk image on GlusterFS volume is
</p><div class="example">
<pre class="example">
URI:
gluster[+type]://[host[:port]]/volume/path[?socket=...][,debug=N][,logfile=...]
JSON:
'json:{&quot;driver&quot;:&quot;qcow2&quot;,&quot;file&quot;:{&quot;driver&quot;:&quot;gluster&quot;,&quot;volume&quot;:&quot;testvol&quot;,&quot;path&quot;:&quot;a.img&quot;,&quot;debug&quot;:N,&quot;logfile&quot;:&quot;...&quot;,
&nbsp; &quot;server&quot;:[{&quot;type&quot;:&quot;tcp&quot;,&quot;host&quot;:&quot;...&quot;,&quot;port&quot;:&quot;...&quot;},
&nbsp; {&quot;type&quot;:&quot;unix&quot;,&quot;socket&quot;:&quot;...&quot;}]}}'
</pre></div>
<p>Example
</p><div class="example">
<pre class="example">URI:
qemu-system-x86_64 --drive file=gluster://192.0.2.1/testvol/a.img,
&nbsp; file.debug=9,file.logfile=/var/log/qemu-gluster.log
JSON:
qemu-system-x86_64 'json:{&quot;driver&quot;:&quot;qcow2&quot;,
&nbsp; &quot;file&quot;:{&quot;driver&quot;:&quot;gluster&quot;,
&nbsp; &quot;volume&quot;:&quot;testvol&quot;,&quot;path&quot;:&quot;a.img&quot;,
&nbsp; &quot;debug&quot;:9,&quot;logfile&quot;:&quot;/var/log/qemu-gluster.log&quot;,
&nbsp; &quot;server&quot;:[{&quot;type&quot;:&quot;tcp&quot;,&quot;host&quot;:&quot;1.2.3.4&quot;,&quot;port&quot;:24007},
&nbsp; {&quot;type&quot;:&quot;unix&quot;,&quot;socket&quot;:&quot;/var/run/glusterd.socket&quot;}]}}'
qemu-system-x86_64 -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.img,
&nbsp; file.debug=9,file.logfile=/var/log/qemu-gluster.log,
&nbsp; file.server.0.type=tcp,file.server.0.host=1.2.3.4,file.server.0.port=24007,
&nbsp; file.server.1.type=unix,file.server.1.socket=/var/run/glusterd.socket
</pre></div>
<p>See also <a href="http://www.gluster.org">http://www.gluster.org</a>.
</p>
</dd>
<dt><samp>HTTP/HTTPS/FTP/FTPS</samp></dt>
<dd><p>QEMU supports read-only access to files accessed over http(s) and ftp(s).
</p>
<p>Syntax using a single filename:
</p><div class="example">
<pre class="example">&lt;protocol&gt;://[&lt;username&gt;[:&lt;password&gt;]@]&lt;host&gt;/&lt;path&gt;
</pre></div>
<p>where:
</p><dl compact="compact">
<dt><samp>protocol</samp></dt>
<dd><p>&rsquo;http&rsquo;, &rsquo;https&rsquo;, &rsquo;ftp&rsquo;, or &rsquo;ftps&rsquo;.
</p>
</dd>
<dt><samp>username</samp></dt>
<dd><p>Optional username for authentication to the remote server.
</p>
</dd>
<dt><samp>password</samp></dt>
<dd><p>Optional password for authentication to the remote server.
</p>
</dd>
<dt><samp>host</samp></dt>
<dd><p>Address of the remote server.
</p>
</dd>
<dt><samp>path</samp></dt>
<dd><p>Path on the remote server, including any query string.
</p></dd>
</dl>
<p>The following options are also supported:
</p><dl compact="compact">
<dt><samp>url</samp></dt>
<dd><p>The full URL when passing options to the driver explicitly.
</p>
</dd>
<dt><samp>readahead</samp></dt>
<dd><p>The amount of data to read ahead with each range request to the remote server.
This value may optionally have the suffix &rsquo;T&rsquo;, &rsquo;G&rsquo;, &rsquo;M&rsquo;, &rsquo;K&rsquo;, &rsquo;k&rsquo; or &rsquo;b&rsquo;. If it
does not have a suffix, it will be assumed to be in bytes. The value must be a
multiple of 512 bytes. It defaults to 256k.
</p>
</dd>
<dt><samp>sslverify</samp></dt>
<dd><p>Whether to verify the remote server&rsquo;s certificate when connecting over SSL. It
can have the value &rsquo;on&rsquo; or &rsquo;off&rsquo;. It defaults to &rsquo;on&rsquo;.
</p>
</dd>
<dt><samp>cookie</samp></dt>
<dd><p>Send this cookie (it can also be a list of cookies separated by &rsquo;;&rsquo;) with
each outgoing request. Only supported when using protocols such as HTTP
which support cookies, otherwise ignored.
</p>
</dd>
<dt><samp>timeout</samp></dt>
<dd><p>Set the timeout in seconds of the CURL connection. This timeout is the time
that CURL waits for a response from the remote server to get the size of the
image to be downloaded. If not set, the default timeout of 5 seconds is used.
</p></dd>
</dl>
<p>Note that when passing options to qemu explicitly, <samp>driver</samp> is the value
of &lt;protocol&gt;.
</p>
<p>Example: boot from a remote Fedora 20 live ISO image
</p><div class="example">
<pre class="example">qemu-system-x86_64 --drive media=cdrom,file=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
qemu-system-x86_64 --drive media=cdrom,file.driver=http,file.url=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
</pre></div>
<p>Example: boot from a remote Fedora 20 cloud image using a local overlay for
writes, copy-on-read, and a readahead of 64k
</p><div class="example">
<pre class="example">qemu-img create -f qcow2 -o backing_file='json:{&quot;file.driver&quot;:&quot;http&quot;,, &quot;file.url&quot;:&quot;https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2&quot;,, &quot;file.readahead&quot;:&quot;64k&quot;}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2
qemu-system-x86_64 -drive file=/tmp/Fedora-x86_64-20-20131211.1-sda.qcow2,copy-on-read=on
</pre></div>
<p>Example: boot from an image stored on a VMware vSphere server with a self-signed
certificate using a local overlay for writes, a readahead of 64k and a timeout
of 10 seconds.
</p><div class="example">
<pre class="example">qemu-img create -f qcow2 -o backing_file='json:{&quot;file.driver&quot;:&quot;https&quot;,, &quot;file.url&quot;:&quot;https://user:password@vsphere.example.com/folder/test/test-flat.vmdk?dcPath=Datacenter&amp;dsName=datastore1&quot;,, &quot;file.sslverify&quot;:&quot;off&quot;,, &quot;file.readahead&quot;:&quot;64k&quot;,, &quot;file.timeout&quot;:10}' /tmp/test.qcow2
qemu-system-x86_64 -drive file=/tmp/test.qcow2
</pre></div>
</dd>
</dl>
<hr>
<a name="pcsys_005fkeys"></a>
<a name="Keys-in-the-graphical-frontends"></a>
<h3 class="section">2.4 Keys in the graphical frontends</h3>
<p>During the graphical emulation, you can use special key combinations to change
modes. The default key mappings are shown below, but if you use <code>-alt-grab</code>
then the modifier is Ctrl-Alt-Shift (instead of Ctrl-Alt) and if you use
<code>-ctrl-grab</code> then the modifier is the right Ctrl key (instead of Ctrl-Alt):
</p>
<dl compact="compact">
<dt><tt class="key">Ctrl-Alt-f</tt></dt>
<dd><a name="index-Ctrl_002dAlt_002df"></a>
<p>Toggle full screen
</p>
</dd>
<dt><tt class="key">Ctrl-Alt-+</tt></dt>
<dd><a name="index-Ctrl_002dAlt_002d_002b"></a>
<p>Enlarge the screen
</p>
</dd>
<dt><tt class="key">Ctrl-Alt--</tt></dt>
<dd><a name="index-Ctrl_002dAlt_002d_002d"></a>
<p>Shrink the screen
</p>
</dd>
<dt><tt class="key">Ctrl-Alt-u</tt></dt>
<dd><a name="index-Ctrl_002dAlt_002du"></a>
<p>Restore the screen&rsquo;s un-scaled dimensions
</p>
</dd>
<dt><tt class="key">Ctrl-Alt-n</tt></dt>
<dd><a name="index-Ctrl_002dAlt_002dn"></a>
<p>Switch to virtual console &rsquo;n&rsquo;. 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><tt class="key">Ctrl-Alt</tt></dt>
<dd><a name="index-Ctrl_002dAlt"></a>
<p>Toggle mouse and keyboard grab.
</p></dd>
</dl>
<a name="index-Ctrl_002dUp"></a>
<a name="index-Ctrl_002dDown"></a>
<a name="index-Ctrl_002dPageUp"></a>
<a name="index-Ctrl_002dPageDown"></a>
<p>In the virtual consoles, you can use <tt class="key">Ctrl-Up</tt>, <tt class="key">Ctrl-Down</tt>,
<tt class="key">Ctrl-PageUp</tt> and <tt class="key">Ctrl-PageDown</tt> to move in the back log.
</p>
<hr>
<a name="mux_005fkeys"></a>
<a name="Keys-in-the-character-backend-multiplexer"></a>
<h3 class="section">2.5 Keys in the character backend multiplexer</h3>
<p>During emulation, if you are using a character backend multiplexer
(which is the default if you are using <samp>-nographic</samp>) then
several commands are available via an escape sequence. These
key sequences all start with an escape character, which is <tt class="key">Ctrl-a</tt>
by default, but can be changed with <samp>-echr</samp>. The list below assumes
you&rsquo;re using the default.
</p>
<dl compact="compact">
<dt><tt class="key">Ctrl-a h</tt></dt>
<dd><a name="index-Ctrl_002da-h"></a>
<p>Print this help
</p></dd>
<dt><tt class="key">Ctrl-a x</tt></dt>
<dd><a name="index-Ctrl_002da-x"></a>
<p>Exit emulator
</p></dd>
<dt><tt class="key">Ctrl-a s</tt></dt>
<dd><a name="index-Ctrl_002da-s"></a>
<p>Save disk data back to file (if -snapshot)
</p></dd>
<dt><tt class="key">Ctrl-a t</tt></dt>
<dd><a name="index-Ctrl_002da-t"></a>
<p>Toggle console timestamps
</p></dd>
<dt><tt class="key">Ctrl-a b</tt></dt>
<dd><a name="index-Ctrl_002da-b"></a>
<p>Send break (magic sysrq in Linux)
</p></dd>
<dt><tt class="key">Ctrl-a c</tt></dt>
<dd><a name="index-Ctrl_002da-c"></a>
<p>Rotate between the frontends connected to the multiplexer (usually
this switches between the monitor and the console)
</p></dd>
<dt><tt class="key">Ctrl-a Ctrl-a</tt></dt>
<dd><a name="index-Ctrl_002da-Ctrl_002da"></a>
<p>Send the escape character to the frontend
</p></dd>
</dl>
<hr>
<a name="pcsys_005fmonitor"></a>
<a name="QEMU-Monitor"></a>
<h3 class="section">2.6 QEMU Monitor</h3>
<a name="index-QEMU-monitor"></a>
<p>The QEMU monitor is used to give complex commands to the QEMU
emulator. You can use it to:
</p>
<ul class="no-bullet">
<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>
<a name="Commands"></a>
<h4 class="subsection">2.6.1 Commands</h4>
<p>The following commands are available:
</p>
<dl compact="compact">
<dt><samp>help or ? [<var>cmd</var>]</samp></dt>
<dd><a name="index-help"></a>
<p>Show the help for all commands or just for command <var>cmd</var>.
</p></dd>
<dt><samp>commit</samp></dt>
<dd><a name="index-commit"></a>
<p>Commit changes to the disk images (if -snapshot is used) or backing files.
If the backing file is smaller than the snapshot, then the backing file will be
resized to be the same size as the snapshot. If the snapshot is smaller than
the backing file, the backing file will not be truncated. If you want the
backing file to match the size of the smaller snapshot, you can safely truncate
it yourself once the commit operation successfully completes.
</p></dd>
<dt><samp>q or quit</samp></dt>
<dd><a name="index-quit"></a>
<p>Quit the emulator.
</p></dd>
<dt><samp>exit_preconfig</samp></dt>
<dd><a name="index-exit_005fpreconfig"></a>
<p>This command makes QEMU exit the preconfig state and proceed with
VM initialization using configuration data provided on the command line
and via the QMP monitor during the preconfig state. The command is only
available during the preconfig state (i.e. when the &ndash;preconfig command
line option was in use).
</p></dd>
<dt><samp>block_resize</samp></dt>
<dd><a name="index-block_005fresize"></a>
<p>Resize a block image while a guest is running. Usually requires guest
action to see the updated size. Resize to a lower size is supported,
but should be used with extreme caution. Note that this command only
resizes image files, it can not resize block devices like LVM volumes.
</p></dd>
<dt><samp>block_stream</samp></dt>
<dd><a name="index-block_005fstream"></a>
<p>Copy data from a backing file into a block device.
</p></dd>
<dt><samp>block_job_set_speed</samp></dt>
<dd><a name="index-block_005fjob_005fset_005fspeed"></a>
<p>Set maximum speed for a background block operation.
</p></dd>
<dt><samp>block_job_cancel</samp></dt>
<dd><a name="index-block_005fjob_005fcancel"></a>
<p>Stop an active background block operation (streaming, mirroring).
</p></dd>
<dt><samp>block_job_complete</samp></dt>
<dd><a name="index-block_005fjob_005fcomplete"></a>
<p>Manually trigger completion of an active background block operation.
For mirroring, this will switch the device to the destination path.
</p></dd>
<dt><samp>block_job_pause</samp></dt>
<dd><a name="index-block_005fjob_005fpause"></a>
<p>Pause an active block streaming operation.
</p></dd>
<dt><samp>block_job_resume</samp></dt>
<dd><a name="index-block_005fjob_005fresume"></a>
<p>Resume a paused block streaming operation.
</p></dd>
<dt><samp>eject [-f] <var>device</var></samp></dt>
<dd><a name="index-eject"></a>
<p>Eject a removable medium (use -f to force it).
</p></dd>
<dt><samp>drive_del <var>device</var></samp></dt>
<dd><a name="index-drive_005fdel"></a>
<p>Remove host block device. The result is that guest generated IO is no longer
submitted against the host device underlying the disk. Once a drive has
been deleted, the QEMU Block layer returns -EIO which results in IO
errors in the guest for applications that are reading/writing to the device.
These errors are always reported to the guest, regardless of the drive&rsquo;s error
actions (drive options rerror, werror).
</p></dd>
<dt><samp>change <var>device</var> <var>setting</var></samp></dt>
<dd><a name="index-change"></a>
<p>Change the configuration of a device.
</p>
<dl compact="compact">
<dt><samp>change <var>diskdevice</var> <var>filename</var> [<var>format</var> [<var>read-only-mode</var>]]</samp></dt>
<dd><p>Change the medium for a removable disk device to point to <var>filename</var>. eg
</p>
<div class="example">
<pre class="example">(qemu) change ide1-cd0 /path/to/some.iso
</pre></div>
<p><var>format</var> is optional.
</p>
<p><var>read-only-mode</var> may be used to change the read-only status of the device.
It accepts the following values:
</p>
<dl compact="compact">
<dt><var>retain</var></dt>
<dd><p>Retains the current status; this is the default.
</p>
</dd>
<dt><var>read-only</var></dt>
<dd><p>Makes the device read-only.
</p>
</dd>
<dt><var>read-write</var></dt>
<dd><p>Makes the device writable.
</p></dd>
</dl>
</dd>
<dt><samp>change vnc <var>display</var>,<var>options</var></samp></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="#sec_005finvocation">sec_invocation</a>. eg
</p>
<div class="example">
<pre class="example">(qemu) change vnc localhost:1
</pre></div>
</dd>
<dt><samp>change vnc password [<var>password</var>]</samp></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>
<div class="example">
<pre class="example">(qemu) change vnc password
Password: ********
</pre></div>
</dd>
</dl>
</dd>
<dt><samp>screendump <var>filename</var></samp></dt>
<dd><a name="index-screendump"></a>
<p>Save screen into PPM image <var>filename</var>.
</p></dd>
<dt><samp>logfile <var>filename</var></samp></dt>
<dd><a name="index-logfile"></a>
<p>Output logs to <var>filename</var>.
</p></dd>
<dt><samp>trace-event</samp></dt>
<dd><a name="index-trace_002devent"></a>
<p>changes status of a trace event
</p></dd>
<dt><samp>trace-file on|off|flush</samp></dt>
<dd><a name="index-trace_002dfile"></a>
<p>Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
</p></dd>
<dt><samp>log <var>item1</var>[,...]</samp></dt>
<dd><a name="index-log"></a>
<p>Activate logging of the specified items.
</p></dd>
<dt><samp>savevm [<var>tag</var>|<var>id</var>]</samp></dt>
<dd><a name="index-savevm"></a>
<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="#vm_005fsnapshots">vm_snapshots</a>.
</p></dd>
<dt><samp>loadvm <var>tag</var>|<var>id</var></samp></dt>
<dd><a name="index-loadvm"></a>
<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><samp>delvm <var>tag</var>|<var>id</var></samp></dt>
<dd><a name="index-delvm"></a>
<p>Delete the snapshot identified by <var>tag</var> or <var>id</var>.
</p></dd>
<dt><samp>singlestep [off]</samp></dt>
<dd><a name="index-singlestep"></a>
<p>Run the emulation in single step mode.
If called with option off, the emulation returns to normal mode.
</p></dd>
<dt><samp>stop</samp></dt>
<dd><a name="index-stop"></a>
<p>Stop emulation.
</p></dd>
<dt><samp>c or cont</samp></dt>
<dd><a name="index-cont"></a>
<p>Resume emulation.
</p></dd>
<dt><samp>system_wakeup</samp></dt>
<dd><a name="index-system_005fwakeup"></a>
<p>Wakeup guest from suspend.
</p></dd>
<dt><samp>gdbserver [<var>port</var>]</samp></dt>
<dd><a name="index-gdbserver"></a>
<p>Start gdbserver session (default <var>port</var>=1234)
</p></dd>
<dt><samp>x/fmt <var>addr</var></samp></dt>
<dd><a name="index-x"></a>
<p>Virtual memory dump starting at <var>addr</var>.
</p></dd>
<dt><samp>xp /<var>fmt</var> <var>addr</var></samp></dt>
<dd><a name="index-xp"></a>
<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: <samp>/{count}{format}{size}</samp>
</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>
<li> Dump 10 instructions at the current instruction pointer:
<div class="example">
<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></div>
</li><li> Dump 80 16 bit values at the start of the video memory.
<div class="smallexample">
<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></div>
</li></ul>
</dd>
<dt><samp>gpa2hva <var>addr</var></samp></dt>
<dd><a name="index-gpa2hva"></a>
<p>Print the host virtual address at which the guest&rsquo;s physical address <var>addr</var>
is mapped.
</p></dd>
<dt><samp>gpa2hpa <var>addr</var></samp></dt>
<dd><a name="index-gpa2hpa"></a>
<p>Print the host physical address at which the guest&rsquo;s physical address <var>addr</var>
is mapped.
</p></dd>
<dt><samp>p or print/<var>fmt</var> <var>expr</var></samp></dt>
<dd><a name="index-print"></a>
<p>Print expression value. Only the <var>format</var> part of <var>fmt</var> is
used.
</p></dd>
<dt><samp>i/<var>fmt</var> <var>addr</var> [.<var>index</var>]</samp></dt>
<dd><a name="index-i"></a>
<p>Read I/O port.
</p></dd>
<dt><samp>o/<var>fmt</var> <var>addr</var> <var>val</var></samp></dt>
<dd><a name="index-o"></a>
<p>Write to I/O port.
</p></dd>
<dt><samp>sendkey <var>keys</var></samp></dt>
<dd><a name="index-sendkey"></a>
<p>Send <var>keys</var> to the guest. <var>keys</var> could be the name of the
key or the raw value in hexadecimal format. Use <code>-</code> to press
several keys simultaneously. Example:
</p><div class="example">
<pre class="example">sendkey ctrl-alt-f1
</pre></div>
<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><samp>system_reset</samp></dt>
<dd><a name="index-system_005freset"></a>
<p>Reset the system.
</p></dd>
<dt><samp>system_powerdown</samp></dt>
<dd><a name="index-system_005fpowerdown"></a>
<p>Power down the system (if supported).
</p></dd>
<dt><samp>sum <var>addr</var> <var>size</var></samp></dt>
<dd><a name="index-sum"></a>
<p>Compute the checksum of a memory region.
</p></dd>
<dt><samp>device_add <var>config</var></samp></dt>
<dd><a name="index-device_005fadd"></a>
<p>Add device.
</p></dd>
<dt><samp>device_del <var>id</var></samp></dt>
<dd><a name="index-device_005fdel"></a>
<p>Remove device <var>id</var>. <var>id</var> may be a short ID
or a QOM object path.
</p></dd>
<dt><samp>cpu <var>index</var></samp></dt>
<dd><a name="index-cpu"></a>
<p>Set the default CPU.
</p></dd>
<dt><samp>mouse_move <var>dx</var> <var>dy</var> [<var>dz</var>]</samp></dt>
<dd><a name="index-mouse_005fmove"></a>
<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><samp>mouse_button <var>val</var></samp></dt>
<dd><a name="index-mouse_005fbutton"></a>
<p>Change the active mouse button state <var>val</var> (1=L, 2=M, 4=R).
</p></dd>
<dt><samp>mouse_set <var>index</var></samp></dt>
<dd><a name="index-mouse_005fset"></a>
<p>Set which mouse device receives events at given <var>index</var>, index
can be obtained with
</p><div class="example">
<pre class="example">info mice
</pre></div>
</dd>
<dt><samp>wavcapture <var>filename</var> [<var>frequency</var> [<var>bits</var> [<var>channels</var>]]]</samp></dt>
<dd><a name="index-wavcapture"></a>
<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="no-bullet">
<li>- Sample rate = 44100 Hz - CD quality
</li><li>- Bits = 16
</li><li>- Number of channels = 2 - Stereo
</li></ul>
</dd>
<dt><samp>stopcapture <var>index</var></samp></dt>
<dd><a name="index-stopcapture"></a>
<p>Stop capture with a given <var>index</var>, index can be obtained with
</p><div class="example">
<pre class="example">info capture
</pre></div>
</dd>
<dt><samp>memsave <var>addr</var> <var>size</var> <var>file</var></samp></dt>
<dd><a name="index-memsave"></a>
<p>save to disk virtual memory dump starting at <var>addr</var> of size <var>size</var>.
</p></dd>
<dt><samp>pmemsave <var>addr</var> <var>size</var> <var>file</var></samp></dt>
<dd><a name="index-pmemsave"></a>
<p>save to disk physical memory dump starting at <var>addr</var> of size <var>size</var>.
</p></dd>
<dt><samp>boot_set <var>bootdevicelist</var></samp></dt>
<dd><a name="index-boot_005fset"></a>
<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><samp>nmi <var>cpu</var></samp></dt>
<dd><a name="index-nmi"></a>
<p>Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
</p>
</dd>
<dt><samp>ringbuf_write <var>device</var> <var>data</var></samp></dt>
<dd><a name="index-ringbuf_005fwrite"></a>
<p>Write <var>data</var> to ring buffer character device <var>device</var>.
<var>data</var> must be a UTF-8 string.
</p>
</dd>
<dt><samp>ringbuf_read <var>device</var></samp></dt>
<dd><a name="index-ringbuf_005fread"></a>
<p>Read and print up to <var>size</var> bytes from ring buffer character
device <var>device</var>.
Certain non-printable characters are printed \uXXXX, where XXXX is the
character code in hexadecimal. Character \ is printed \\.
Bug: can screw up when the buffer contains invalid UTF-8 sequences,
NUL characters, after the ring buffer lost data, and when reading
stops because the size limit is reached.
</p>
</dd>
<dt><samp>migrate [-d] [-b] [-i] <var>uri</var></samp></dt>
<dd><a name="index-migrate"></a>
<p>Migrate to <var>uri</var> (using -d to not wait for completion).
-b for migration with full copy of disk
-i for migration with incremental copy of disk (base image is shared)
</p></dd>
<dt><samp>migrate_cancel</samp></dt>
<dd><a name="index-migrate_005fcancel"></a>
<p>Cancel the current VM migration.
</p></dd>
<dt><samp>migrate_continue <var>state</var></samp></dt>
<dd><a name="index-migrate_005fcontinue"></a>
<p>Continue migration from the paused state <var>state</var>
</p></dd>
<dt><samp>migrate_incoming <var>uri</var></samp></dt>
<dd><a name="index-migrate_005fincoming"></a>
<p>Continue an incoming migration using the <var>uri</var> (that has the same syntax
as the -incoming option).
</p></dd>
<dt><samp>migrate_recover <var>uri</var></samp></dt>
<dd><a name="index-migrate_005frecover"></a>
<p>Continue a paused incoming postcopy migration using the <var>uri</var>.
</p></dd>
<dt><samp>migrate_pause</samp></dt>
<dd><a name="index-migrate_005fpause"></a>
<p>Pause an ongoing migration. Currently it only supports postcopy.
</p></dd>
<dt><samp>migrate_set_cache_size <var>value</var></samp></dt>
<dd><a name="index-migrate_005fset_005fcache_005fsize"></a>
<p>Set cache size to <var>value</var> (in bytes) for xbzrle migrations.
</p></dd>
<dt><samp>migrate_set_speed <var>value</var></samp></dt>
<dd><a name="index-migrate_005fset_005fspeed"></a>
<p>Set maximum speed to <var>value</var> (in bytes) for migrations.
</p></dd>
<dt><samp>migrate_set_downtime <var>second</var></samp></dt>
<dd><a name="index-migrate_005fset_005fdowntime"></a>
<p>Set maximum tolerated downtime (in seconds) for migration.
</p></dd>
<dt><samp>migrate_set_capability <var>capability</var> <var>state</var></samp></dt>
<dd><a name="index-migrate_005fset_005fcapability"></a>
<p>Enable/Disable the usage of a capability <var>capability</var> for migration.
</p></dd>
<dt><samp>migrate_set_parameter <var>parameter</var> <var>value</var></samp></dt>
<dd><a name="index-migrate_005fset_005fparameter"></a>
<p>Set the parameter <var>parameter</var> for migration.
</p></dd>
<dt><samp>migrate_start_postcopy</samp></dt>
<dd><a name="index-migrate_005fstart_005fpostcopy"></a>
<p>Switch in-progress migration to postcopy mode. Ignored after the end of
migration (or once already in postcopy).
</p></dd>
<dt><samp>x_colo_lost_heartbeat</samp></dt>
<dd><a name="index-x_005fcolo_005flost_005fheartbeat"></a>
<p>Tell COLO that heartbeat is lost, a failover or takeover is needed.
</p></dd>
<dt><samp>client_migrate_info <var>protocol</var> <var>hostname</var> <var>port</var> <var>tls-port</var> <var>cert-subject</var></samp></dt>
<dd><a name="index-client_005fmigrate_005finfo"></a>
<p>Set migration information for remote display. This makes the server
ask the client to automatically reconnect using the new parameters
once migration finished successfully. Only implemented for SPICE.
</p></dd>
<dt><samp>dump-guest-memory [-p] <var>filename</var> <var>begin</var> <var>length</var></samp></dt>
<dt><samp>dump-guest-memory [-z|-l|-s|-w] <var>filename</var></samp></dt>
<dd><a name="index-dump_002dguest_002dmemory"></a>
<p>Dump guest memory to <var>protocol</var>. The file can be processed with crash or
gdb. Without -z|-l|-s|-w, the dump format is ELF.
-p: do paging to get guest&rsquo;s memory mapping.
-z: dump in kdump-compressed format, with zlib compression.
-l: dump in kdump-compressed format, with lzo compression.
-s: dump in kdump-compressed format, with snappy compression.
-w: dump in Windows crashdump format (can be used instead of ELF-dump converting),
for Windows x64 guests with vmcoreinfo driver only
filename: dump file name.
begin: the starting physical address. It&rsquo;s optional, and should be
specified together with length.
length: the memory size, in bytes. It&rsquo;s optional, and should be specified
together with begin.
</p></dd>
<dt><samp>dump-skeys <var>filename</var></samp></dt>
<dd><a name="index-dump_002dskeys"></a>
<p>Save guest storage keys to a file.
</p></dd>
<dt><samp>migration_mode <var>mode</var></samp></dt>
<dd><a name="index-migration_005fmode"></a>
<p>Enables or disables migration mode.
</p></dd>
<dt><samp>snapshot_blkdev</samp></dt>
<dd><a name="index-snapshot_005fblkdev"></a>
<p>Snapshot device, using snapshot file as target if provided
</p></dd>
<dt><samp>snapshot_blkdev_internal</samp></dt>
<dd><a name="index-snapshot_005fblkdev_005finternal"></a>
<p>Take an internal snapshot on device if it support
</p></dd>
<dt><samp>snapshot_delete_blkdev_internal</samp></dt>
<dd><a name="index-snapshot_005fdelete_005fblkdev_005finternal"></a>
<p>Delete an internal snapshot on device if it support
</p></dd>
<dt><samp>drive_mirror</samp></dt>
<dd><a name="index-drive_005fmirror"></a>
<p>Start mirroring a block device&rsquo;s writes to a new destination,
using the specified target.
</p></dd>
<dt><samp>drive_backup</samp></dt>
<dd><a name="index-drive_005fbackup"></a>
<p>Start a point-in-time copy of a block device to a specificed target.
</p></dd>
<dt><samp>drive_add</samp></dt>
<dd><a name="index-drive_005fadd"></a>
<p>Add drive to PCI storage controller.
</p></dd>
<dt><samp>pcie_aer_inject_error</samp></dt>
<dd><a name="index-pcie_005faer_005finject_005ferror"></a>
<p>Inject PCIe AER error
</p></dd>
<dt><samp>netdev_add</samp></dt>
<dd><a name="index-netdev_005fadd"></a>
<p>Add host network device.
</p></dd>
<dt><samp>netdev_del</samp></dt>
<dd><a name="index-netdev_005fdel"></a>
<p>Remove host network device.
</p></dd>
<dt><samp>object_add</samp></dt>
<dd><a name="index-object_005fadd"></a>
<p>Create QOM object.
</p></dd>
<dt><samp>object_del</samp></dt>
<dd><a name="index-object_005fdel"></a>
<p>Destroy QOM object.
</p></dd>
<dt><samp>hostfwd_add</samp></dt>
<dd><a name="index-hostfwd_005fadd"></a>
<p>Redirect TCP or UDP connections from host to guest (requires -net user).
</p></dd>
<dt><samp>hostfwd_remove</samp></dt>
<dd><a name="index-hostfwd_005fremove"></a>
<p>Remove host-to-guest TCP or UDP redirection.
</p></dd>
<dt><samp>balloon <var>value</var></samp></dt>
<dd><a name="index-balloon"></a>
<p>Request VM to change its memory allocation to <var>value</var> (in MB).
</p></dd>
<dt><samp>set_link <var>name</var> [on|off]</samp></dt>
<dd><a name="index-set_005flink"></a>
<p>Switch link <var>name</var> on (i.e. up) or off (i.e. down).
</p></dd>
<dt><samp>watchdog_action</samp></dt>
<dd><a name="index-watchdog_005faction"></a>
<p>Change watchdog action.
</p></dd>
<dt><samp>acl_show <var>aclname</var></samp></dt>
<dd><a name="index-acl_005fshow"></a>
<p>List all the matching rules in the access control list, and the default
policy. There are currently two named access control lists,
<var>vnc.x509dname</var> and <var>vnc.username</var> matching on the x509 client
certificate distinguished name, and SASL username respectively.
</p></dd>
<dt><samp>acl_policy <var>aclname</var> <code>allow|deny</code></samp></dt>
<dd><a name="index-acl_005fpolicy"></a>
<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><samp>acl_add <var>aclname</var> <var>match</var> <code>allow|deny</code> [<var>index</var>]</samp></dt>
<dd><a name="index-acl_005fadd"></a>
<p>Add a match rule to the access control list, allowing or denying access.
The match will normally be an exact username or x509 distinguished name,
but can optionally include wildcard globs. eg <code>*@EXAMPLE.COM</code> to
allow all users in the <code>EXAMPLE.COM</code> kerberos realm. The match will
normally be appended to the end of the ACL, but can be inserted
earlier in the list if the optional <var>index</var> parameter is supplied.
</p></dd>
<dt><samp>acl_remove <var>aclname</var> <var>match</var></samp></dt>
<dd><a name="index-acl_005fremove"></a>
<p>Remove the specified match rule from the access control list.
</p></dd>
<dt><samp>acl_reset <var>aclname</var></samp></dt>
<dd><a name="index-acl_005freset"></a>
<p>Remove all matches from the access control list, and set the default
policy back to <code>deny</code>.
</p></dd>
<dt><samp>nbd_server_start <var>host</var>:<var>port</var></samp></dt>
<dd><a name="index-nbd_005fserver_005fstart"></a>
<p>Start an NBD server on the given host and/or port. If the <samp>-a</samp>
option is included, all of the virtual machine&rsquo;s block devices that
have an inserted media on them are automatically exported; in this case,
the <samp>-w</samp> option makes the devices writable too.
</p></dd>
<dt><samp>nbd_server_add <var>device</var> [ <var>name</var> ]</samp></dt>
<dd><a name="index-nbd_005fserver_005fadd"></a>
<p>Export a block device through QEMU&rsquo;s NBD server, which must be started
beforehand with <code>nbd_server_start</code>. The <samp>-w</samp> option makes the
exported device writable too. The export name is controlled by <var>name</var>,
defaulting to <var>device</var>.
</p></dd>
<dt><samp>nbd_server_remove [-f] <var>name</var></samp></dt>
<dd><a name="index-nbd_005fserver_005fremove"></a>
<p>Stop exporting a block device through QEMU&rsquo;s NBD server, which was
previously started with <code>nbd_server_add</code>. The <samp>-f</samp>
option forces the server to drop the export immediately even if
clients are connected; otherwise the command fails unless there are no
clients.
</p></dd>
<dt><samp>nbd_server_stop</samp></dt>
<dd><a name="index-nbd_005fserver_005fstop"></a>
<p>Stop the QEMU embedded NBD server.
</p></dd>
<dt><samp>mce <var>cpu</var> <var>bank</var> <var>status</var> <var>mcgstatus</var> <var>addr</var> <var>misc</var></samp></dt>
<dd><a name="index-mce-_0028x86_0029"></a>
<p>Inject an MCE on the given CPU (x86 only).
</p></dd>
<dt><samp>getfd <var>fdname</var></samp></dt>
<dd><a name="index-getfd"></a>
<p>If a file descriptor is passed alongside this command using the SCM_RIGHTS
mechanism on unix sockets, it is stored using the name <var>fdname</var> for
later use by other monitor commands.
</p></dd>
<dt><samp>closefd <var>fdname</var></samp></dt>
<dd><a name="index-closefd"></a>
<p>Close the file descriptor previously assigned to <var>fdname</var> using the
<code>getfd</code> command. This is only needed if the file descriptor was never
used by another monitor command.
</p></dd>
<dt><samp>block_passwd <var>device</var> <var>password</var></samp></dt>
<dd><a name="index-block_005fpasswd"></a>
<p>Set the encrypted device <var>device</var> password to <var>password</var>
</p>
<p>This command is now obsolete and will always return an error since 2.10
</p></dd>
<dt><samp>block_set_io_throttle <var>device</var> <var>bps</var> <var>bps_rd</var> <var>bps_wr</var> <var>iops</var> <var>iops_rd</var> <var>iops_wr</var></samp></dt>
<dd><a name="index-block_005fset_005fio_005fthrottle"></a>
<p>Change I/O throttle limits for a block drive to <var>bps</var> <var>bps_rd</var> <var>bps_wr</var> <var>iops</var> <var>iops_rd</var> <var>iops_wr</var>.
<var>device</var> can be a block device name, a qdev ID or a QOM path.
</p></dd>
<dt><samp>set_password [ vnc | spice ] password [ action-if-connected ]</samp></dt>
<dd><a name="index-set_005fpassword"></a>
<p>Change spice/vnc password. Use zero to make the password stay valid
forever. <var>action-if-connected</var> specifies what should happen in
case a connection is established: <var>fail</var> makes the password change
fail. <var>disconnect</var> changes the password and disconnects the
client. <var>keep</var> changes the password and keeps the connection up.
<var>keep</var> is the default.
</p></dd>
<dt><samp>expire_password [ vnc | spice ] expire-time</samp></dt>
<dd><a name="index-expire_005fpassword"></a>
<p>Specify when a password for spice/vnc becomes
invalid. <var>expire-time</var> accepts:
</p>
<dl compact="compact">
<dt><var>now</var></dt>
<dd><p>Invalidate password instantly.
</p>
</dd>
<dt><var>never</var></dt>
<dd><p>Password stays valid forever.
</p>
</dd>
<dt><var>+nsec</var></dt>
<dd><p>Password stays valid for <var>nsec</var> seconds starting now.
</p>
</dd>
<dt><var>nsec</var></dt>
<dd><p>Password is invalidated at the given time. <var>nsec</var> are the seconds
passed since 1970, i.e. unix epoch.
</p>
</dd>
</dl>
</dd>
<dt><samp>chardev-add args</samp></dt>
<dd><a name="index-chardev_002dadd"></a>
<p>chardev-add accepts the same parameters as the -chardev command line switch.
</p>
</dd>
<dt><samp>chardev-change args</samp></dt>
<dd><a name="index-chardev_002dchange"></a>
<p>chardev-change accepts existing chardev <var>id</var> and then the same arguments
as the -chardev command line switch (except for &quot;id&quot;).
</p>
</dd>
<dt><samp>chardev-remove id</samp></dt>
<dd><a name="index-chardev_002dremove"></a>
<p>Removes the chardev <var>id</var>.
</p>
</dd>
<dt><samp>chardev-send-break id</samp></dt>
<dd><a name="index-chardev_002dsend_002dbreak"></a>
<p>Send a break on the chardev <var>id</var>.
</p>
</dd>
<dt><samp>qemu-io <var>device</var> <var>command</var></samp></dt>
<dd><a name="index-qemu_002dio"></a>
<p>Executes a qemu-io command on the given block device.
</p>
</dd>
<dt><samp>cpu-add <var>id</var></samp></dt>
<dd><a name="index-cpu_002dadd"></a>
<p>Add CPU with id <var>id</var>
</p></dd>
<dt><samp>qom-list [<var>path</var>]</samp></dt>
<dd><p>Print QOM properties of object at location <var>path</var>
</p></dd>
<dt><samp>qom-set <var>path</var> <var>property</var> <var>value</var></samp></dt>
<dd><p>Set QOM property <var>property</var> of object at location <var>path</var> to value <var>value</var>
</p></dd>
</dl>
<dl compact="compact">
<dt><samp>info <var>subcommand</var></samp></dt>
<dd><a name="index-info"></a>
<p>Show various information about the system state.
</p><dl compact="compact">
<dt><samp>info version</samp></dt>
<dd><a name="index-info-version"></a>
<p>Show the version of QEMU.
</p></dd>
<dt><samp>info network</samp></dt>
<dd><a name="index-info-network"></a>
<p>Show the network state.
</p></dd>
<dt><samp>info chardev</samp></dt>
<dd><a name="index-info-chardev"></a>
<p>Show the character devices.
</p></dd>
<dt><samp>info block</samp></dt>
<dd><a name="index-info-block"></a>
<p>Show info of one block device or all block devices.
</p></dd>
<dt><samp>info blockstats</samp></dt>
<dd><a name="index-info-blockstats"></a>
<p>Show block device statistics.
</p></dd>
<dt><samp>info block-jobs</samp></dt>
<dd><a name="index-info-block_002djobs"></a>
<p>Show progress of ongoing block device operations.
</p></dd>
<dt><samp>info registers</samp></dt>
<dd><a name="index-info-registers"></a>
<p>Show the cpu registers.
</p></dd>
<dt><samp>info lapic</samp></dt>
<dd><a name="index-info-lapic"></a>
<p>Show local APIC state
</p></dd>
<dt><samp>info ioapic</samp></dt>
<dd><a name="index-info-ioapic"></a>
<p>Show io APIC state
</p></dd>
<dt><samp>info cpus</samp></dt>
<dd><a name="index-info-cpus"></a>
<p>Show infos for each CPU.
</p></dd>
<dt><samp>info history</samp></dt>
<dd><a name="index-info-history"></a>
<p>Show the command line history.
</p></dd>
<dt><samp>info irq</samp></dt>
<dd><a name="index-info-irq"></a>
<p>Show the interrupts statistics (if available).
</p></dd>
<dt><samp>info pic</samp></dt>
<dd><a name="index-info-pic"></a>
<p>Show PIC state.
</p></dd>
<dt><samp>info pci</samp></dt>
<dd><a name="index-info-pci"></a>
<p>Show PCI information.
</p></dd>
<dt><samp>info tlb</samp></dt>
<dd><a name="index-info-tlb"></a>
<p>Show virtual to physical memory mappings.
</p></dd>
<dt><samp>info mem</samp></dt>
<dd><a name="index-info-mem"></a>
<p>Show the active virtual memory mappings.
</p></dd>
<dt><samp>info mtree</samp></dt>
<dd><a name="index-info-mtree"></a>
<p>Show memory tree.
</p></dd>
<dt><samp>info jit</samp></dt>
<dd><a name="index-info-jit"></a>
<p>Show dynamic compiler info.
</p></dd>
<dt><samp>info opcount</samp></dt>
<dd><a name="index-info-opcount"></a>
<p>Show dynamic compiler opcode counters
</p></dd>
<dt><samp>info kvm</samp></dt>
<dd><a name="index-info-kvm"></a>
<p>Show KVM information.
</p></dd>
<dt><samp>info numa</samp></dt>
<dd><a name="index-info-numa"></a>
<p>Show NUMA information.
</p></dd>
<dt><samp>info usb</samp></dt>
<dd><a name="index-info-usb"></a>
<p>Show guest USB devices.
</p></dd>
<dt><samp>info usbhost</samp></dt>
<dd><a name="index-info-usbhost"></a>
<p>Show host USB devices.
</p></dd>
<dt><samp>info profile</samp></dt>
<dd><a name="index-info-profile"></a>
<p>Show profiling information.
</p></dd>
<dt><samp>info capture</samp></dt>
<dd><a name="index-info-capture"></a>
<p>Show capture information.
</p></dd>
<dt><samp>info snapshots</samp></dt>
<dd><a name="index-info-snapshots"></a>
<p>Show the currently saved VM snapshots.
</p></dd>
<dt><samp>info status</samp></dt>
<dd><a name="index-info-status"></a>
<p>Show the current VM status (running|paused).
</p></dd>
<dt><samp>info mice</samp></dt>
<dd><a name="index-info-mice"></a>
<p>Show which guest mouse is receiving events.
</p></dd>
<dt><samp>info vnc</samp></dt>
<dd><a name="index-info-vnc"></a>
<p>Show the vnc server status.
</p></dd>
<dt><samp>info spice</samp></dt>
<dd><a name="index-info-spice"></a>
<p>Show the spice server status.
</p></dd>
<dt><samp>info name</samp></dt>
<dd><a name="index-info-name"></a>
<p>Show the current VM name.
</p></dd>
<dt><samp>info uuid</samp></dt>
<dd><a name="index-info-uuid"></a>
<p>Show the current VM UUID.
</p></dd>
<dt><samp>info cpustats</samp></dt>
<dd><a name="index-info-cpustats"></a>
<p>Show CPU statistics.
</p></dd>
<dt><samp>info usernet</samp></dt>
<dd><a name="index-info-usernet"></a>
<p>Show user network stack connection states.
</p></dd>
<dt><samp>info migrate</samp></dt>
<dd><a name="index-info-migrate"></a>
<p>Show migration status.
</p></dd>
<dt><samp>info migrate_capabilities</samp></dt>
<dd><a name="index-info-migrate_005fcapabilities"></a>
<p>Show current migration capabilities.
</p></dd>
<dt><samp>info migrate_parameters</samp></dt>
<dd><a name="index-info-migrate_005fparameters"></a>
<p>Show current migration parameters.
</p></dd>
<dt><samp>info migrate_cache_size</samp></dt>
<dd><a name="index-info-migrate_005fcache_005fsize"></a>
<p>Show current migration xbzrle cache size.
</p></dd>
<dt><samp>info balloon</samp></dt>
<dd><a name="index-info-balloon"></a>
<p>Show balloon information.
</p></dd>
<dt><samp>info qtree</samp></dt>
<dd><a name="index-info-qtree"></a>
<p>Show device tree.
</p></dd>
<dt><samp>info qdm</samp></dt>
<dd><a name="index-info-qdm"></a>
<p>Show qdev device model list.
</p></dd>
<dt><samp>info qom-tree</samp></dt>
<dd><a name="index-info-qom_002dtree"></a>
<p>Show QOM composition tree.
</p></dd>
<dt><samp>info roms</samp></dt>
<dd><a name="index-info-roms"></a>
<p>Show roms.
</p></dd>
<dt><samp>info trace-events</samp></dt>
<dd><a name="index-info-trace_002devents"></a>
<p>Show available trace-events &amp; their state.
</p></dd>
<dt><samp>info tpm</samp></dt>
<dd><a name="index-info-tpm"></a>
<p>Show the TPM device.
</p></dd>
<dt><samp>info memdev</samp></dt>
<dd><a name="index-info-memdev"></a>
<p>Show memory backends
</p></dd>
<dt><samp>info memory-devices</samp></dt>
<dd><a name="index-info-memory_002ddevices"></a>
<p>Show memory devices.
</p></dd>
<dt><samp>info iothreads</samp></dt>
<dd><a name="index-info-iothreads"></a>
<p>Show iothread&rsquo;s identifiers.
</p></dd>
<dt><samp>info rocker <var>name</var></samp></dt>
<dd><a name="index-info-rocker"></a>
<p>Show rocker switch.
</p></dd>
<dt><samp>info rocker-ports <var>name</var>-ports</samp></dt>
<dd><a name="index-info-rocker_002dports"></a>
<p>Show rocker ports.
</p></dd>
<dt><samp>info rocker-of-dpa-flows <var>name</var> [<var>tbl_id</var>]</samp></dt>
<dd><a name="index-info-rocker_002dof_002ddpa_002dflows"></a>
<p>Show rocker OF-DPA flow tables.
</p></dd>
<dt><samp>info rocker-of-dpa-groups <var>name</var> [<var>type</var>]</samp></dt>
<dd><a name="index-info-rocker_002dof_002ddpa_002dgroups"></a>
<p>Show rocker OF-DPA groups.
</p></dd>
<dt><samp>info skeys <var>address</var></samp></dt>
<dd><a name="index-info-skeys"></a>
<p>Display the value of a storage key (s390 only)
</p></dd>
<dt><samp>info cmma <var>address</var></samp></dt>
<dd><a name="index-info-cmma"></a>
<p>Display the values of the CMMA storage attributes for a range of pages (s390 only)
</p></dd>
<dt><samp>info dump</samp></dt>
<dd><a name="index-info-dump"></a>
<p>Display the latest dump status.
</p></dd>
<dt><samp>info ramblock</samp></dt>
<dd><a name="index-info-ramblock"></a>
<p>Dump all the ramblocks of the system.
</p></dd>
<dt><samp>info hotpluggable-cpus</samp></dt>
<dd><a name="index-info-hotpluggable_002dcpus"></a>
<p>Show information about hotpluggable CPUs
</p></dd>
<dt><samp>info vm-generation-id</samp></dt>
<dd><a name="index-info-vm_002dgeneration_002did"></a>
<p>Show Virtual Machine Generation ID
</p></dd>
<dt><samp>info memory_size_summary</samp></dt>
<dd><a name="index-info-memory_005fsize_005fsummary"></a>
<p>Display the amount of initially allocated and present hotpluggable (if
enabled) memory in bytes.
</p></dd>
<dt><samp>info sev</samp></dt>
<dd><a name="index-info-sev"></a>
<p>Show SEV information.
</p></dd>
</dl>
</dd>
</dl>
<a name="Integer-expressions"></a>
<h4 class="subsection">2.6.2 Integer expressions</h4>
<p>The monitor understands integers expressions for every integer
argument. You can use register names to get the value of specifics
CPU registers by prefixing them with <em>$</em>.
</p>
<hr>
<a name="disk_005fimages"></a>
<a name="Disk-Images"></a>
<h3 class="section">2.7 Disk Images</h3>
<p>QEMU supports many disk image formats, including growable disk images
(their size increase as non empty sectors are written), compressed and
encrypted disk images.
</p>
<hr>
<a name="disk_005fimages_005fquickstart"></a>
<a name="Quick-start-for-disk-image-creation"></a>
<h4 class="subsection">2.7.1 Quick start for disk image creation</h4>
<p>You can create a disk image with the command:
</p><div class="example">
<pre class="example">qemu-img create myimage.img mysize
</pre></div>
<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="#qemu_005fimg_005finvocation">qemu_img_invocation</a> for more information.
</p>
<hr>
<a name="disk_005fimages_005fsnapshot_005fmode"></a>
<a name="Snapshot-mode"></a>
<h4 class="subsection">2.7.2 Snapshot mode</h4>
<p>If you use the option <samp>-snapshot</samp>, all disk images are
considered as read only. When sectors in written, they are written in
a temporary file created in <samp>/tmp</samp>. You can however force the
write back to the raw disk images by using the <code>commit</code> monitor
command (or <tt class="key">C-a s</tt> in the serial console).
</p>
<hr>
<a name="vm_005fsnapshots"></a>
<a name="VM-snapshots"></a>
<h4 class="subsection">2.7.3 VM snapshots</h4>
<p>VM snapshots are snapshots of the complete virtual machine including
CPU state, RAM, device state and the content of all the writable
disks. In order to use VM snapshots, you must have at least one non
removable and writable block device using the <code>qcow2</code> disk image
format. Normally this device is the first virtual hard drive.
</p>
<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>
<div class="example">
<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></div>
<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="#disk_005fimages_005fsnapshot_005fmode">disk_images_snapshot_mode</a>), you can always make VM snapshots,
but they are deleted as soon as you exit QEMU.
</p>
<p>VM snapshots currently have the following known limitations:
</p><ul>
<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>
<a name="qemu_005fimg_005finvocation"></a>
<a name="qemu_002dimg-Invocation"></a>
<h4 class="subsection">2.7.4 <code>qemu-img</code> Invocation</h4>
<div class="example">
<pre class="example"><code>qemu-img</code> [<var>standard</var> <var>options</var>] <var>command</var> [<var>command</var> <var>options</var>]
</pre></div>
<p>qemu-img allows you to create, convert and modify images offline. It can handle
all image formats supported by QEMU.
</p>
<p><b>Warning:</b> Never use qemu-img to modify images in use by a running virtual
machine or any other process; this may destroy the image. Also, be aware that
querying an image that is being modified by another process may encounter
inconsistent state.
</p>
<p>Standard options:
</p><dl compact="compact">
<dt><samp>-h, --help</samp></dt>
<dd><p>Display this help and exit
</p></dd>
<dt><samp>-V, --version</samp></dt>
<dd><p>Display version information and exit
</p></dd>
<dt><samp>-T, --trace [[enable=]<var>pattern</var>][,events=<var>file</var>][,file=<var>file</var>]</samp></dt>
<dd><a name="index-_002d_002dtrace"></a>
<p>Specify tracing options.
</p>
<dl compact="compact">
<dt><samp>[enable=]<var>pattern</var></samp></dt>
<dd><p>Immediately enable events matching <var>pattern</var>
(either event name or a globbing pattern). This option is only
available if QEMU has been compiled with the <var>simple</var>, <var>log</var>
or <var>ftrace</var> tracing backend. To specify multiple events or patterns,
specify the <samp>-trace</samp> option multiple times.
</p>
<p>Use <code>-trace help</code> to print a list of names of trace points.
</p>
</dd>
<dt><samp>events=<var>file</var></samp></dt>
<dd><p>Immediately enable events listed in <var>file</var>.
The file must contain one event name (as listed in the <samp>trace-events-all</samp>
file) per line; globbing patterns are accepted too. This option is only
available if QEMU has been compiled with the <var>simple</var>, <var>log</var> or
<var>ftrace</var> tracing backend.
</p>
</dd>
<dt><samp>file=<var>file</var></samp></dt>
<dd><p>Log output traces to <var>file</var>.
This option is only available if QEMU has been compiled with
the <var>simple</var> tracing backend.
</p></dd>
</dl>
</dd>
</dl>
<p>The following commands are supported:
</p>
<dl compact="compact">
<dt><samp>amend [--object <var>objectdef</var>] [--image-opts] [-p] [-q] [-f <var>fmt</var>] [-t <var>cache</var>] -o <var>options</var> <var>filename</var></samp></dt>
<dt><samp>bench [-c <var>count</var>] [-d <var>depth</var>] [-f <var>fmt</var>] [--flush-interval=<var>flush_interval</var>] [-n] [--no-drain] [-o <var>offset</var>] [--pattern=<var>pattern</var>] [-q] [-s <var>buffer_size</var>] [-S <var>step_size</var>] [-t <var>cache</var>] [-w] [-U] <var>filename</var></samp></dt>
<dt><samp>check [--object <var>objectdef</var>] [--image-opts] [-q] [-f <var>fmt</var>] [--output=<var>ofmt</var>] [-r [leaks | all]] [-T <var>src_cache</var>] [-U] <var>filename</var></samp></dt>
<dt><samp>commit [--object <var>objectdef</var>] [--image-opts] [-q] [-f <var>fmt</var>] [-t <var>cache</var>] [-b <var>base</var>] [-d] [-p] <var>filename</var></samp></dt>
<dt><samp>compare [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [-F <var>fmt</var>] [-T <var>src_cache</var>] [-p] [-q] [-s] [-U] <var>filename1</var> <var>filename2</var></samp></dt>
<dt><samp>convert [--object <var>objectdef</var>] [--image-opts] [--target-image-opts] [-U] [-c] [-p] [-q] [-n] [-f <var>fmt</var>] [-t <var>cache</var>] [-T <var>src_cache</var>] [-O <var>output_fmt</var>] [-B <var>backing_file</var>] [-o <var>options</var>] [-l <var>snapshot_param</var>] [-S <var>sparse_size</var>] [-m <var>num_coroutines</var>] [-W] <var>filename</var> [<var>filename2</var> [...]] <var>output_filename</var></samp></dt>
<dt><samp>create [--object <var>objectdef</var>] [-q] [-f <var>fmt</var>] [-b <var>backing_file</var>] [-F <var>backing_fmt</var>] [-u] [-o <var>options</var>] <var>filename</var> [<var>size</var>]</samp></dt>
<dt><samp>dd [--image-opts] [-U] [-f <var>fmt</var>] [-O <var>output_fmt</var>] [bs=<var>block_size</var>] [count=<var>blocks</var>] [skip=<var>blocks</var>] if=<var>input</var> of=<var>output</var></samp></dt>
<dt><samp>info [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [--output=<var>ofmt</var>] [--backing-chain] [-U] <var>filename</var></samp></dt>
<dt><samp>map [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [--output=<var>ofmt</var>] [-U] <var>filename</var></samp></dt>
<dt><samp>measure [--output=<var>ofmt</var>] [-O <var>output_fmt</var>] [-o <var>options</var>] [--size <var>N</var> | [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [-l <var>snapshot_param</var>] <var>filename</var>]</samp></dt>
<dt><samp>snapshot [--object <var>objectdef</var>] [--image-opts] [-U] [-q] [-l | -a <var>snapshot</var> | -c <var>snapshot</var> | -d <var>snapshot</var>] <var>filename</var></samp></dt>
<dt><samp>rebase [--object <var>objectdef</var>] [--image-opts] [-U] [-q] [-f <var>fmt</var>] [-t <var>cache</var>] [-T <var>src_cache</var>] [-p] [-u] -b <var>backing_file</var> [-F <var>backing_fmt</var>] <var>filename</var></samp></dt>
<dt><samp>resize [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [--preallocation=<var>prealloc</var>] [-q] [--shrink] <var>filename</var> [+ | -]<var>size</var></samp></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>fmt</var></dt>
<dd><p>is the disk image format. It is guessed automatically in most cases. See below
for a description of the supported disk formats.
</p>
</dd>
<dt><var>size</var></dt>
<dd><p>is the disk image size in bytes. Optional suffixes <code>k</code> or <code>K</code>
(kilobyte, 1024) <code>M</code> (megabyte, 1024k) and <code>G</code> (gigabyte, 1024M)
and T (terabyte, 1024G) are supported. <code>b</code> is ignored.
</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>options</var></dt>
<dd><p>is a comma separated list of format specific options in a
name=value format. Use <code>-o ?</code> for an overview of the options supported
by the used format or see the format descriptions below for details.
</p>
</dd>
<dt><var>snapshot_param</var></dt>
<dd><p>is param used for internal snapshot, format is
&rsquo;snapshot.id=[ID],snapshot.name=[NAME]&rsquo; or &rsquo;[ID_OR_NAME]&rsquo;
</p>
</dd>
</dl>
<dl compact="compact">
<dt><samp>--object <var>objectdef</var></samp></dt>
<dd><p>is a QEMU user creatable object definition. See the <code>qemu(1)</code> manual
page for a description of the object properties. The most common object
type is a <code>secret</code>, which is used to supply passwords and/or encryption
keys.
</p>
</dd>
<dt><samp>--image-opts</samp></dt>
<dd><p>Indicates that the source <var>filename</var> parameter is to be interpreted as a
full option string, not a plain filename. This parameter is mutually
exclusive with the <var>-f</var> parameter.
</p>
</dd>
<dt><samp>--target-image-opts</samp></dt>
<dd><p>Indicates that the <var>output_filename</var> parameter(s) are to be interpreted as
a full option string, not a plain filename. This parameter is mutually
exclusive with the <var>-O</var> parameters. It is currently required to also use
the <var>-n</var> parameter to skip image creation. This restriction may be relaxed
in a future release.
</p>
</dd>
<dt><samp>--force-share (-U)</samp></dt>
<dd><p>If specified, <code>qemu-img</code> will open the image in shared mode, allowing
other QEMU processes to open it in write mode. For example, this can be used to
get the image information (with &rsquo;info&rsquo; subcommand) when the image is used by a
running guest. Note that this could produce inconsistent results because of
concurrent metadata changes, etc. This option is only allowed when opening
images in read-only mode.
</p>
</dd>
<dt><samp>--backing-chain</samp></dt>
<dd><p>will enumerate information about backing files in a disk image chain. Refer
below for further description.
</p>
</dd>
<dt><samp>-c</samp></dt>
<dd><p>indicates that target image must be compressed (qcow format only)
</p>
</dd>
<dt><samp>-h</samp></dt>
<dd><p>with or without a command shows help and lists the supported formats
</p>
</dd>
<dt><samp>-p</samp></dt>
<dd><p>display progress bar (compare, convert and rebase commands only).
If the <var>-p</var> option is not used for a command that supports it, the
progress is reported when the process receives a <code>SIGUSR1</code> or
<code>SIGINFO</code> signal.
</p>
</dd>
<dt><samp>-q</samp></dt>
<dd><p>Quiet mode - do not print any output (except errors). There&rsquo;s no progress bar
in case both <var>-q</var> and <var>-p</var> options are used.
</p>
</dd>
<dt><samp>-S <var>size</var></samp></dt>
<dd><p>indicates the consecutive number of bytes that must contain only zeros
for qemu-img to create a sparse image during conversion. This value is rounded
down to the nearest 512 bytes. You may use the common size suffixes like
<code>k</code> for kilobytes.
</p>
</dd>
<dt><samp>-t <var>cache</var></samp></dt>
<dd><p>specifies the cache mode that should be used with the (destination) file. See
the documentation of the emulator&rsquo;s <code>-drive cache=...</code> option for allowed
values.
</p>
</dd>
<dt><samp>-T <var>src_cache</var></samp></dt>
<dd><p>specifies the cache mode that should be used with the source file(s). See
the documentation of the emulator&rsquo;s <code>-drive cache=...</code> option for allowed
values.
</p>
</dd>
</dl>
<p>Parameters to snapshot subcommand:
</p>
<dl compact="compact">
<dt><samp>snapshot</samp></dt>
<dd><p>is the name of the snapshot to create, apply or delete
</p></dd>
<dt><samp>-a</samp></dt>
<dd><p>applies a snapshot (revert disk to saved state)
</p></dd>
<dt><samp>-c</samp></dt>
<dd><p>creates a snapshot
</p></dd>
<dt><samp>-d</samp></dt>
<dd><p>deletes a snapshot
</p></dd>
<dt><samp>-l</samp></dt>
<dd><p>lists all snapshots in the given image
</p></dd>
</dl>
<p>Parameters to compare subcommand:
</p>
<dl compact="compact">
<dt><samp>-f</samp></dt>
<dd><p>First image format
</p></dd>
<dt><samp>-F</samp></dt>
<dd><p>Second image format
</p></dd>
<dt><samp>-s</samp></dt>
<dd><p>Strict mode - fail on different image size or sector allocation
</p></dd>
</dl>
<p>Parameters to convert subcommand:
</p>
<dl compact="compact">
<dt><samp>-n</samp></dt>
<dd><p>Skip the creation of the target volume
</p></dd>
<dt><samp>-m</samp></dt>
<dd><p>Number of parallel coroutines for the convert process
</p></dd>
<dt><samp>-W</samp></dt>
<dd><p>Allow out-of-order writes to the destination. This option improves performance,
but is only recommended for preallocated devices like host devices or other
raw block devices.
</p></dd>
<dt><samp>-C</samp></dt>
<dd><p>Try to use copy offloading to move data from source image to target. This may
improve performance if the data is remote, such as with NFS or iSCSI backends,
but will not automatically sparsify zero sectors, and may result in a fully
allocated target image depending on the host support for getting allocation
information.
</p></dd>
</dl>
<p>Parameters to dd subcommand:
</p>
<dl compact="compact">
<dt><samp>bs=<var>block_size</var></samp></dt>
<dd><p>defines the block size
</p></dd>
<dt><samp>count=<var>blocks</var></samp></dt>
<dd><p>sets the number of input blocks to copy
</p></dd>
<dt><samp>if=<var>input</var></samp></dt>
<dd><p>sets the input file
</p></dd>
<dt><samp>of=<var>output</var></samp></dt>
<dd><p>sets the output file
</p></dd>
<dt><samp>skip=<var>blocks</var></samp></dt>
<dd><p>sets the number of input blocks to skip
</p></dd>
</dl>
<p>Command description:
</p>
<dl compact="compact">
<dt><samp>amend [--object <var>objectdef</var>] [--image-opts] [-p] [-p] [-f <var>fmt</var>] [-t <var>cache</var>] -o <var>options</var> <var>filename</var></samp></dt>
<dd>
<p>Amends the image format specific <var>options</var> for the image file
<var>filename</var>. Not all file formats support this operation.
</p>
</dd>
<dt><samp>bench [-c <var>count</var>] [-d <var>depth</var>] [-f <var>fmt</var>] [--flush-interval=<var>flush_interval</var>] [-n] [--no-drain] [-o <var>offset</var>] [--pattern=<var>pattern</var>] [-q] [-s <var>buffer_size</var>] [-S <var>step_size</var>] [-t <var>cache</var>] [-w] [-U] <var>filename</var></samp></dt>
<dd>
<p>Run a simple sequential I/O benchmark on the specified image. If <code>-w</code> is
specified, a write test is performed, otherwise a read test is performed.
</p>
<p>A total number of <var>count</var> I/O requests is performed, each <var>buffer_size</var>
bytes in size, and with <var>depth</var> requests in parallel. The first request
starts at the position given by <var>offset</var>, each following request increases
the current position by <var>step_size</var>. If <var>step_size</var> is not given,
<var>buffer_size</var> is used for its value.
</p>
<p>If <var>flush_interval</var> is specified for a write test, the request queue is
drained and a flush is issued before new writes are made whenever the number of
remaining requests is a multiple of <var>flush_interval</var>. If additionally
<code>--no-drain</code> is specified, a flush is issued without draining the request
queue first.
</p>
<p>If <code>-n</code> is specified, the native AIO backend is used if possible. On
Linux, this option only works if <code>-t none</code> or <code>-t directsync</code> is
specified as well.
</p>
<p>For write tests, by default a buffer filled with zeros is written. This can be
overridden with a pattern byte specified by <var>pattern</var>.
</p>
</dd>
<dt><samp>check [--object <var>objectdef</var>] [--image-opts] [-q] [-f <var>fmt</var>] [--output=<var>ofmt</var>] [-r [leaks | all]] [-T <var>src_cache</var>] [-U] <var>filename</var></samp></dt>
<dd>
<p>Perform a consistency check on the disk image <var>filename</var>. The command can
output in the format <var>ofmt</var> which is either <code>human</code> or <code>json</code>.
</p>
<p>If <code>-r</code> is specified, qemu-img tries to repair any inconsistencies found
during the check. <code>-r leaks</code> repairs only cluster leaks, whereas
<code>-r all</code> fixes all kinds of errors, with a higher risk of choosing the
wrong fix or hiding corruption that has already occurred.
</p>
<p>Only the formats <code>qcow2</code>, <code>qed</code> and <code>vdi</code> support
consistency checks.
</p>
<p>In case the image does not have any inconsistencies, check exits with <code>0</code>.
Other exit codes indicate the kind of inconsistency found or if another error
occurred. The following table summarizes all exit codes of the check subcommand:
</p>
<dl compact="compact">
<dt><samp>0</samp></dt>
<dd><p>Check completed, the image is (now) consistent
</p></dd>
<dt><samp>1</samp></dt>
<dd><p>Check not completed because of internal errors
</p></dd>
<dt><samp>2</samp></dt>
<dd><p>Check completed, image is corrupted
</p></dd>
<dt><samp>3</samp></dt>
<dd><p>Check completed, image has leaked clusters, but is not corrupted
</p></dd>
<dt><samp>63</samp></dt>
<dd><p>Checks are not supported by the image format
</p>
</dd>
</dl>
<p>If <code>-r</code> is specified, exit codes representing the image state refer to the
state after (the attempt at) repairing it. That is, a successful <code>-r all</code>
will yield the exit code 0, independently of the image state before.
</p>
</dd>
<dt><samp>commit [--object <var>objectdef</var>] [--image-opts] [-q] [-f <var>fmt</var>] [-t <var>cache</var>] [-b <var>base</var>] [-d] [-p] <var>filename</var></samp></dt>
<dd>
<p>Commit the changes recorded in <var>filename</var> in its base image or backing file.
If the backing file is smaller than the snapshot, then the backing file will be
resized to be the same size as the snapshot. If the snapshot is smaller than
the backing file, the backing file will not be truncated. If you want the
backing file to match the size of the smaller snapshot, you can safely truncate
it yourself once the commit operation successfully completes.
</p>
<p>The image <var>filename</var> is emptied after the operation has succeeded. If you do
not need <var>filename</var> afterwards and intend to drop it, you may skip emptying
<var>filename</var> by specifying the <code>-d</code> flag.
</p>
<p>If the backing chain of the given image file <var>filename</var> has more than one
layer, the backing file into which the changes will be committed may be
specified as <var>base</var> (which has to be part of <var>filename</var>&rsquo;s backing
chain). If <var>base</var> is not specified, the immediate backing file of the top
image (which is <var>filename</var>) will be used. Note that after a commit operation
all images between <var>base</var> and the top image will be invalid and may return
garbage data when read. For this reason, <code>-b</code> implies <code>-d</code> (so that
the top image stays valid).
</p>
</dd>
<dt><samp>compare [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [-F <var>fmt</var>] [-T <var>src_cache</var>] [-p] [-q] [-s] [-U] <var>filename1</var> <var>filename2</var></samp></dt>
<dd>
<p>Check if two images have the same content. You can compare images with
different format or settings.
</p>
<p>The format is probed unless you specify it by <var>-f</var> (used for
<var>filename1</var>) and/or <var>-F</var> (used for <var>filename2</var>) option.
</p>
<p>By default, images with different size are considered identical if the larger
image contains only unallocated and/or zeroed sectors in the area after the end
of the other image. In addition, if any sector is not allocated in one image
and contains only zero bytes in the second one, it is evaluated as equal. You
can use Strict mode by specifying the <var>-s</var> option. When compare runs in
Strict mode, it fails in case image size differs or a sector is allocated in
one image and is not allocated in the second one.
</p>
<p>By default, compare prints out a result message. This message displays
information that both images are same or the position of the first different
byte. In addition, result message can report different image size in case
Strict mode is used.
</p>
<p>Compare exits with <code>0</code> in case the images are equal and with <code>1</code>
in case the images differ. Other exit codes mean an error occurred during
execution and standard error output should contain an error message.
The following table sumarizes all exit codes of the compare subcommand:
</p>
<dl compact="compact">
<dt><samp>0</samp></dt>
<dd><p>Images are identical
</p></dd>
<dt><samp>1</samp></dt>
<dd><p>Images differ
</p></dd>
<dt><samp>2</samp></dt>
<dd><p>Error on opening an image
</p></dd>
<dt><samp>3</samp></dt>
<dd><p>Error on checking a sector allocation
</p></dd>
<dt><samp>4</samp></dt>
<dd><p>Error on reading data
</p>
</dd>
</dl>
</dd>
<dt><samp>convert [--object <var>objectdef</var>] [--image-opts] [--target-image-opts] [-U] [-C] [-c] [-p] [-q] [-n] [-f <var>fmt</var>] [-t <var>cache</var>] [-T <var>src_cache</var>] [-O <var>output_fmt</var>] [-B <var>backing_file</var>] [-o <var>options</var>] [-l <var>snapshot_param</var>] [-S <var>sparse_size</var>] [-m <var>num_coroutines</var>] [-W] <var>filename</var> [<var>filename2</var> [...]] <var>output_filename</var></samp></dt>
<dd>
<p>Convert the disk image <var>filename</var> or a snapshot <var>snapshot_param</var>
to disk image <var>output_filename</var> using format <var>output_fmt</var>. It can be optionally compressed (<code>-c</code>
option) or use any format specific options like encryption (<code>-o</code> option).
</p>
<p>Only the formats <code>qcow</code> and <code>qcow2</code> support compression. The
compression is read-only. It means that if a compressed sector is
rewritten, then it is rewritten as uncompressed data.
</p>
<p>Image conversion is also useful to get smaller image when using a
growable format such as <code>qcow</code>: the empty sectors are detected and
suppressed from the destination image.
</p>
<p><var>sparse_size</var> indicates the consecutive number of bytes (defaults to 4k)
that must contain only zeros for qemu-img to create a sparse image during
conversion. If <var>sparse_size</var> is 0, the source will not be scanned for
unallocated or zero sectors, and the destination image will always be
fully allocated.
</p>
<p>You can use the <var>backing_file</var> option to force the output image to be
created as a copy on write image of the specified base image; the
<var>backing_file</var> should have the same content as the input&rsquo;s base image,
however the path, image format, etc may differ.
</p>
<p>If a relative path name is given, the backing file is looked up relative to
the directory containing <var>output_filename</var>.
</p>
<p>If the <code>-n</code> option is specified, the target volume creation will be
skipped. This is useful for formats such as <code>rbd</code> if the target
volume has already been created with site specific options that cannot
be supplied through qemu-img.
</p>
<p>Out of order writes can be enabled with <code>-W</code> to improve performance.
This is only recommended for preallocated devices like host devices or other
raw block devices. Out of order write does not work in combination with
creating compressed images.
</p>
<p><var>num_coroutines</var> specifies how many coroutines work in parallel during
the convert process (defaults to 8).
</p>
</dd>
<dt><samp>create [--object <var>objectdef</var>] [-q] [-f <var>fmt</var>] [-b <var>backing_file</var>] [-F <var>backing_fmt</var>] [-u] [-o <var>options</var>] <var>filename</var> [<var>size</var>]</samp></dt>
<dd>
<p>Create the new disk image <var>filename</var> of size <var>size</var> and format
<var>fmt</var>. Depending on the file format, you can add one or more <var>options</var>
that enable additional features of this format.
</p>
<p>If the option <var>backing_file</var> is specified, then the image will record
only the differences from <var>backing_file</var>. No size needs to be specified in
this case. <var>backing_file</var> will never be modified unless you use the
<code>commit</code> monitor command (or qemu-img commit).
</p>
<p>If a relative path name is given, the backing file is looked up relative to
the directory containing <var>filename</var>.
</p>
<p>Note that a given backing file will be opened to check that it is valid. Use
the <code>-u</code> option to enable unsafe backing file mode, which means that the
image will be created even if the associated backing file cannot be opened. A
matching backing file must be created or additional options be used to make the
backing file specification valid when you want to use an image created this
way.
</p>
<p>The size can also be specified using the <var>size</var> option with <code>-o</code>,
it doesn&rsquo;t need to be specified separately in this case.
</p>
</dd>
<dt><samp>dd [--image-opts] [-U] [-f <var>fmt</var>] [-O <var>output_fmt</var>] [bs=<var>block_size</var>] [count=<var>blocks</var>] [skip=<var>blocks</var>] if=<var>input</var> of=<var>output</var></samp></dt>
<dd>
<p>Dd copies from <var>input</var> file to <var>output</var> file converting it from
<var>fmt</var> format to <var>output_fmt</var> format.
</p>
<p>The data is by default read and written using blocks of 512 bytes but can be
modified by specifying <var>block_size</var>. If count=<var>blocks</var> is specified
dd will stop reading input after reading <var>blocks</var> input blocks.
</p>
<p>The size syntax is similar to dd(1)&rsquo;s size syntax.
</p>
</dd>
<dt><samp>info [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [--output=<var>ofmt</var>] [--backing-chain] [-U] <var>filename</var></samp></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. The command can output in the format <var>ofmt</var>
which is either <code>human</code> or <code>json</code>.
</p>
<p>If a disk image has a backing file chain, information about each disk image in
the chain can be recursively enumerated by using the option <code>--backing-chain</code>.
</p>
<p>For instance, if you have an image chain like:
</p>
<div class="example">
<pre class="example">base.qcow2 &lt;- snap1.qcow2 &lt;- snap2.qcow2
</pre></div>
<p>To enumerate information about each disk image in the above chain, starting from top to base, do:
</p>
<div class="example">
<pre class="example">qemu-img info --backing-chain snap2.qcow2
</pre></div>
</dd>
<dt><samp>map [-f <var>fmt</var>] [--output=<var>ofmt</var>] <var>filename</var></samp></dt>
<dd>
<p>Dump the metadata of image <var>filename</var> and its backing file chain.
In particular, this commands dumps the allocation state of every sector
of <var>filename</var>, together with the topmost file that allocates it in
the backing file chain.
</p>
<p>Two option formats are possible. The default format (<code>human</code>)
only dumps known-nonzero areas of the file. Known-zero parts of the
file are omitted altogether, and likewise for parts that are not allocated
throughout the chain. <code>qemu-img</code> output will identify a file
from where the data can be read, and the offset in the file. Each line
will include four fields, the first three of which are hexadecimal
numbers. For example the first line of:
</p><div class="example">
<pre class="example">Offset Length Mapped to File
0 0x20000 0x50000 /tmp/overlay.qcow2
0x100000 0x10000 0x95380000 /tmp/backing.qcow2
</pre></div>
<p>means that 0x20000 (131072) bytes starting at offset 0 in the image are
available in /tmp/overlay.qcow2 (opened in <code>raw</code> format) starting
at offset 0x50000 (327680). Data that is compressed, encrypted, or
otherwise not available in raw format will cause an error if <code>human</code>
format is in use. Note that file names can include newlines, thus it is
not safe to parse this output format in scripts.
</p>
<p>The alternative format <code>json</code> will return an array of dictionaries
in JSON format. It will include similar information in
the <code>start</code>, <code>length</code>, <code>offset</code> fields;
it will also include other more specific information:
</p><ul class="no-bullet">
<li>- whether the sectors contain actual data or not (boolean field <code>data</code>;
if false, the sectors are either unallocated or stored as optimized
all-zero clusters);
</li><li>- whether the data is known to read as zero (boolean field <code>zero</code>);
</li><li>- in order to make the output shorter, the target file is expressed as
a <code>depth</code>; for example, a depth of 2 refers to the backing file
of the backing file of <var>filename</var>.
</li></ul>
<p>In JSON format, the <code>offset</code> field is optional; it is absent in
cases where <code>human</code> format would omit the entry or exit with an error.
If <code>data</code> is false and the <code>offset</code> field is present, the
corresponding sectors in the file are not yet in use, but they are
preallocated.
</p>
<p>For more information, consult <samp>include/block/block.h</samp> in QEMU&rsquo;s
source code.
</p>
</dd>
<dt><samp>measure [--output=<var>ofmt</var>] [-O <var>output_fmt</var>] [-o <var>options</var>] [--size <var>N</var> | [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [-l <var>snapshot_param</var>] <var>filename</var>]</samp></dt>
<dd>
<p>Calculate the file size required for a new image. This information can be used
to size logical volumes or SAN LUNs appropriately for the image that will be
placed in them. The values reported are guaranteed to be large enough to fit
the image. The command can output in the format <var>ofmt</var> which is either
<code>human</code> or <code>json</code>.
</p>
<p>If the size <var>N</var> is given then act as if creating a new empty image file
using <code>qemu-img create</code>. If <var>filename</var> is given then act as if
converting an existing image file using <code>qemu-img convert</code>. The format
of the new file is given by <var>output_fmt</var> while the format of an existing
file is given by <var>fmt</var>.
</p>
<p>A snapshot in an existing image can be specified using <var>snapshot_param</var>.
</p>
<p>The following fields are reported:
</p><div class="example">
<pre class="example">required size: 524288
fully allocated size: 1074069504
</pre></div>
<p>The <code>required size</code> is the file size of the new image. It may be smaller
than the virtual disk size if the image format supports compact representation.
</p>
<p>The <code>fully allocated size</code> is the file size of the new image once data has
been written to all sectors. This is the maximum size that the image file can
occupy with the exception of internal snapshots, dirty bitmaps, vmstate data,
and other advanced image format features.
</p>
</dd>
<dt><samp>snapshot [--object <var>objectdef</var>] [--image-opts] [-U] [-q] [-l | -a <var>snapshot</var> | -c <var>snapshot</var> | -d <var>snapshot</var>] <var>filename</var></samp></dt>
<dd>
<p>List, apply, create or delete snapshots in image <var>filename</var>.
</p>
</dd>
<dt><samp>rebase [--object <var>objectdef</var>] [--image-opts] [-U] [-q] [-f <var>fmt</var>] [-t <var>cache</var>] [-T <var>src_cache</var>] [-p] [-u] -b <var>backing_file</var> [-F <var>backing_fmt</var>] <var>filename</var></samp></dt>
<dd>
<p>Changes the backing file of an image. Only the formats <code>qcow2</code> and
<code>qed</code> support changing the backing file.
</p>
<p>The backing file is changed to <var>backing_file</var> and (if the image format of
<var>filename</var> supports this) the backing file format is changed to
<var>backing_fmt</var>. If <var>backing_file</var> is specified as &ldquo;&rdquo; (the empty
string), then the image is rebased onto no backing file (i.e. it will exist
independently of any backing file).
</p>
<p>If a relative path name is given, the backing file is looked up relative to
the directory containing <var>filename</var>.
</p>
<p><var>cache</var> specifies the cache mode to be used for <var>filename</var>, whereas
<var>src_cache</var> specifies the cache mode for reading backing files.
</p>
<p>There are two different modes in which <code>rebase</code> can operate:
</p><dl compact="compact">
<dt><samp>Safe mode</samp></dt>
<dd><p>This is the default mode and performs a real rebase operation. The new backing
file may differ from the old one and qemu-img rebase will take care of keeping
the guest-visible content of <var>filename</var> unchanged.
</p>
<p>In order to achieve this, any clusters that differ between <var>backing_file</var>
and the old backing file of <var>filename</var> are merged into <var>filename</var>
before actually changing the backing file.
</p>
<p>Note that the safe mode is an expensive operation, comparable to converting
an image. It only works if the old backing file still exists.
</p>
</dd>
<dt><samp>Unsafe mode</samp></dt>
<dd><p>qemu-img uses the unsafe mode if <code>-u</code> is specified. In this mode, only the
backing file name and format of <var>filename</var> is changed without any checks
on the file contents. The user must take care of specifying the correct new
backing file, or the guest-visible content of the image will be corrupted.
</p>
<p>This mode is useful for renaming or moving the backing file to somewhere else.
It can be used without an accessible old backing file, i.e. you can use it to
fix an image whose backing file has already been moved/renamed.
</p></dd>
</dl>
<p>You can use <code>rebase</code> to perform a &ldquo;diff&rdquo; operation on two
disk images. This can be useful when you have copied or cloned
a guest, and you want to get back to a thin image on top of a
template or base image.
</p>
<p>Say that <code>base.img</code> has been cloned as <code>modified.img</code> by
copying it, and that the <code>modified.img</code> guest has run so there
are now some changes compared to <code>base.img</code>. To construct a thin
image called <code>diff.qcow2</code> that contains just the differences, do:
</p>
<div class="example">
<pre class="example">qemu-img create -f qcow2 -b modified.img diff.qcow2
qemu-img rebase -b base.img diff.qcow2
</pre></div>
<p>At this point, <code>modified.img</code> can be discarded, since
<code>base.img + diff.qcow2</code> contains the same information.
</p>
</dd>
<dt><samp>resize [--object <var>objectdef</var>] [--image-opts] [-f <var>fmt</var>] [--preallocation=<var>prealloc</var>] [-q] [--shrink] <var>filename</var> [+ | -]<var>size</var></samp></dt>
<dd>
<p>Change the disk image as if it had been created with <var>size</var>.
</p>
<p>Before using this command to shrink a disk image, you MUST use file system and
partitioning tools inside the VM to reduce allocated file systems and partition
sizes accordingly. Failure to do so will result in data loss!
</p>
<p>When shrinking images, the <code>--shrink</code> option must be given. This informs
qemu-img that the user acknowledges all loss of data beyond the truncated
image&rsquo;s end.
</p>
<p>After using this command to grow a disk image, you must use file system and
partitioning tools inside the VM to actually begin using the new space on the
device.
</p>
<p>When growing an image, the <code>--preallocation</code> option may be used to specify
how the additional image area should be allocated on the host. See the format
description in the <code>NOTES</code> section which values are allowed. Using this
option may result in slightly more data being allocated than necessary.
</p>
</dd>
</dl>
<hr>
<a name="qemu_005fnbd_005finvocation"></a>
<a name="qemu_002dnbd-Invocation"></a>
<h4 class="subsection">2.7.5 <code>qemu-nbd</code> Invocation</h4>
<div class="example">
<pre class="example"><code>qemu-nbd</code> [OPTION]... <var>filename</var>
<code>qemu-nbd</code> <samp>-d</samp> <var>dev</var>
</pre></div>
<p>Export a QEMU disk image using the NBD protocol.
</p>
<p><var>filename</var> is a disk image filename, or a set of block
driver options if <var>&ndash;image-opts</var> is specified.
</p>
<p><var>dev</var> is an NBD device.
</p>
<dl compact="compact">
<dt><samp>--object type,id=<var>id</var>,...props...</samp></dt>
<dd><p>Define a new instance of the <var>type</var> object class identified by <var>id</var>.
See the <code>qemu(1)</code> manual page for full details of the properties
supported. The common object types that it makes sense to define are the
<code>secret</code> object, which is used to supply passwords and/or encryption
keys, and the <code>tls-creds</code> object, which is used to supply TLS
credentials for the qemu-nbd server.
</p></dd>
<dt><samp>-p, --port=<var>port</var></samp></dt>
<dd><p>The TCP port to listen on (default &lsquo;<samp>10809</samp>&rsquo;)
</p></dd>
<dt><samp>-o, --offset=<var>offset</var></samp></dt>
<dd><p>The offset into the image
</p></dd>
<dt><samp>-b, --bind=<var>iface</var></samp></dt>
<dd><p>The interface to bind to (default &lsquo;<samp>0.0.0.0</samp>&rsquo;)
</p></dd>
<dt><samp>-k, --socket=<var>path</var></samp></dt>
<dd><p>Use a unix socket with path <var>path</var>
</p></dd>
<dt><samp>--image-opts</samp></dt>
<dd><p>Treat <var>filename</var> as a set of image options, instead of a plain
filename. If this flag is specified, the <var>-f</var> flag should
not be used, instead the &rsquo;<code>format=</code>&rsquo; option should be set.
</p></dd>
<dt><samp>-f, --format=<var>fmt</var></samp></dt>
<dd><p>Force the use of the block driver for format <var>fmt</var> instead of
auto-detecting
</p></dd>
<dt><samp>-r, --read-only</samp></dt>
<dd><p>Export the disk as read-only
</p></dd>
<dt><samp>-P, --partition=<var>num</var></samp></dt>
<dd><p>Only expose partition <var>num</var>
</p></dd>
<dt><samp>-s, --snapshot</samp></dt>
<dd><p>Use <var>filename</var> as an external snapshot, create a temporary
file with backing_file=<var>filename</var>, redirect the write to
the temporary one
</p></dd>
<dt><samp>-l, --load-snapshot=<var>snapshot_param</var></samp></dt>
<dd><p>Load an internal snapshot inside <var>filename</var> and export it
as an read-only device, <var>snapshot_param</var> format is
&rsquo;snapshot.id=[ID],snapshot.name=[NAME]&rsquo; or &rsquo;[ID_OR_NAME]&rsquo;
</p></dd>
<dt><samp>-n, --nocache</samp></dt>
<dt><samp>--cache=<var>cache</var></samp></dt>
<dd><p>The cache mode to be used with the file. See the documentation of
the emulator&rsquo;s <code>-drive cache=...</code> option for allowed values.
</p></dd>
<dt><samp>--aio=<var>aio</var></samp></dt>
<dd><p>Set the asynchronous I/O mode between &lsquo;<samp>threads</samp>&rsquo; (the default)
and &lsquo;<samp>native</samp>&rsquo; (Linux only).
</p></dd>
<dt><samp>--discard=<var>discard</var></samp></dt>
<dd><p>Control whether <em>discard</em> (also known as <em>trim</em> or <em>unmap</em>)
requests are ignored or passed to the filesystem. <var>discard</var> is one of
&lsquo;<samp>ignore</samp>&rsquo; (or &lsquo;<samp>off</samp>&rsquo;), &lsquo;<samp>unmap</samp>&rsquo; (or &lsquo;<samp>on</samp>&rsquo;). The default is
&lsquo;<samp>ignore</samp>&rsquo;.
</p></dd>
<dt><samp>--detect-zeroes=<var>detect-zeroes</var></samp></dt>
<dd><p>Control the automatic conversion of plain zero writes by the OS to
driver-specific optimized zero write commands. <var>detect-zeroes</var> is one of
&lsquo;<samp>off</samp>&rsquo;, &lsquo;<samp>on</samp>&rsquo; or &lsquo;<samp>unmap</samp>&rsquo;. &lsquo;<samp>unmap</samp>&rsquo;
converts a zero write to an unmap operation and can only be used if
<var>discard</var> is set to &lsquo;<samp>unmap</samp>&rsquo;. The default is &lsquo;<samp>off</samp>&rsquo;.
</p></dd>
<dt><samp>-c, --connect=<var>dev</var></samp></dt>
<dd><p>Connect <var>filename</var> to NBD device <var>dev</var>
</p></dd>
<dt><samp>-d, --disconnect</samp></dt>
<dd><p>Disconnect the device <var>dev</var>
</p></dd>
<dt><samp>-e, --shared=<var>num</var></samp></dt>
<dd><p>Allow up to <var>num</var> clients to share the device (default &lsquo;<samp>1</samp>&rsquo;)
</p></dd>
<dt><samp>-t, --persistent</samp></dt>
<dd><p>Don&rsquo;t exit on the last connection
</p></dd>
<dt><samp>-x, --export-name=<var>name</var></samp></dt>
<dd><p>Set the NBD volume export name. This switches the server to use
the new style NBD protocol negotiation
</p></dd>
<dt><samp>-D, --description=<var>description</var></samp></dt>
<dd><p>Set the NBD volume export description, as a human-readable
string. Requires the use of <samp>-x</samp>
</p></dd>
<dt><samp>--tls-creds=ID</samp></dt>
<dd><p>Enable mandatory TLS encryption for the server by setting the ID
of the TLS credentials object previously created with the &ndash;object
option.
</p></dd>
<dt><samp>--fork</samp></dt>
<dd><p>Fork off the server process and exit the parent once the server is running.
</p></dd>
<dt><samp>-v, --verbose</samp></dt>
<dd><p>Display extra debugging information
</p></dd>
<dt><samp>-h, --help</samp></dt>
<dd><p>Display this help and exit
</p></dd>
<dt><samp>-V, --version</samp></dt>
<dd><p>Display version information and exit
</p></dd>
<dt><samp>-T, --trace [[enable=]<var>pattern</var>][,events=<var>file</var>][,file=<var>file</var>]</samp></dt>
<dd><a name="index-_002d_002dtrace-1"></a>
<p>Specify tracing options.
</p>
<dl compact="compact">
<dt><samp>[enable=]<var>pattern</var></samp></dt>
<dd><p>Immediately enable events matching <var>pattern</var>
(either event name or a globbing pattern). This option is only
available if QEMU has been compiled with the <var>simple</var>, <var>log</var>
or <var>ftrace</var> tracing backend. To specify multiple events or patterns,
specify the <samp>-trace</samp> option multiple times.
</p>
<p>Use <code>-trace help</code> to print a list of names of trace points.
</p>
</dd>
<dt><samp>events=<var>file</var></samp></dt>
<dd><p>Immediately enable events listed in <var>file</var>.
The file must contain one event name (as listed in the <samp>trace-events-all</samp>
file) per line; globbing patterns are accepted too. This option is only
available if QEMU has been compiled with the <var>simple</var>, <var>log</var> or
<var>ftrace</var> tracing backend.
</p>
</dd>
<dt><samp>file=<var>file</var></samp></dt>
<dd><p>Log output traces to <var>file</var>.
This option is only available if QEMU has been compiled with
the <var>simple</var> tracing backend.
</p></dd>
</dl>
</dd>
</dl>
<p>QEMU block driver reference manual
</p>
<hr>
<a name="disk_005fimages_005fformats"></a>
<a name="Disk-image-file-formats"></a>
<h4 class="subsection">2.7.6 Disk image file formats</h4>
<p>QEMU supports many image file formats that can be used with VMs as well as with
any of the tools (like <code>qemu-img</code>). This includes the preferred formats
raw and qcow2 as well as formats that are supported for compatibility with
older QEMU versions or other hypervisors.
</p>
<p>Depending on the image format, different options can be passed to
<code>qemu-img create</code> and <code>qemu-img convert</code> using the <code>-o</code> option.
This section describes each format and the options that are supported for it.
</p>
<dl compact="compact">
<dt><samp>raw</samp></dt>
<dd>
<p>Raw disk image format. 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>
<p>Supported options:
</p><dl compact="compact">
<dt><code>preallocation</code></dt>
<dd><p>Preallocation mode (allowed values: <code>off</code>, <code>falloc</code>, <code>full</code>).
<code>falloc</code> mode preallocates space for image by calling posix_fallocate().
<code>full</code> mode preallocates space for image by writing zeros to underlying
storage.
</p></dd>
</dl>
</dd>
<dt><samp>qcow2</samp></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), zlib based compression and support of multiple VM
snapshots.
</p>
<p>Supported options:
</p><dl compact="compact">
<dt><code>compat</code></dt>
<dd><p>Determines the qcow2 version to use. <code>compat=0.10</code> uses the
traditional image format that can be read by any QEMU since 0.10.
<code>compat=1.1</code> enables image format extensions that only QEMU 1.1 and
newer understand (this is the default). Amongst others, this includes
zero clusters, which allow efficient copy-on-read for sparse images.
</p>
</dd>
<dt><code>backing_file</code></dt>
<dd><p>File name of a base image (see <samp>create</samp> subcommand)
</p></dd>
<dt><code>backing_fmt</code></dt>
<dd><p>Image format of the base image
</p></dd>
<dt><code>encryption</code></dt>
<dd><p>This option is deprecated and equivalent to <code>encrypt.format=aes</code>
</p>
</dd>
<dt><code>encrypt.format</code></dt>
<dd>
<p>If this is set to <code>luks</code>, it requests that the qcow2 payload (not
qcow2 header) be encrypted using the LUKS format. The passphrase to
use to unlock the LUKS key slot is given by the <code>encrypt.key-secret</code>
parameter. LUKS encryption parameters can be tuned with the other
<code>encrypt.*</code> parameters.
</p>
<p>If this is set to <code>aes</code>, the image is encrypted with 128-bit AES-CBC.
The encryption key is given by the <code>encrypt.key-secret</code> parameter.
This encryption format is considered to be flawed by modern cryptography
standards, suffering from a number of design problems:
</p>
<ul class="no-bullet">
<li>- The AES-CBC cipher is used with predictable initialization vectors based
on the sector number. This makes it vulnerable to chosen plaintext attacks
which can reveal the existence of encrypted data.
</li><li>- The user passphrase is directly used as the encryption key. A poorly
chosen or short passphrase will compromise the security of the encryption.
</li><li>- In the event of the passphrase being compromised there is no way to
change the passphrase to protect data in any qcow images. The files must
be cloned, using a different encryption passphrase in the new file. The
original file must then be securely erased using a program like shred,
though even this is ineffective with many modern storage technologies.
</li></ul>
<p>The use of this is no longer supported in system emulators. Support only
remains in the command line utilities, for the purposes of data liberation
and interoperability with old versions of QEMU. The <code>luks</code> format
should be used instead.
</p>
</dd>
<dt><code>encrypt.key-secret</code></dt>
<dd>
<p>Provides the ID of a <code>secret</code> object that contains the passphrase
(<code>encrypt.format=luks</code>) or encryption key (<code>encrypt.format=aes</code>).
</p>
</dd>
<dt><code>encrypt.cipher-alg</code></dt>
<dd>
<p>Name of the cipher algorithm and key length. Currently defaults
to <code>aes-256</code>. Only used when <code>encrypt.format=luks</code>.
</p>
</dd>
<dt><code>encrypt.cipher-mode</code></dt>
<dd>
<p>Name of the encryption mode to use. Currently defaults to <code>xts</code>.
Only used when <code>encrypt.format=luks</code>.
</p>
</dd>
<dt><code>encrypt.ivgen-alg</code></dt>
<dd>
<p>Name of the initialization vector generator algorithm. Currently defaults
to <code>plain64</code>. Only used when <code>encrypt.format=luks</code>.
</p>
</dd>
<dt><code>encrypt.ivgen-hash-alg</code></dt>
<dd>
<p>Name of the hash algorithm to use with the initialization vector generator
(if required). Defaults to <code>sha256</code>. Only used when <code>encrypt.format=luks</code>.
</p>
</dd>
<dt><code>encrypt.hash-alg</code></dt>
<dd>
<p>Name of the hash algorithm to use for PBKDF algorithm
Defaults to <code>sha256</code>. Only used when <code>encrypt.format=luks</code>.
</p>
</dd>
<dt><code>encrypt.iter-time</code></dt>
<dd>
<p>Amount of time, in milliseconds, to use for PBKDF algorithm per key slot.
Defaults to <code>2000</code>. Only used when <code>encrypt.format=luks</code>.
</p>
</dd>
<dt><code>cluster_size</code></dt>
<dd><p>Changes the qcow2 cluster size (must be between 512 and 2M). Smaller cluster
sizes can improve the image file size whereas larger cluster sizes generally
provide better performance.
</p>
</dd>
<dt><code>preallocation</code></dt>
<dd><p>Preallocation mode (allowed values: <code>off</code>, <code>metadata</code>, <code>falloc</code>,
<code>full</code>). An image with preallocated metadata is initially larger but can
improve performance when the image needs to grow. <code>falloc</code> and <code>full</code>
preallocations are like the same options of <code>raw</code> format, but sets up
metadata also.
</p>
</dd>
<dt><code>lazy_refcounts</code></dt>
<dd><p>If this option is set to <code>on</code>, reference count updates are postponed with
the goal of avoiding metadata I/O and improving performance. This is
particularly interesting with <samp>cache=writethrough</samp> which doesn&rsquo;t batch
metadata updates. The tradeoff is that after a host crash, the reference count
tables must be rebuilt, i.e. on the next open an (automatic) <code>qemu-img
check -r all</code> is required, which may take some time.
</p>
<p>This option can only be enabled if <code>compat=1.1</code> is specified.
</p>
</dd>
<dt><code>nocow</code></dt>
<dd><p>If this option is set to <code>on</code>, it will turn off COW of the file. It&rsquo;s only
valid on btrfs, no effect on other file systems.
</p>
<p>Btrfs has low performance when hosting a VM image file, even more when the guest
on the VM also using btrfs as file system. Turning off COW is a way to mitigate
this bad performance. Generally there are two ways to turn off COW on btrfs:
a) Disable it by mounting with nodatacow, then all newly created files will be
NOCOW. b) For an empty file, add the NOCOW file attribute. That&rsquo;s what this option
does.
</p>
<p>Note: this option is only valid to new or empty files. If there is an existing
file which is COW and has data blocks already, it couldn&rsquo;t be changed to NOCOW
by setting <code>nocow=on</code>. One can issue <code>lsattr filename</code> to check if
the NOCOW flag is set or not (Capital &rsquo;C&rsquo; is NOCOW flag).
</p>
</dd>
</dl>
</dd>
<dt><samp>qed</samp></dt>
<dd><p>Old QEMU image format with support for backing files and compact image files
(when your filesystem or transport medium does not support holes).
</p>
<p>When converting QED images to qcow2, you might want to consider using the
<code>lazy_refcounts=on</code> option to get a more QED-like behaviour.
</p>
<p>Supported options:
</p><dl compact="compact">
<dt><code>backing_file</code></dt>
<dd><p>File name of a base image (see <samp>create</samp> subcommand).
</p></dd>
<dt><code>backing_fmt</code></dt>
<dd><p>Image file format of backing file (optional). Useful if the format cannot be
autodetected because it has no header, like some vhd/vpc files.
</p></dd>
<dt><code>cluster_size</code></dt>
<dd><p>Changes the cluster size (must be power-of-2 between 4K and 64K). Smaller
cluster sizes can improve the image file size whereas larger cluster sizes
generally provide better performance.
</p></dd>
<dt><code>table_size</code></dt>
<dd><p>Changes the number of clusters per L1/L2 table (must be power-of-2 between 1
and 16). There is normally no need to change this value but this option can be
used for performance benchmarking.
</p></dd>
</dl>
</dd>
<dt><samp>qcow</samp></dt>
<dd><p>Old QEMU image format with support for backing files, compact image files,
encryption and compression.
</p>
<p>Supported options:
</p><dl compact="compact">
<dt><code>backing_file</code></dt>
<dd><p>File name of a base image (see <samp>create</samp> subcommand)
</p></dd>
<dt><code>encryption</code></dt>
<dd><p>This option is deprecated and equivalent to <code>encrypt.format=aes</code>
</p>
</dd>
<dt><code>encrypt.format</code></dt>
<dd><p>If this is set to <code>aes</code>, the image is encrypted with 128-bit AES-CBC.
The encryption key is given by the <code>encrypt.key-secret</code> parameter.
This encryption format is considered to be flawed by modern cryptography
standards, suffering from a number of design problems enumerated previously
against the <code>qcow2</code> image format.
</p>
<p>The use of this is no longer supported in system emulators. Support only
remains in the command line utilities, for the purposes of data liberation
and interoperability with old versions of QEMU.
</p>
<p>Users requiring native encryption should use the <code>qcow2</code> format
instead with <code>encrypt.format=luks</code>.
</p>
</dd>
<dt><code>encrypt.key-secret</code></dt>
<dd>
<p>Provides the ID of a <code>secret</code> object that contains the encryption
key (<code>encrypt.format=aes</code>).
</p>
</dd>
</dl>
</dd>
<dt><samp>luks</samp></dt>
<dd>
<p>LUKS v1 encryption format, compatible with Linux dm-crypt/cryptsetup
</p>
<p>Supported options:
</p><dl compact="compact">
<dt><code>key-secret</code></dt>
<dd>
<p>Provides the ID of a <code>secret</code> object that contains the passphrase.
</p>
</dd>
<dt><code>cipher-alg</code></dt>
<dd>
<p>Name of the cipher algorithm and key length. Currently defaults
to <code>aes-256</code>.
</p>
</dd>
<dt><code>cipher-mode</code></dt>
<dd>
<p>Name of the encryption mode to use. Currently defaults to <code>xts</code>.
</p>
</dd>
<dt><code>ivgen-alg</code></dt>
<dd>
<p>Name of the initialization vector generator algorithm. Currently defaults
to <code>plain64</code>.
</p>
</dd>
<dt><code>ivgen-hash-alg</code></dt>
<dd>
<p>Name of the hash algorithm to use with the initialization vector generator
(if required). Defaults to <code>sha256</code>.
</p>
</dd>
<dt><code>hash-alg</code></dt>
<dd>
<p>Name of the hash algorithm to use for PBKDF algorithm
Defaults to <code>sha256</code>.
</p>
</dd>
<dt><code>iter-time</code></dt>
<dd>
<p>Amount of time, in milliseconds, to use for PBKDF algorithm per key slot.
Defaults to <code>2000</code>.
</p>
</dd>
</dl>
</dd>
<dt><samp>vdi</samp></dt>
<dd><p>VirtualBox 1.1 compatible image format.
Supported options:
</p><dl compact="compact">
<dt><code>static</code></dt>
<dd><p>If this option is set to <code>on</code>, the image is created with metadata
preallocation.
</p></dd>
</dl>
</dd>
<dt><samp>vmdk</samp></dt>
<dd><p>VMware 3 and 4 compatible image format.
</p>
<p>Supported options:
</p><dl compact="compact">
<dt><code>backing_file</code></dt>
<dd><p>File name of a base image (see <samp>create</samp> subcommand).
</p></dd>
<dt><code>compat6</code></dt>
<dd><p>Create a VMDK version 6 image (instead of version 4)
</p></dd>
<dt><code>hwversion</code></dt>
<dd><p>Specify vmdk virtual hardware version. Compat6 flag cannot be enabled
if hwversion is specified.
</p></dd>
<dt><code>subformat</code></dt>
<dd><p>Specifies which VMDK subformat to use. Valid options are
<code>monolithicSparse</code> (default),
<code>monolithicFlat</code>,
<code>twoGbMaxExtentSparse</code>,
<code>twoGbMaxExtentFlat</code> and
<code>streamOptimized</code>.
</p></dd>
</dl>
</dd>
<dt><samp>vpc</samp></dt>
<dd><p>VirtualPC compatible image format (VHD).
Supported options:
</p><dl compact="compact">
<dt><code>subformat</code></dt>
<dd><p>Specifies which VHD subformat to use. Valid options are
<code>dynamic</code> (default) and <code>fixed</code>.
</p></dd>
</dl>
</dd>
<dt><samp>VHDX</samp></dt>
<dd><p>Hyper-V compatible image format (VHDX).
Supported options:
</p><dl compact="compact">
<dt><code>subformat</code></dt>
<dd><p>Specifies which VHDX subformat to use. Valid options are
<code>dynamic</code> (default) and <code>fixed</code>.
</p></dd>
<dt><code>block_state_zero</code></dt>
<dd><p>Force use of payload blocks of type &rsquo;ZERO&rsquo;. Can be set to <code>on</code> (default)
or <code>off</code>. When set to <code>off</code>, new blocks will be created as
<code>PAYLOAD_BLOCK_NOT_PRESENT</code>, which means parsers are free to return
arbitrary data for those blocks. Do not set to <code>off</code> when using
<code>qemu-img convert</code> with <code>subformat=dynamic</code>.
</p></dd>
<dt><code>block_size</code></dt>
<dd><p>Block size; min 1 MB, max 256 MB. 0 means auto-calculate based on image size.
</p></dd>
<dt><code>log_size</code></dt>
<dd><p>Log size; min 1 MB.
</p></dd>
</dl>
</dd>
</dl>
<a name="Read_002donly-formats"></a>
<h4 class="subsubsection">2.7.6.1 Read-only formats</h4>
<p>More disk image file formats are supported in a read-only mode.
</p><dl compact="compact">
<dt><samp>bochs</samp></dt>
<dd><p>Bochs images of <code>growing</code> type.
</p></dd>
<dt><samp>cloop</samp></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>
<dt><samp>dmg</samp></dt>
<dd><p>Apple disk image.
</p></dd>
<dt><samp>parallels</samp></dt>
<dd><p>Parallels disk image format.
</p></dd>
</dl>
<hr>
<a name="host_005fdrives"></a>
<a name="Using-host-drives"></a>
<h4 class="subsection">2.7.7 Using host drives</h4>
<p>In addition to disk image files, QEMU can directly access host
devices. We describe here the usage for QEMU version &gt;= 0.8.3.
</p>
<a name="Linux"></a>
<h4 class="subsubsection">2.7.7.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 <samp>/dev/cdrom</samp> to access to the CDROM.
</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).
Use of the host&rsquo;s floppy device is deprecated, and support for it will
be removed in a future release.
</p></dd>
<dt><code>Hard disks</code></dt>
<dd><p>Hard disks can be used. Normally you must specify the whole disk
(<samp>/dev/hdb</samp> instead of <samp>/dev/hdb1</samp>) so that the guest OS can
see it as a partitioned disk. WARNING: unless you know what you do, it
is better to only make READ-ONLY accesses to the hard disk otherwise
you may corrupt your host data (use the <samp>-snapshot</samp> command
line option or modify the device permissions accordingly).
</p></dd>
</dl>
<a name="Windows"></a>
<h4 class="subsubsection">2.7.7.2 Windows</h4>
<dl compact="compact">
<dt><code>CD</code></dt>
<dd><p>The preferred syntax is the drive letter (e.g. <samp>d:</samp>). The
alternate syntax <samp>\\.\d:</samp> is supported. <samp>/dev/cdrom</samp> 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: <samp>\\.\PhysicalDrive<var>N</var></samp>
where <var>N</var> is the drive number (0 is the first hard disk).
<samp>/dev/hda</samp> is supported as an alias to
the first hard disk drive <samp>\\.\PhysicalDrive0</samp>.
</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 <samp>-snapshot</samp> command line so that the
modifications are written in a temporary file).
</p></dd>
</dl>
<a name="Mac-OS-X"></a>
<h4 class="subsubsection">2.7.7.3 Mac OS X</h4>
<p><samp>/dev/cdrom</samp> 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>
<a name="disk_005fimages_005ffat_005fimages"></a>
<a name="Virtual-FAT-disk-images"></a>
<h4 class="subsection">2.7.8 Virtual FAT disk images</h4>
<p>QEMU can automatically create a virtual FAT disk image from a
directory tree. In order to use it, just type:
</p>
<div class="example">
<pre class="example">qemu-system-i386 linux.img -hdb fat:/my_directory
</pre></div>
<p>Then you access access to all the files in the <samp>/my_directory</samp>
directory without having to copy them in a disk image or to export
them via SAMBA or NFS. The default access is <em>read-only</em>.
</p>
<p>Floppies can be emulated with the <code>:floppy:</code> option:
</p>
<div class="example">
<pre class="example">qemu-system-i386 linux.img -fda fat:floppy:/my_directory
</pre></div>
<p>A read/write support is available for testing (beta stage) with the
<code>:rw:</code> option:
</p>
<div class="example">
<pre class="example">qemu-system-i386 linux.img -fda fat:floppy:rw:/my_directory
</pre></div>
<p>What you should <em>never</em> do:
</p><ul>
<li> use non-ASCII filenames ;
</li><li> use &quot;-snapshot&quot; together with &quot;:rw:&quot; ;
</li><li> expect it to work when loadvm&rsquo;ing ;
</li><li> write to the FAT directory on the host system while accessing it with the guest system.
</li></ul>
<hr>
<a name="disk_005fimages_005fnbd"></a>
<a name="NBD-access"></a>
<h4 class="subsection">2.7.9 NBD access</h4>
<p>QEMU can access directly to block device exported using the Network Block Device
protocol.
</p>
<div class="example">
<pre class="example">qemu-system-i386 linux.img -hdb nbd://my_nbd_server.mydomain.org:1024/
</pre></div>
<p>If the NBD server is located on the same host, you can use an unix socket instead
of an inet socket:
</p>
<div class="example">
<pre class="example">qemu-system-i386 linux.img -hdb nbd+unix://?socket=/tmp/my_socket
</pre></div>
<p>In this case, the block device must be exported using qemu-nbd:
</p>
<div class="example">
<pre class="example">qemu-nbd --socket=/tmp/my_socket my_disk.qcow2
</pre></div>
<p>The use of qemu-nbd allows sharing of a disk between several guests:
</p><div class="example">
<pre class="example">qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
</pre></div>
<p>and then you can use it with two guests:
</p><div class="example">
<pre class="example">qemu-system-i386 linux1.img -hdb nbd+unix://?socket=/tmp/my_socket
qemu-system-i386 linux2.img -hdb nbd+unix://?socket=/tmp/my_socket
</pre></div>
<p>If the nbd-server uses named exports (supported since NBD 2.9.18, or with QEMU&rsquo;s
own embedded NBD server), you must specify an export name in the URI:
</p><div class="example">
<pre class="example">qemu-system-i386 -cdrom nbd://localhost/debian-500-ppc-netinst
qemu-system-i386 -cdrom nbd://localhost/openSUSE-11.1-ppc-netinst
</pre></div>
<p>The URI syntax for NBD is supported since QEMU 1.3. An alternative syntax is
also available. Here are some example of the older syntax:
</p><div class="example">
<pre class="example">qemu-system-i386 linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
qemu-system-i386 linux2.img -hdb nbd:unix:/tmp/my_socket
qemu-system-i386 -cdrom nbd:localhost:10809:exportname=debian-500-ppc-netinst
</pre></div>
<hr>
<a name="disk_005fimages_005fsheepdog"></a>
<a name="Sheepdog-disk-images"></a>
<h4 class="subsection">2.7.10 Sheepdog disk images</h4>
<p>Sheepdog is a distributed storage system for QEMU. It provides highly
available block level storage volumes that can be attached to
QEMU-based virtual machines.
</p>
<p>You can create a Sheepdog disk image with the command:
</p><div class="example">
<pre class="example">qemu-img create sheepdog:///<var>image</var> <var>size</var>
</pre></div>
<p>where <var>image</var> is the Sheepdog image name and <var>size</var> is its
size.
</p>
<p>To import the existing <var>filename</var> to Sheepdog, you can use a
convert command.
</p><div class="example">
<pre class="example">qemu-img convert <var>filename</var> sheepdog:///<var>image</var>
</pre></div>
<p>You can boot from the Sheepdog disk image with the command:
</p><div class="example">
<pre class="example">qemu-system-i386 sheepdog:///<var>image</var>
</pre></div>
<p>You can also create a snapshot of the Sheepdog image like qcow2.
</p><div class="example">
<pre class="example">qemu-img snapshot -c <var>tag</var> sheepdog:///<var>image</var>
</pre></div>
<p>where <var>tag</var> is a tag name of the newly created snapshot.
</p>
<p>To boot from the Sheepdog snapshot, specify the tag name of the
snapshot.
</p><div class="example">
<pre class="example">qemu-system-i386 sheepdog:///<var>image</var>#<var>tag</var>
</pre></div>
<p>You can create a cloned image from the existing snapshot.
</p><div class="example">
<pre class="example">qemu-img create -b sheepdog:///<var>base</var>#<var>tag</var> sheepdog:///<var>image</var>
</pre></div>
<p>where <var>base</var> is an image name of the source snapshot and <var>tag</var>
is its tag name.
</p>
<p>You can use an unix socket instead of an inet socket:
</p>
<div class="example">
<pre class="example">qemu-system-i386 sheepdog+unix:///<var>image</var>?socket=<var>path</var>
</pre></div>
<p>If the Sheepdog daemon doesn&rsquo;t run on the local host, you need to
specify one of the Sheepdog servers to connect to.
</p><div class="example">
<pre class="example">qemu-img create sheepdog://<var>hostname</var>:<var>port</var>/<var>image</var> <var>size</var>
qemu-system-i386 sheepdog://<var>hostname</var>:<var>port</var>/<var>image</var>
</pre></div>
<hr>
<a name="disk_005fimages_005fiscsi"></a>
<a name="iSCSI-LUNs"></a>
<h4 class="subsection">2.7.11 iSCSI LUNs</h4>
<p>iSCSI is a popular protocol used to access SCSI devices across a computer
network.
</p>
<p>There are two different ways iSCSI devices can be used by QEMU.
</p>
<p>The first method is to mount the iSCSI LUN on the host, and make it appear as
any other ordinary SCSI device on the host and then to access this device as a
/dev/sd device from QEMU. How to do this differs between host OSes.
</p>
<p>The second method involves using the iSCSI initiator that is built into
QEMU. This provides a mechanism that works the same way regardless of which
host OS you are running QEMU on. This section will describe this second method
of using iSCSI together with QEMU.
</p>
<p>In QEMU, iSCSI devices are described using special iSCSI URLs
</p>
<div class="example">
<pre class="example">URL syntax:
iscsi://[&lt;username&gt;[%&lt;password&gt;]@]&lt;host&gt;[:&lt;port&gt;]/&lt;target-iqn-name&gt;/&lt;lun&gt;
</pre></div>
<p>Username and password are optional and only used if your target is set up
using CHAP authentication for access control.
Alternatively the username and password can also be set via environment
variables to have these not show up in the process list
</p>
<div class="example">
<pre class="example">export LIBISCSI_CHAP_USERNAME=&lt;username&gt;
export LIBISCSI_CHAP_PASSWORD=&lt;password&gt;
iscsi://&lt;host&gt;/&lt;target-iqn-name&gt;/&lt;lun&gt;
</pre></div>
<p>Various session related parameters can be set via special options, either
in a configuration file provided via &rsquo;-readconfig&rsquo; or directly on the
command line.
</p>
<p>If the initiator-name is not specified qemu will use a default name
of &rsquo;iqn.2008-11.org.linux-kvm[:&lt;uuid&gt;&rsquo;] where &lt;uuid&gt; is the UUID of the
virtual machine. If the UUID is not specified qemu will use
&rsquo;iqn.2008-11.org.linux-kvm[:&lt;name&gt;&rsquo;] where &lt;name&gt; is the name of the
virtual machine.
</p>
<div class="example">
<pre class="example">Setting a specific initiator name to use when logging in to the target
-iscsi initiator-name=iqn.qemu.test:my-initiator
</pre></div>
<div class="example">
<pre class="example">Controlling which type of header digest to negotiate with the target
-iscsi header-digest=CRC32C|CRC32C-NONE|NONE-CRC32C|NONE
</pre></div>
<p>These can also be set via a configuration file
</p><div class="example">
<pre class="example">[iscsi]
user = &quot;CHAP username&quot;
password = &quot;CHAP password&quot;
initiator-name = &quot;iqn.qemu.test:my-initiator&quot;
# header digest is one of CRC32C|CRC32C-NONE|NONE-CRC32C|NONE
header-digest = &quot;CRC32C&quot;
</pre></div>
<p>Setting the target name allows different options for different targets
</p><div class="example">
<pre class="example">[iscsi &quot;iqn.target.name&quot;]
user = &quot;CHAP username&quot;
password = &quot;CHAP password&quot;
initiator-name = &quot;iqn.qemu.test:my-initiator&quot;
# header digest is one of CRC32C|CRC32C-NONE|NONE-CRC32C|NONE
header-digest = &quot;CRC32C&quot;
</pre></div>
<p>Howto use a configuration file to set iSCSI configuration options:
</p><div class="example">
<pre class="example">cat &gt;iscsi.conf &lt;&lt;EOF
[iscsi]
user = &quot;me&quot;
password = &quot;my password&quot;
initiator-name = &quot;iqn.qemu.test:my-initiator&quot;
header-digest = &quot;CRC32C&quot;
EOF
qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
-readconfig iscsi.conf
</pre></div>
<p>Howto set up a simple iSCSI target on loopback and accessing it via QEMU:
</p><div class="example">
<pre class="example">This example shows how to set up an iSCSI target with one CDROM and one DISK
using the Linux STGT software target. This target is available on Red Hat based
systems as the package 'scsi-target-utils'.
tgtd --iscsi portal=127.0.0.1:3260
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.qemu.test
tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 \
-b /IMAGES/disk.img --device-type=disk
tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 2 \
-b /IMAGES/cd.iso --device-type=cd
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
qemu-system-i386 -iscsi initiator-name=iqn.qemu.test:my-initiator \
-boot d -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
-cdrom iscsi://127.0.0.1/iqn.qemu.test/2
</pre></div>
<hr>
<a name="disk_005fimages_005fgluster"></a>
<a name="GlusterFS-disk-images"></a>
<h4 class="subsection">2.7.12 GlusterFS disk images</h4>
<p>GlusterFS is a user space distributed file system.
</p>
<p>You can boot from the GlusterFS disk image with the command:
</p><div class="example">
<pre class="example">URI:
qemu-system-x86_64 -drive file=gluster[+<var>type</var>]://[<var>host</var>[:<var>port</var>]]/<var>volume</var>/<var>path</var>
[?socket=...][,file.debug=9][,file.logfile=...]
JSON:
qemu-system-x86_64 'json:{&quot;driver&quot;:&quot;qcow2&quot;,
&quot;file&quot;:{&quot;driver&quot;:&quot;gluster&quot;,
&quot;volume&quot;:&quot;testvol&quot;,&quot;path&quot;:&quot;a.img&quot;,&quot;debug&quot;:9,&quot;logfile&quot;:&quot;...&quot;,
&quot;server&quot;:[{&quot;type&quot;:&quot;tcp&quot;,&quot;host&quot;:&quot;...&quot;,&quot;port&quot;:&quot;...&quot;},
{&quot;type&quot;:&quot;unix&quot;,&quot;socket&quot;:&quot;...&quot;}]}}'
</pre></div>
<p><var>gluster</var> is the protocol.
</p>
<p><var>type</var> specifies the transport type used to connect to gluster
management daemon (glusterd). Valid transport types are
tcp and unix. In the URI form, if a transport type isn&rsquo;t specified,
then tcp type is assumed.
</p>
<p><var>host</var> specifies the server where the volume file specification for
the given volume resides. This can be either a hostname or an ipv4 address.
If transport type is unix, then <var>host</var> field should not be specified.
Instead <var>socket</var> field needs to be populated with the path to unix domain
socket.
</p>
<p><var>port</var> is the port number on which glusterd is listening. This is optional
and if not specified, it defaults to port 24007. If the transport type is unix,
then <var>port</var> should not be specified.
</p>
<p><var>volume</var> is the name of the gluster volume which contains the disk image.
</p>
<p><var>path</var> is the path to the actual disk image that resides on gluster volume.
</p>
<p><var>debug</var> is the logging level of the gluster protocol driver. Debug levels
are 0-9, with 9 being the most verbose, and 0 representing no debugging output.
The default level is 4. The current logging levels defined in the gluster source
are 0 - None, 1 - Emergency, 2 - Alert, 3 - Critical, 4 - Error, 5 - Warning,
6 - Notice, 7 - Info, 8 - Debug, 9 - Trace
</p>
<p><var>logfile</var> is a commandline option to mention log file path which helps in
logging to the specified file and also help in persisting the gfapi logs. The
default is stderr.
</p>
<p>You can create a GlusterFS disk image with the command:
</p><div class="example">
<pre class="example">qemu-img create gluster://<var>host</var>/<var>volume</var>/<var>path</var> <var>size</var>
</pre></div>
<p>Examples
</p><div class="example">
<pre class="example">qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img
qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4/testvol/a.img
qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img
qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img
qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img
qemu-system-x86_64 -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img
qemu-system-x86_64 -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket
qemu-system-x86_64 -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img
qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img,file.debug=9,file.logfile=/var/log/qemu-gluster.log
qemu-system-x86_64 'json:{&quot;driver&quot;:&quot;qcow2&quot;,
&quot;file&quot;:{&quot;driver&quot;:&quot;gluster&quot;,
&quot;volume&quot;:&quot;testvol&quot;,&quot;path&quot;:&quot;a.img&quot;,
&quot;debug&quot;:9,&quot;logfile&quot;:&quot;/var/log/qemu-gluster.log&quot;,
&quot;server&quot;:[{&quot;type&quot;:&quot;tcp&quot;,&quot;host&quot;:&quot;1.2.3.4&quot;,&quot;port&quot;:24007},
{&quot;type&quot;:&quot;unix&quot;,&quot;socket&quot;:&quot;/var/run/glusterd.socket&quot;}]}}'
qemu-system-x86_64 -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.img,
file.debug=9,file.logfile=/var/log/qemu-gluster.log,
file.server.0.type=tcp,file.server.0.host=1.2.3.4,file.server.0.port=24007,
file.server.1.type=unix,file.server.1.socket=/var/run/glusterd.socket
</pre></div>
<hr>
<a name="disk_005fimages_005fssh"></a>
<a name="Secure-Shell-_0028ssh_0029-disk-images"></a>
<h4 class="subsection">2.7.13 Secure Shell (ssh) disk images</h4>
<p>You can access disk images located on a remote ssh server
by using the ssh protocol:
</p>
<div class="example">
<pre class="example">qemu-system-x86_64 -drive file=ssh://[<var>user</var>@]<var>server</var>[:<var>port</var>]/<var>path</var>[?host_key_check=<var>host_key_check</var>]
</pre></div>
<p>Alternative syntax using properties:
</p>
<div class="example">
<pre class="example">qemu-system-x86_64 -drive file.driver=ssh[,file.user=<var>user</var>],file.host=<var>server</var>[,file.port=<var>port</var>],file.path=<var>path</var>[,file.host_key_check=<var>host_key_check</var>]
</pre></div>
<p><var>ssh</var> is the protocol.
</p>
<p><var>user</var> is the remote user. If not specified, then the local
username is tried.
</p>
<p><var>server</var> specifies the remote ssh server. Any ssh server can be
used, but it must implement the sftp-server protocol. Most Unix/Linux
systems should work without requiring any extra configuration.
</p>
<p><var>port</var> is the port number on which sshd is listening. By default
the standard ssh port (22) is used.
</p>
<p><var>path</var> is the path to the disk image.
</p>
<p>The optional <var>host_key_check</var> parameter controls how the remote
host&rsquo;s key is checked. The default is <code>yes</code> which means to use
the local <samp>.ssh/known_hosts</samp> file. Setting this to <code>no</code>
turns off known-hosts checking. Or you can check that the host key
matches a specific fingerprint:
<code>host_key_check=md5:78:45:8e:14:57:4f:d5:45:83:0a:0e:f3:49:82:c9:c8</code>
(<code>sha1:</code> can also be used as a prefix, but note that OpenSSH
tools only use MD5 to print fingerprints).
</p>
<p>Currently authentication must be done using ssh-agent. Other
authentication methods may be supported in future.
</p>
<p>Note: Many ssh servers do not support an <code>fsync</code>-style operation.
The ssh driver cannot guarantee that disk flush requests are
obeyed, and this causes a risk of disk corruption if the remote
server or network goes down during writes. The driver will
print a warning when <code>fsync</code> is not supported:
</p>
<p>warning: ssh server <code>ssh.example.com:22</code> does not support fsync
</p>
<p>With sufficiently new versions of libssh2 and OpenSSH, <code>fsync</code> is
supported.
</p>
<hr>
<a name="disk_005fimages_005fnvme"></a>
<a name="NVMe-disk-images"></a>
<h4 class="subsection">2.7.14 NVMe disk images</h4>
<p>NVM Express (NVMe) storage controllers can be accessed directly by a userspace
driver in QEMU. This bypasses the host kernel file system and block layers
while retaining QEMU block layer functionalities, such as block jobs, I/O
throttling, image formats, etc. Disk I/O performance is typically higher than
with <code>-drive file=/dev/sda</code> using either thread pool or linux-aio.
</p>
<p>The controller will be exclusively used by the QEMU process once started. To be
able to share storage between multiple VMs and other applications on the host,
please use the file based protocols.
</p>
<p>Before starting QEMU, bind the host NVMe controller to the host vfio-pci
driver. For example:
</p>
<div class="example">
<pre class="example"># modprobe vfio-pci
# lspci -n -s 0000:06:0d.0
06:0d.0 0401: 1102:0002 (rev 08)
# echo 0000:06:0d.0 &gt; /sys/bus/pci/devices/0000:06:0d.0/driver/unbind
# echo 1102 0002 &gt; /sys/bus/pci/drivers/vfio-pci/new_id
# qemu-system-x86_64 -drive file=nvme://<var>host</var>:<var>bus</var>:<var>slot</var>.<var>func</var>/<var>namespace</var>
</pre></div>
<p>Alternative syntax using properties:
</p>
<div class="example">
<pre class="example">qemu-system-x86_64 -drive file.driver=nvme,file.device=<var>host</var>:<var>bus</var>:<var>slot</var>.<var>func</var>,file.namespace=<var>namespace</var>
</pre></div>
<p><var>host</var>:<var>bus</var>:<var>slot</var>.<var>func</var> is the NVMe controller&rsquo;s PCI device
address on the host.
</p>
<p><var>namespace</var> is the NVMe namespace number, starting from 1.
</p>
<hr>
<a name="disk_005fimage_005flocking"></a>
<a name="Disk-image-file-locking"></a>
<h4 class="subsection">2.7.15 Disk image file locking</h4>
<p>By default, QEMU tries to protect image files from unexpected concurrent
access, as long as it&rsquo;s supported by the block protocol driver and host
operating system. If multiple QEMU processes (including QEMU emulators and
utilities) try to open the same image with conflicting accessing modes, all but
the first one will get an error.
</p>
<p>This feature is currently supported by the file protocol on Linux with the Open
File Descriptor (OFD) locking API, and can be configured to fall back to POSIX
locking if the POSIX host doesn&rsquo;t support Linux OFD locking.
</p>
<p>To explicitly enable image locking, specify &quot;locking=on&quot; in the file protocol
driver options. If OFD locking is not possible, a warning will be printed and
the POSIX locking API will be used. In this case there is a risk that the lock
will get silently lost when doing hot plugging and block jobs, due to the
shortcomings of the POSIX locking API.
</p>
<p>QEMU transparently handles lock handover during shared storage migration. For
shared virtual disk images between multiple VMs, the &quot;share-rw&quot; device option
should be used.
</p>
<p>By default, the guest has exclusive write access to its disk image. If the
guest can safely share the disk image with other writers the <code>-device
...,share-rw=on</code> parameter can be used. This is only safe if the guest is
running software, such as a cluster file system, that coordinates disk accesses
to avoid corruption.
</p>
<p>Note that share-rw=on only declares the guest&rsquo;s ability to share the disk.
Some QEMU features, such as image file formats, require exclusive write access
to the disk image and this is unaffected by the share-rw=on option.
</p>
<p>Alternatively, locking can be fully disabled by &quot;locking=off&quot; block device
option. In the command line, the option is usually in the form of
&quot;file.locking=off&quot; as the protocol driver is normally placed as a &quot;file&quot; child
under a format driver. For example:
</p>
<p><code>-blockdev driver=qcow2,file.filename=/path/to/image,file.locking=off,file.driver=file</code>
</p>
<p>To check if image locking is active, check the output of the &quot;lslocks&quot; command
on host and see if there are locks held by the QEMU process on the image file.
More than one byte could be locked by the QEMU instance, each byte of which
reflects a particular permission that is acquired or protected by the running
block driver.
</p>
<hr>
<a name="pcsys_005fnetwork"></a>
<a name="Network-emulation"></a>
<h3 class="section">2.8 Network emulation</h3>
<p>QEMU can simulate several network cards (e.g. PCI or ISA cards on the PC
target) and can connect them to a network backend on the host or an emulated
hub. The various host network backends can either be used to connect the NIC of
the guest to a real network (e.g. by using a TAP devices or the non-privileged
user mode network stack), or to other guest instances running in another QEMU
process (e.g. by using the socket host network backend).
</p>
<a name="Using-TAP-network-interfaces"></a>
<h4 class="subsection">2.8.1 Using TAP network interfaces</h4>
<p>This is the standard way to connect QEMU to a real network. QEMU adds
a virtual network device on your host (called <code>tapN</code>), and you
can then configure it as if it was a real ethernet card.
</p>
<a name="Linux-host"></a>
<h4 class="subsubsection">2.8.1.1 Linux host</h4>
<p>As an example, you can download the <samp>linux-test-xxx.tar.gz</samp>
archive and copy the script <samp>qemu-ifup</samp> in <samp>/etc</samp> and
configure properly <code>sudo</code> so that the command <code>ifconfig</code>
contained in <samp>qemu-ifup</samp> can be executed as root. You must verify
that your host kernel supports the TAP network interfaces: the
device <samp>/dev/net/tun</samp> must be present.
</p>
<p>See <a href="#sec_005finvocation">sec_invocation</a> to have examples of command lines using the
TAP network interfaces.
</p>
<a name="Windows-host"></a>
<h4 class="subsubsection">2.8.1.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="https://openvpn.net/">https://openvpn.net/</a>.
</p>
<a name="Using-the-user-mode-network-stack"></a>
<h4 class="subsection">2.8.2 Using the user mode network stack</h4>
<p>By using the option <samp>-net user</samp> (default configuration if no
<samp>-net</samp> option is specified), QEMU uses a completely user mode
network stack (you don&rsquo;t need root privilege to use the virtual
network). The virtual network configuration is the following:
</p>
<div class="example">
<pre class="example">
guest (10.0.2.15) &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></div>
<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 ICMP traffic in general does not work with user mode networking.
<code>ping</code>, aka. ICMP echo, to the local router (10.0.2.2) shall work,
however. If you&rsquo;re using QEMU on Linux &gt;= 3.0, it can use unprivileged ICMP
ping sockets to allow <code>ping</code> to the Internet. The host admin has to set
the ping_group_range in order to grant access to those sockets. To allow ping
for GID 100 (usually users group):
</p>
<div class="example">
<pre class="example">echo 100 100 &gt; /proc/sys/net/ipv4/ping_group_range
</pre></div>
<p>When using the built-in TFTP server, the router is also the TFTP
server.
</p>
<p>When using the <samp>'-netdev user,hostfwd=...'</samp> option, TCP or UDP
connections can be redirected from the host to the guest. It allows for
example to redirect X11, telnet or SSH connections.
</p>
<a name="Hubs"></a>
<h4 class="subsection">2.8.3 Hubs</h4>
<p>QEMU can simulate several hubs. A hub can be thought of 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). You can connect
guest NICs or host network backends to such a hub using the <samp>-netdev
hubport</samp> or <samp>-nic hubport</samp> options. The legacy <samp>-net</samp> option
also connects the given device to the emulated hub with ID 0 (i.e. the default
hub) unless you specify a netdev with <samp>-net nic,netdev=xxx</samp> here.
</p>
<a name="Connecting-emulated-networks-between-QEMU-instances"></a>
<h4 class="subsection">2.8.4 Connecting emulated networks between QEMU instances</h4>
<p>Using the <samp>-netdev socket</samp> (or <samp>-nic socket</samp> or
<samp>-net socket</samp>) option, it is possible to create emulated
networks that span several QEMU instances.
See the description of the <samp>-netdev socket</samp> option in the
<a href="#sec_005finvocation">Invocation chapter</a> to have a basic example.
</p>
<hr>
<a name="pcsys_005fother_005fdevs"></a>
<a name="Other-Devices"></a>
<h3 class="section">2.9 Other Devices</h3>
<a name="Inter_002dVM-Shared-Memory-device"></a>
<h4 class="subsection">2.9.1 Inter-VM Shared Memory device</h4>
<p>On Linux hosts, a shared memory device is available. The basic syntax
is:
</p>
<div class="example">
<pre class="example">qemu-system-x86_64 -device ivshmem-plain,memdev=<var>hostmem</var>
</pre></div>
<p>where <var>hostmem</var> names a host memory backend. For a POSIX shared
memory backend, use something like
</p>
<div class="example">
<pre class="example">-object memory-backend-file,size=1M,share,mem-path=/dev/shm/ivshmem,id=<var>hostmem</var>
</pre></div>
<p>If desired, interrupts can be sent between guest VMs accessing the same shared
memory region. Interrupt support requires using a shared memory server and
using a chardev socket to connect to it. The code for the shared memory server
is qemu.git/contrib/ivshmem-server. An example syntax when using the shared
memory server is:
</p>
<div class="example">
<pre class="example"># First start the ivshmem server once and for all
ivshmem-server -p <var>pidfile</var> -S <var>path</var> -m <var>shm-name</var> -l <var>shm-size</var> -n <var>vectors</var>
# Then start your qemu instances with matching arguments
qemu-system-x86_64 -device ivshmem-doorbell,vectors=<var>vectors</var>,chardev=<var>id</var>
-chardev socket,path=<var>path</var>,id=<var>id</var>
</pre></div>
<p>When using the server, the guest will be assigned a VM ID (&gt;=0) that allows guests
using the same server to communicate via interrupts. Guests can read their
VM ID from a device register (see ivshmem-spec.txt).
</p>
<a name="Migration-with-ivshmem"></a>
<h4 class="subsubsection">2.9.1.1 Migration with ivshmem</h4>
<p>With device property <samp>master=on</samp>, the guest will copy the shared
memory on migration to the destination host. With <samp>master=off</samp>,
the guest will not be able to migrate with the device attached. In the
latter case, the device should be detached and then reattached after
migration using the PCI hotplug support.
</p>
<p>At most one of the devices sharing the same memory can be master. The
master must complete migration before you plug back the other devices.
</p>
<a name="ivshmem-and-hugepages"></a>
<h4 class="subsubsection">2.9.1.2 ivshmem and hugepages</h4>
<p>Instead of specifying the &lt;shm size&gt; using POSIX shm, you may specify
a memory backend that has hugepage support:
</p>
<div class="example">
<pre class="example">qemu-system-x86_64 -object memory-backend-file,size=1G,mem-path=/dev/hugepages/my-shmem-file,share,id=mb1
-device ivshmem-plain,memdev=mb1
</pre></div>
<p>ivshmem-server also supports hugepages mount points with the
<samp>-m</samp> memory path argument.
</p>
<hr>
<a name="direct_005flinux_005fboot"></a>
<a name="Direct-Linux-Boot"></a>
<h3 class="section">2.10 Direct Linux Boot</h3>
<p>This section explains how to launch a Linux kernel inside QEMU without
having to make a full bootable image. It is very useful for fast Linux
kernel testing.
</p>
<p>The syntax is:
</p><div class="example">
<pre class="example">qemu-system-i386 -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append &quot;root=/dev/hda&quot;
</pre></div>
<p>Use <samp>-kernel</samp> to provide the Linux kernel image and
<samp>-append</samp> to give the kernel command line arguments. The
<samp>-initrd</samp> 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
<samp>hda</samp> 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
<samp>-nographic</samp> option. The typical command line is:
</p><div class="example">
<pre class="example">qemu-system-i386 -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
-append &quot;root=/dev/hda console=ttyS0&quot; -nographic
</pre></div>
<p>Use <tt class="key">Ctrl-a c</tt> to switch between the serial console and the
monitor (see <a href="#pcsys_005fkeys">pcsys_keys</a>).
</p>
<hr>
<a name="pcsys_005fusb"></a>
<a name="USB-emulation"></a>
<h3 class="section">2.11 USB emulation</h3>
<p>QEMU can emulate a PCI UHCI, OHCI, EHCI or XHCI USB controller. You can
plug virtual USB devices or real host USB devices (only works with certain
host operating systems). QEMU will automatically create and connect virtual
USB hubs as necessary to connect multiple USB devices.
</p>
<hr>
<a name="usb_005fdevices"></a>
<a name="Connecting-USB-devices"></a>
<h4 class="subsection">2.11.1 Connecting USB devices</h4>
<p>USB devices can be connected with the <samp>-device usb-...</samp> command line
option or the <code>device_add</code> monitor command. Available devices are:
</p>
<dl compact="compact">
<dt><code>usb-mouse</code></dt>
<dd><p>Virtual Mouse. This will override the PS/2 mouse emulation when activated.
</p></dd>
<dt><code>usb-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>usb-storage,drive=<var>drive_id</var></code></dt>
<dd><p>Mass storage device backed by <var>drive_id</var> (see <a href="#disk_005fimages">disk_images</a>)
</p></dd>
<dt><code>usb-uas</code></dt>
<dd><p>USB attached SCSI device, see
<a href="https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/usb-storage.txt">usb-storage.txt</a>
for details
</p></dd>
<dt><code>usb-bot</code></dt>
<dd><p>Bulk-only transport storage device, see
<a href="https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/usb-storage.txt">usb-storage.txt</a>
for details here, too
</p></dd>
<dt><code>usb-mtp,x-root=<var>dir</var></code></dt>
<dd><p>Media transfer protocol device, using <var>dir</var> as root of the file tree
that is presented to the guest.
</p></dd>
<dt><code>usb-host,hostbus=<var>bus</var>,hostaddr=<var>addr</var></code></dt>
<dd><p>Pass through the host device identified by <var>bus</var> and <var>addr</var>
</p></dd>
<dt><code>usb-host,vendorid=<var>vendor</var>,productid=<var>product</var></code></dt>
<dd><p>Pass through the host device identified by <var>vendor</var> and <var>product</var> ID
</p></dd>
<dt><code>usb-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>usb-kbd</code></dt>
<dd><p>Standard USB keyboard. Will override the PS/2 keyboard (if present).
</p></dd>
<dt><code>usb-serial,chardev=<var>id</var></code></dt>
<dd><p>Serial converter. This emulates an FTDI FT232BM chip connected to host character
device <var>id</var>.
</p></dd>
<dt><code>usb-braille,chardev=<var>id</var></code></dt>
<dd><p>Braille device. This will use BrlAPI to display the braille output on a real
or fake device referenced by <var>id</var>.
</p></dd>
<dt><code>usb-net[,netdev=<var>id</var>]</code></dt>
<dd><p>Network adapter that supports CDC ethernet and RNDIS protocols. <var>id</var>
specifies a netdev defined with <code>-netdev &hellip;,id=<var>id</var></code>.
For instance, user-mode networking can be used with
</p><div class="example">
<pre class="example">qemu-system-i386 [...] -netdev user,id=net0 -device usb-net,netdev=net0
</pre></div>
</dd>
<dt><code>usb-ccid</code></dt>
<dd><p>Smartcard reader device
</p></dd>
<dt><code>usb-audio</code></dt>
<dd><p>USB audio device
</p></dd>
<dt><code>usb-bt-dongle</code></dt>
<dd><p>Bluetooth dongle for the transport layer of HCI. It is connected to HCI
scatternet 0 by default (corresponds to <code>-bt hci,vlan=0</code>).
Note that the syntax for the <code>-device usb-bt-dongle</code> option is not as
useful yet as it was with the legacy <code>-usbdevice</code> option. So to
configure an USB bluetooth device, you might need to use
&quot;<code>-usbdevice bt</code>[:<var>hci-type</var>]&quot; instead. This configures a
bluetooth dongle whose type is specified in the same format as with
the <samp>-bt hci</samp> option, see <a href="#bt_002dhcis">allowed HCI types</a>. If
no type is given, the HCI logic corresponds to <code>-bt hci,vlan=0</code>.
This USB device implements the USB Transport Layer of HCI. Example
usage:
</p><div class="example">
<pre class="example"><code>qemu-system-i386</code> [...<var>OPTIONS</var>...] <samp>-usbdevice</samp> bt:hci,vlan=3 <samp>-bt</samp> device:keyboard,vlan=3
</pre></div>
</dd>
</dl>
<hr>
<a name="host_005fusb_005fdevices"></a>
<a name="Using-host-USB-devices-on-a-Linux-host"></a>
<h4 class="subsection">2.11.2 Using host USB devices on a Linux host</h4>
<p>WARNING: this is an experimental feature. QEMU will slow down when
using it. USB devices requiring real time streaming (i.e. USB Video
Cameras) are not supported yet.
</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 <samp>mydriver.o</samp>
to <samp>mydriver.o.disabled</samp>.
</li><li> Verify that <samp>/proc/bus/usb</samp> is working (most Linux distributions should enable it by default). You should see something like that:
<div class="example">
<pre class="example">ls /proc/bus/usb
001 devices drivers
</pre></div>
</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:
<div class="example">
<pre class="example">chown -R myuid /proc/bus/usb
</pre></div>
</li><li> Launch QEMU and do in the monitor:
<div class="example">
<pre class="example">info usbhost
Device 1.2, speed 480 Mb/s
Class 00: USB device 1234:5678, USB DISK
</pre></div>
<p>You should see the list of the devices you can use (Never try to use
hubs, it won&rsquo;t work).
</p>
</li><li> Add the device in QEMU by using:
<div class="example">
<pre class="example">device_add usb-host,vendorid=0x1234,productid=0x5678
</pre></div>
<p>Normally the guest OS should report that a new USB device is plugged.
You can use the option <samp>-device usb-host,...</samp> 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>
<a name="vnc_005fsecurity"></a>
<a name="VNC-security"></a>
<h3 class="section">2.12 VNC security</h3>
<p>The VNC server capability provides access to the graphical console
of the guest VM across the network. This has a number of security
considerations depending on the deployment scenarios.
</p>
<hr>
<a name="vnc_005fsec_005fnone"></a>
<a name="Without-passwords"></a>
<h4 class="subsection">2.12.1 Without passwords</h4>
<p>The simplest VNC server setup does not include any form of authentication.
For this setup it is recommended to restrict it to listen on a UNIX domain
socket only. For example
</p>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
</pre></div>
<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>
<a name="vnc_005fsec_005fpassword"></a>
<a name="With-passwords"></a>
<h4 class="subsection">2.12.2 With passwords</h4>
<p>The VNC protocol has limited support for password based authentication. Since
the protocol limits passwords to 8 characters it should not be considered
to provide high security. The password can be fairly easily brute-forced by
a client making repeat connections. For this reason, a VNC server using password
authentication should be restricted to only listen on the loopback interface
or UNIX domain sockets. Password authentication is not supported when operating
in FIPS 140-2 compliance mode as it requires the use of the DES cipher. 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>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -vnc :1,password -monitor stdio
(qemu) change vnc password
Password: ********
(qemu)
</pre></div>
<hr>
<a name="vnc_005fsec_005fcertificate"></a>
<a name="With-x509-certificates"></a>
<h4 class="subsection">2.12.3 With x509 certificates</h4>
<p>The QEMU VNC server also implements the VeNCrypt extension allowing use of
TLS for encryption of the session, and x509 certificates for authentication.
The use of x509 certificates is strongly recommended, because TLS on its
own is susceptible to man-in-the-middle attacks. Basic x509 certificate
support provides a secure session, but no authentication. This allows any
client to connect, and provides an encrypted session.
</p>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
</pre></div>
<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>
<a name="vnc_005fsec_005fcertificate_005fverify"></a>
<a name="With-x509-certificates-and-client-verification"></a>
<h4 class="subsection">2.12.4 With x509 certificates and client verification</h4>
<p>Certificates can also provide a means to authenticate the client connecting.
The server will request that the client provide a certificate, which it will
then validate against the CA certificate. This is a good choice if deploying
in an environment with a private internal certificate authority.
</p>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
</pre></div>
<hr>
<a name="vnc_005fsec_005fcertificate_005fpw"></a>
<a name="With-x509-certificates_002c-client-verification-and-passwords"></a>
<h4 class="subsection">2.12.5 With x509 certificates, client verification and passwords</h4>
<p>Finally, the previous method can be combined with VNC password authentication
to provide two layers of authentication for clients.
</p>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
(qemu) change vnc password
Password: ********
(qemu)
</pre></div>
<hr>
<a name="vnc_005fsec_005fsasl"></a>
<a name="With-SASL-authentication"></a>
<h4 class="subsection">2.12.6 With SASL authentication</h4>
<p>The SASL authentication method is a VNC extension, that provides an
easily extendable, pluggable authentication method. This allows for
integration with a wide range of authentication mechanisms, such as
PAM, GSSAPI/Kerberos, LDAP, SQL databases, one-time keys and more.
The strength of the authentication depends on the exact mechanism
configured. If the chosen mechanism also provides a SSF layer, then
it will encrypt the datastream as well.
</p>
<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>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -vnc :1,sasl -monitor stdio
</pre></div>
<hr>
<a name="vnc_005fsec_005fcertificate_005fsasl"></a>
<a name="With-x509-certificates-and-SASL-authentication"></a>
<h4 class="subsection">2.12.7 With x509 certificates and SASL authentication</h4>
<p>If the desired SASL authentication mechanism does not supported
SSF layers, then it is strongly advised to run it in combination
with TLS and x509 certificates. This provides securely encrypted
data stream, avoiding risk of compromising of the security
credentials. This can be enabled, by combining the &rsquo;sasl&rsquo; option
with the aforementioned TLS + x509 options:
</p>
<div class="example">
<pre class="example">qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
</pre></div>
<hr>
<a name="vnc_005fsetup_005fsasl"></a>
<a name="Configuring-SASL-mechanisms"></a>
<h4 class="subsection">2.12.8 Configuring SASL mechanisms</h4>
<p>The following documentation assumes use of the Cyrus SASL implementation on a
Linux host, but the principles should apply to any other SASL implementation
or host. 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 file.
</p>
<p>If the TLS option is enabled for VNC, then it will provide session encryption,
otherwise the SASL mechanism will have to provide encryption. In the latter
case the list of possible plugins that can be used is drastically reduced. In
fact only the GSSAPI SASL mechanism provides an acceptable level of security
by modern standards. Previous versions of QEMU referred to the DIGEST-MD5
mechanism, however, it has multiple serious flaws described in detail in
RFC 6331 and thus should never be used any more. The SCRAM-SHA-1 mechanism
provides a simple username/password auth facility similar to DIGEST-MD5, but
does not support session encryption, so can only be used in combination with
TLS.
</p>
<p>When not using TLS the recommended configuration is
</p>
<div class="example">
<pre class="example">mech_list: gssapi
keytab: /etc/qemu/krb5.tab
</pre></div>
<p>This says to use the &rsquo;GSSAPI&rsquo; mechanism with the Kerberos v5 protocol, with
the server principal stored in /etc/qemu/krb5.tab. For this to work the
administrator of your KDC must generate a Kerberos principal for the server,
with a name of &rsquo;qemu/somehost.example.com@EXAMPLE.COM&rsquo; replacing
&rsquo;somehost.example.com&rsquo; with the fully qualified host name of the machine
running QEMU, and &rsquo;EXAMPLE.COM&rsquo; with the Kerberos Realm.
</p>
<p>When using TLS, if username+password authentication is desired, then a
reasonable configuration is
</p>
<div class="example">
<pre class="example">mech_list: scram-sha-1
sasldb_path: /etc/qemu/passwd.db
</pre></div>
<p>The <code>saslpasswd2</code> program can be used to populate the <code>passwd.db</code>
file with accounts.
</p>
<p>Other SASL configurations will be left as an exercise for the reader. Note that
all mechanisms, except GSSAPI, should be combined with use of TLS to ensure a
secure data channel.
</p>
<hr>
<a name="network_005ftls"></a>
<a name="TLS-setup-for-network-services"></a>
<h3 class="section">2.13 TLS setup for network services</h3>
<p>Almost all network services in QEMU have the ability to use TLS for
session data encryption, along with x509 certificates for simple
client authentication. What follows is a description of how to
generate certificates suitable for usage with QEMU, and applies to
the VNC server, character devices with the TCP backend, NBD server
and client, and migration server and client.
</p>
<p>At a high level, QEMU requires certificates and private keys to be
provided in PEM format. Aside from the core fields, the certificates
should include various extension data sets, including v3 basic
constraints data, key purpose, key usage and subject alt name.
</p>
<p>The GnuTLS package includes a command called <code>certtool</code> which can
be used to easily generate certificates and keys in the required format
with expected data present. Alternatively a certificate management
service may be used.
</p>
<p>At a minimum it is necessary to setup a certificate authority, and
issue certificates to each server. If using x509 certificates for
authentication, then each client will also need to be issued a
certificate.
</p>
<p>Assuming that the QEMU network services will only ever be exposed to
clients on a private intranet, there is no need to use a commercial
certificate authority to create certificates. A self-signed CA is
sufficient, and in fact likely to be more secure since it removes
the ability of malicious 3rd parties to trick the CA into mis-issuing
certs for impersonating your services. The only likely exception
where a commercial CA might be desirable is if enabling the VNC
websockets server and exposing it directly to remote browser clients.
In such a case it might be useful to use a commercial CA to avoid
needing to install custom CA certs in the web browsers.
</p>
<p>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>
<hr>
<a name="tls_005fgenerate_005fca"></a>
<a name="Setup-the-Certificate-Authority"></a>
<h4 class="subsection">2.13.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>
<div class="example">
<pre class="example"># certtool --generate-privkey &gt; ca-key.pem
</pre></div>
<p>To generate a self-signed certificate requires one core piece of information,
the name of the organization. A template file <code>ca.info</code> should be
populated with the desired data to avoid having to deal with interactive
prompts from certtool:
</p><div class="example">
<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></div>
<p>The <code>ca</code> keyword in the template sets the v3 basic constraints extension
to indicate this certificate is for a CA, while <code>cert_signing_key</code> sets
the key usage extension to indicate this will be used for signing other keys.
The generated <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 anywhere except the host responsible for issuing
certificates.
</p>
<hr>
<a name="tls_005fgenerate_005fserver"></a>
<a name="Issuing-server-certificates"></a>
<h4 class="subsection">2.13.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 pieces of information for a server certificate are the hostnames and/or IP
addresses that will be used by clients when connecting. The hostname / IP address
that the client specifies when connecting will be validated against the hostname(s)
and IP address(es) recorded in the server certificate, and if no match is found
the client will close the connection.
</p>
<p>Thus it is recommended that the server certificate include both the fully qualified
and unqualified hostnames. If the server will have permanently assigned IP address(es),
and clients are likely to use them when connecting, they may also be included in the
certificate. Both IPv4 and IPv6 addresses are supported. Historically certificates
only included 1 hostname in the <code>CN</code> field, however, usage of this field for
validation is now deprecated. Instead modern TLS clients will validate against the
Subject Alt Name extension data, which allows for multiple entries. In the future
usage of the <code>CN</code> field may be discontinued entirely, so providing SAN
extension data is strongly recommended.
</p>
<p>On the host holding the CA, create template files containing the information
for each server, and use it to issue server certificates.
</p>
<div class="example">
<pre class="example"># cat &gt; server-hostNNN.info &lt;&lt;EOF
organization = Name of your organization
cn = hostNNN.foo.example.com
dns_name = hostNNN
dns_name = hostNNN.foo.example.com
ip_address = 10.0.1.87
ip_address = 192.8.0.92
ip_address = 2620:0:cafe::87
ip_address = 2001:24::92
tls_www_server
encryption_key
signing_key
EOF
# certtool --generate-privkey &gt; server-hostNNN-key.pem
# certtool --generate-certificate \
--load-ca-certificate ca-cert.pem \
--load-ca-privkey ca-key.pem \
--load-privkey server-hostNNN-key.pem \
--template server-hostNNN.info \
--outfile server-hostNNN-cert.pem
</pre></div>
<p>The <code>dns_name</code> and <code>ip_address</code> fields in the template are setting
the subject alt name extension data. The <code>tls_www_server</code> keyword is the
key purpose extension to indicate this certificate is intended for usage in
a web server. Although QEMU network services are not in fact HTTP servers
(except for VNC websockets), setting this key purpose is still recommended.
The <code>encryption_key</code> and <code>signing_key</code> keyword is the key usage
extension to indicate this certificate is intended for usage in the data
session.
</p>
<p>The <code>server-hostNNN-key.pem</code> and <code>server-hostNNN-cert.pem</code> files
should now be securely copied to the server for which they were generated,
and renamed to <code>server-key.pem</code> and <code>server-cert.pem</code> when added
to the <code>/etc/pki/qemu</code> directory on the target host. The <code>server-key.pem</code>
file is security sensitive and should be kept protected with file mode 0600
to prevent disclosure.
</p>
<hr>
<a name="tls_005fgenerate_005fclient"></a>
<a name="Issuing-client-certificates"></a>
<h4 class="subsection">2.13.3 Issuing client certificates</h4>
<p>The QEMU x509 TLS credential setup defaults to enabling client verification
using certificates, providing a simple authentication mechanism. If this
default is used, each client also needs to be issued a certificate. The client
certificate contains enough metadata to uniquely identify the client with the
scope of the certificate authority. The client certificate would typically
include fields for organization, state, city, building, etc.
</p>
<p>Once again on the host holding the CA, create template files containing the
information for each client, and use it to issue client certificates.
</p>
<div class="example">
<pre class="example"># cat &gt; client-hostNNN.info &lt;&lt;EOF
country = GB
state = London
locality = City Of London
organization = Name of your organization
cn = hostNNN.foo.example.com
tls_www_client
encryption_key
signing_key
EOF
# certtool --generate-privkey &gt; client-hostNNN-key.pem
# certtool --generate-certificate \
--load-ca-certificate ca-cert.pem \
--load-ca-privkey ca-key.pem \
--load-privkey client-hostNNN-key.pem \
--template client-hostNNN.info \
--outfile client-hostNNN-cert.pem
</pre></div>
<p>The subject alt name extension data is not required for clients, so the
the <code>dns_name</code> and <code>ip_address</code> fields are not included.
The <code>tls_www_client</code> keyword is the key purpose extension to indicate
this certificate is intended for usage in a web client. Although QEMU
network clients are not in fact HTTP clients, setting this key purpose is
still recommended. The <code>encryption_key</code> and <code>signing_key</code> keyword
is the key usage extension to indicate this certificate is intended for
usage in the data session.
</p>
<p>The <code>client-hostNNN-key.pem</code> and <code>client-hostNNN-cert.pem</code> files
should now be securely copied to the client for which they were generated,
and renamed to <code>client-key.pem</code> and <code>client-cert.pem</code> when added
to the <code>/etc/pki/qemu</code> directory on the target host. The <code>client-key.pem</code>
file is security sensitive and should be kept protected with file mode 0600
to prevent disclosure.
</p>
<p>If a single host is going to be using TLS in both a client and server
role, it is possible to create a single certificate to cover both roles.
This would be quite common for the migration and NBD services, where a
QEMU process will be started by accepting a TLS protected incoming migration,
and later itself be migrated out to another host. To generate a single
certificate, simply include the template data from both the client and server
instructions in one.
</p>
<div class="example">
<pre class="example"># cat &gt; both-hostNNN.info &lt;&lt;EOF
country = GB
state = London
locality = City Of London
organization = Name of your organization
cn = hostNNN.foo.example.com
dns_name = hostNNN
dns_name = hostNNN.foo.example.com
ip_address = 10.0.1.87
ip_address = 192.8.0.92
ip_address = 2620:0:cafe::87
ip_address = 2001:24::92
tls_www_server
tls_www_client
encryption_key
signing_key
EOF
# certtool --generate-privkey &gt; both-hostNNN-key.pem
# certtool --generate-certificate \
--load-ca-certificate ca-cert.pem \
--load-ca-privkey ca-key.pem \
--load-privkey both-hostNNN-key.pem \
--template both-hostNNN.info \
--outfile both-hostNNN-cert.pem
</pre></div>
<p>When copying the PEM files to the target host, save them twice,
once as <code>server-cert.pem</code> and <code>server-key.pem</code>, and
again as <code>client-cert.pem</code> and <code>client-key.pem</code>.
</p>
<hr>
<a name="tls_005fcreds_005fsetup"></a>
<a name="TLS-x509-credential-configuration"></a>
<h4 class="subsection">2.13.4 TLS x509 credential configuration</h4>
<p>QEMU has a standard mechanism for loading x509 credentials that will be
used for network services and clients. It requires specifying the
<code>tls-creds-x509</code> class name to the <code>--object</code> command line
argument for the system emulators. Each set of credentials loaded should
be given a unique string identifier via the <code>id</code> parameter. A single
set of TLS credentials can be used for multiple network backends, so VNC,
migration, NBD, character devices can all share the same credentials. Note,
however, that credentials for use in a client endpoint must be loaded
separately from those used in a server endpoint.
</p>
<p>When specifying the object, the <code>dir</code> parameters specifies which
directory contains the credential files. This directory is expected to
contain files with the names mentioned previously, <code>ca-cert.pem</code>,
<code>server-key.pem</code>, <code>server-cert.pem</code>, <code>client-key.pem</code>
and <code>client-cert.pem</code> as appropriate. It is also possible to
include a set of pre-generated Diffie-Hellman (DH) parameters in a file
<code>dh-params.pem</code>, which can be created using the
<code>certtool --generate-dh-params</code> command. If omitted, QEMU will
dynamically generate DH parameters when loading the credentials.
</p>
<p>The <code>endpoint</code> parameter indicates whether the credentials will
be used for a network client or server, and determines which PEM
files are loaded.
</p>
<p>The <code>verify</code> parameter determines whether x509 certificate
validation should be performed. This defaults to enabled, meaning
clients will always validate the server hostname against the
certificate subject alt name fields and/or CN field. It also
means that servers will request that clients provide a certificate
and validate them. Verification should never be turned off for
client endpoints, however, it may be turned off for server endpoints
if an alternative mechanism is used to authenticate clients. For
example, the VNC server can use SASL to authenticate clients
instead.
</p>
<p>To load server credentials with client certificate validation
enabled
</p>
<div class="example">
<pre class="example">$QEMU -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server
</pre></div>
<p>while to load client credentials use
</p>
<div class="example">
<pre class="example">$QEMU -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=client
</pre></div>
<p>Network services which support TLS will all have a <code>tls-creds</code>
parameter which expects the ID of the TLS credentials object. For
example with VNC:
</p>
<div class="example">
<pre class="example">$QEMU -vnc 0.0.0.0:0,tls-creds=tls0
</pre></div>
<hr>
<a name="tls_005fpsk"></a>
<a name="TLS-Pre_002dShared-Keys-_0028PSK_0029"></a>
<h4 class="subsection">2.13.5 TLS Pre-Shared Keys (PSK)</h4>
<p>Instead of using certificates, you may also use TLS Pre-Shared Keys
(TLS-PSK). This can be simpler to set up than certificates but is
less scalable.
</p>
<p>Use the GnuTLS <code>psktool</code> program to generate a <code>keys.psk</code>
file containing one or more usernames and random keys:
</p>
<div class="example">
<pre class="example">mkdir -m 0700 /tmp/keys
psktool -u rich -p /tmp/keys/keys.psk
</pre></div>
<p>TLS-enabled servers such as qemu-nbd can use this directory like so:
</p>
<div class="example">
<pre class="example">qemu-nbd \
-t -x / \
--object tls-creds-psk,id=tls0,endpoint=server,dir=/tmp/keys \
--tls-creds tls0 \
image.qcow2
</pre></div>
<p>When connecting from a qemu-based client you must specify the
directory containing <code>keys.psk</code> and an optional <var>username</var>
(defaults to &ldquo;qemu&rdquo;):
</p>
<div class="example">
<pre class="example">qemu-img info \
--object tls-creds-psk,id=tls0,dir=/tmp/keys,username=rich,endpoint=client \
--image-opts \
file.driver=nbd,file.host=localhost,file.port=10809,file.tls-creds=tls0,file.export=/
</pre></div>
<hr>
<a name="gdb_005fusage"></a>
<a name="GDB-usage"></a>
<h3 class="section">2.14 GDB usage</h3>
<p>QEMU has a primitive support to work with gdb, so that you can do
&rsquo;Ctrl-C&rsquo; while the virtual machine is running and inspect its state.
</p>
<p>In order to use gdb, launch QEMU with the &rsquo;-s&rsquo; option. It will wait for a
gdb connection:
</p><div class="example">
<pre class="example">qemu-system-i386 -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></div>
<p>Then launch gdb on the &rsquo;vmlinux&rsquo; executable:
</p><div class="example">
<pre class="example">&gt; gdb vmlinux
</pre></div>
<p>In gdb, connect to QEMU:
</p><div class="example">
<pre class="example">(gdb) target remote localhost:1234
</pre></div>
<p>Then you can use gdb normally. For example, type &rsquo;c&rsquo; to launch the kernel:
</p><div class="example">
<pre class="example">(gdb) c
</pre></div>
<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 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><div class="example">
<pre class="example">(gdb) maintenance packet qqemu.sstepbits
sending: &quot;qqemu.sstepbits&quot;
received: &quot;ENABLE=1,NOIRQ=2,NOTIMER=4&quot;
</pre></div>
</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><div class="example">
<pre class="example">(gdb) maintenance packet qqemu.sstep
sending: &quot;qqemu.sstep&quot;
received: &quot;0x7&quot;
</pre></div>
</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><div class="example">
<pre class="example">(gdb) maintenance packet Qqemu.sstep=0x5
sending: &quot;qemu.sstep=0x5&quot;
received: &quot;OK&quot;
</pre></div>
</dd>
</dl>
<hr>
<a name="pcsys_005fos_005fspecific"></a>
<a name="Target-OS-specific-information"></a>
<h3 class="section">2.15 Target OS specific information</h3>
<a name="Linux-1"></a>
<h4 class="subsection">2.15.1 Linux</h4>
<p>To have access to SVGA graphic modes under X11, use the <code>vesa</code> or
the <code>cirrus</code> X11 driver. For optimal performances, use 16 bit
color depth in the guest and the host OS.
</p>
<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&rsquo;t have it.
</p>
<a name="Windows-1"></a>
<h4 class="subsection">2.15.2 Windows</h4>
<p>If you have a slow host, using Windows 95 is better as it gives the
best speed. Windows 2000 is also a good choice.
</p>
<a name="SVGA-graphic-modes-support"></a>
<h4 class="subsubsection">2.15.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 <samp>-std-vga</samp>).
</p>
<a name="CPU-usage-reduction"></a>
<h4 class="subsubsection">2.15.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="https://web.archive.org/web/20060212132151/http://www.user.cityline.ru/~maxamn/amnhltm.zip">https://web.archive.org/web/20060212132151/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>
<a name="Windows-2000-disk-full-problem"></a>
<h4 class="subsubsection">2.15.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 <samp>-win2k-hack</samp> QEMU
option to enable a specific workaround. After Windows 2000 is
installed, you no longer need this option (this option slows down the
IDE transfers).
</p>
<a name="Windows-2000-shutdown"></a>
<h4 class="subsubsection">2.15.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>
<a name="Share-a-directory-between-Unix-and-Windows"></a>
<h4 class="subsubsection">2.15.2.5 Share a directory between Unix and Windows</h4>
<p>See <a href="#sec_005finvocation">sec_invocation</a> about the help of the option
<samp>'-netdev user,smb=...'</samp>.
</p>
<a name="Windows-XP-security-problem"></a>
<h4 class="subsubsection">2.15.2.6 Windows XP security problem</h4>
<p>Some releases of Windows XP install correctly but give a security
error when booting:
</p><div class="example">
<pre class="example">A problem is preventing Windows from accurately checking the
license for this computer. Error code: 0x800703e6.
</pre></div>
<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>
<a name="MS_002dDOS-and-FreeDOS"></a>
<h4 class="subsection">2.15.3 MS-DOS and FreeDOS</h4>
<a name="CPU-usage-reduction-1"></a>
<h4 class="subsubsection">2.15.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="https://web.archive.org/web/20051222085335/http://www.vmware.com/software/dosidle210.zip">https://web.archive.org/web/20051222085335/http://www.vmware.com/software/dosidle210.zip</a>
to solve this problem.
</p>
<hr>
<a name="QEMU-System-emulator-for-non-PC-targets"></a>
<a name="QEMU-System-emulator-for-non-PC-targets-1"></a>
<h2 class="chapter">3 QEMU System emulator for non PC targets</h2>
<p>QEMU is a generic emulator and it emulates many non PC
machines. Most of the options are similar to the PC emulator. The
differences are mentioned in the following sections.
</p>
<hr>
<a name="PowerPC-System-emulator"></a>
<a name="PowerPC-System-emulator-1"></a>
<h3 class="section">3.1 PowerPC System emulator</h3>
<a name="index-system-emulation-_0028PowerPC_0029"></a>
<p>Use the executable <samp>qemu-system-ppc</samp> to simulate a complete PREP
or PowerMac PowerPC system.
</p>
<p>QEMU emulates the following PowerMac peripherals:
</p>
<ul class="no-bullet">
<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="no-bullet">
<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&rsquo;Ware Open Firmware Compatible BIOS.
</p>
<p>Since version 0.9.1, QEMU uses OpenBIOS <a href="https://www.openbios.org/">https://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><samp>-g <var>W</var>x<var>H</var>[x<var>DEPTH</var>]</samp></dt>
<dd>
<p>Set the initial VGA graphic mode. The default is 800x600x32.
</p>
</dd>
<dt><samp>-prom-env <var>string</var></samp></dt>
<dd>
<p>Set OpenBIOS variables in NVRAM, for example:
</p>
<div class="example">
<pre class="example">qemu-system-ppc -prom-env 'auto-boot?=false' \
-prom-env 'boot-device=hd:2,\yaboot' \
-prom-env 'boot-args=conf=hd:2,\yaboot.conf'
</pre></div>
<p>These variables are not used by Open Hack&rsquo;Ware.
</p>
</dd>
</dl>
<hr>
<a name="Sparc32-System-emulator"></a>
<a name="Sparc32-System-emulator-1"></a>
<h3 class="section">3.2 Sparc32 System emulator</h3>
<a name="index-system-emulation-_0028Sparc32_0029"></a>
<p>Use the executable <samp>qemu-system-sparc</samp> to simulate the following
Sun4m architecture machines:
</p><ul class="no-bullet">
<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>QEMU emulates the following sun4m peripherals:
</p>
<ul class="no-bullet">
<li>- IOMMU
</li><li>- TCX or cgthree 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="https://www.openbios.org/">https://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
most kernel versions work. Please note that currently older Solaris kernels
don&rsquo;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><samp>-g <var>W</var>x<var>H</var>x[x<var>DEPTH</var>]</samp></dt>
<dd>
<p>Set the initial graphics mode. For TCX, the default is 1024x768x8 with the
option of 1024x768x24. For cgthree, the default is 1024x768x8 with the option
of 1152x900x8 for people who wish to use OBP.
</p>
</dd>
<dt><samp>-prom-env <var>string</var></samp></dt>
<dd>
<p>Set OpenBIOS variables in NVRAM, for example:
</p>
<div class="example">
<pre class="example">qemu-system-sparc -prom-env 'auto-boot?=false' \
-prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
</pre></div>
</dd>
<dt><samp>-M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic] [|SPARCbook]</samp></dt>
<dd>
<p>Set the emulated machine type. Default is SS-5.
</p>
</dd>
</dl>
<hr>
<a name="Sparc64-System-emulator"></a>
<a name="Sparc64-System-emulator-1"></a>
<h3 class="section">3.3 Sparc64 System emulator</h3>
<a name="index-system-emulation-_0028Sparc64_0029"></a>
<p>Use the executable <samp>qemu-system-sparc64</samp> to simulate a Sun4u
(UltraSPARC PC-like machine), Sun4v (T1 PC-like machine), or generic
Niagara (T1) machine. The Sun4u emulator is mostly complete, being
able to run Linux, NetBSD and OpenBSD in headless (-nographic) mode. The
Sun4v emulator is still a work in progress.
</p>
<p>The Niagara T1 emulator makes use of firmware and OS binaries supplied in the S10image/ directory
of the OpenSPARC T1 project <a href="http://download.oracle.com/technetwork/systems/opensparc/OpenSPARCT1_Arch.1.5.tar.bz2">http://download.oracle.com/technetwork/systems/opensparc/OpenSPARCT1_Arch.1.5.tar.bz2</a>
and is able to boot the disk.s10hw2 Solaris image.
</p><div class="example">
<pre class="example">qemu-system-sparc64 -M niagara -L /path-to/S10image/ \
-nographic -m 256 \
-drive if=pflash,readonly=on,file=/S10image/disk.s10hw2
</pre></div>
<p>QEMU emulates the following peripherals:
</p>
<ul class="no-bullet">
<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><samp>-prom-env <var>string</var></samp></dt>
<dd>
<p>Set OpenBIOS variables in NVRAM, for example:
</p>
<div class="example">
<pre class="example">qemu-system-sparc64 -prom-env 'auto-boot?=false'
</pre></div>
</dd>
<dt><samp>-M [sun4u|sun4v|niagara]</samp></dt>
<dd>
<p>Set the emulated machine type. The default is sun4u.
</p>
</dd>
</dl>
<hr>
<a name="MIPS-System-emulator"></a>
<a name="MIPS-System-emulator-1"></a>
<h3 class="section">3.4 MIPS System emulator</h3>
<a name="index-system-emulation-_0028MIPS_0029"></a>
<p>Four executables cover simulation of 32 and 64-bit MIPS systems in
both endian options, <samp>qemu-system-mips</samp>, <samp>qemu-system-mipsel</samp>
<samp>qemu-system-mips64</samp> and <samp>qemu-system-mips64el</samp>.
Five different machine types are emulated:
</p>
<ul class="no-bullet">
<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 &rsquo;Etch&rsquo; and is able to
install Debian into a virtual disk image. The following devices are
emulated:
</p>
<ul class="no-bullet">
<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="no-bullet">
<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&rsquo;s serial device
</li><li>- PCI network cards (PCnet32 and others)
</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="no-bullet">
<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 similar
to what the proprietary MIPS emulator uses for running Linux.
It supports:
</p>
<ul class="no-bullet">
<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="no-bullet">
<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>
<a name="ARM-System-emulator"></a>
<a name="ARM-System-emulator-1"></a>
<h3 class="section">3.5 ARM System emulator</h3>
<a name="index-system-emulation-_0028ARM_0029"></a>
<p>Use the executable <samp>qemu-system-arm</samp> to simulate a ARM
machine. The ARM Integrator/CP board is emulated with the following
devices:
</p>
<ul class="no-bullet">
<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="no-bullet">
<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>Several variants of the ARM RealView baseboard are emulated,
including the EB, PB-A8 and PBX-A9. Due to interactions with the
bootloader, only certain Linux kernel configurations work out
of the box on these boards.
</p>
<p>Kernels for the PB-A8 board should have CONFIG_REALVIEW_HIGH_PHYS_OFFSET
enabled in the kernel, and expect 512M RAM. Kernels for The PBX-A9 board
should have CONFIG_SPARSEMEM enabled, CONFIG_REALVIEW_HIGH_PHYS_OFFSET
disabled and expect 1024M RAM.
</p>
<p>The following devices are emulated:
</p>
<ul class="no-bullet">
<li>- ARM926E, ARM1136, ARM11MPCore, Cortex-A8 or Cortex-A9 MPCore CPU
</li><li>- ARM AMBA Generic/Distributed Interrupt Controller
</li><li>- Four PL011 UARTs
</li><li>- SMC 91c111 or SMSC LAN9118 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="no-bullet">
<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="no-bullet">
<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="no-bullet">
<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) transceiver 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="no-bullet">
<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="no-bullet">
<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="no-bullet">
<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>- 128×64 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 emulation includes the following elements:
</p>
<ul class="no-bullet">
<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><samp>-semihosting</samp></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>
<a name="ColdFire-System-emulator"></a>
<a name="ColdFire-System-emulator-1"></a>
<h3 class="section">3.6 ColdFire System emulator</h3>
<a name="index-system-emulation-_0028ColdFire_0029"></a>
<a name="index-system-emulation-_0028M68K_0029"></a>
<p>Use the executable <samp>qemu-system-m68k</samp> 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="no-bullet">
<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="no-bullet">
<li>- MCF5206 ColdFire V2 Microprocessor.
</li><li>- Two on-chip UARTs.
</li></ul>
<p>The following options are specific to the ColdFire emulation:
</p>
<dl compact="compact">
<dt><samp>-semihosting</samp></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>
<a name="Cris-System-emulator"></a>
<a name="Cris-System-emulator-1"></a>
<h3 class="section">3.7 Cris System emulator</h3>
<a name="index-system-emulation-_0028Cris_0029"></a>
<p>TODO
</p>
<hr>
<a name="Microblaze-System-emulator"></a>
<a name="Microblaze-System-emulator-1"></a>
<h3 class="section">3.8 Microblaze System emulator</h3>
<a name="index-system-emulation-_0028Microblaze_0029"></a>
<p>TODO
</p>
<hr>
<a name="SH4-System-emulator"></a>
<a name="SH4-System-emulator-1"></a>
<h3 class="section">3.9 SH4 System emulator</h3>
<a name="index-system-emulation-_0028SH4_0029"></a>
<p>TODO
</p>
<hr>
<a name="Xtensa-System-emulator"></a>
<a name="Xtensa-System-emulator-1"></a>
<h3 class="section">3.10 Xtensa System emulator</h3>
<a name="index-system-emulation-_0028Xtensa_0029"></a>
<p>Two executables cover simulation of both Xtensa endian options,
<samp>qemu-system-xtensa</samp> and <samp>qemu-system-xtensaeb</samp>.
Two different machine types are emulated:
</p>
<ul class="no-bullet">
<li>- Xtensa emulator pseudo board &quot;sim&quot;
</li><li>- Avnet LX60/LX110/LX200 board
</li></ul>
<p>The sim pseudo board emulation provides an environment similar
to one provided by the proprietary Tensilica ISS.
It supports:
</p>
<ul class="no-bullet">
<li>- A range of Xtensa CPUs, default is the DC232B
</li><li>- Console and filesystem access via semihosting calls
</li></ul>
<p>The Avnet LX60/LX110/LX200 emulation supports:
</p>
<ul class="no-bullet">
<li>- A range of Xtensa CPUs, default is the DC232B
</li><li>- 16550 UART
</li><li>- OpenCores 10/100 Mbps Ethernet MAC
</li></ul>
<p>The following options are specific to the Xtensa emulation:
</p>
<dl compact="compact">
<dt><samp>-semihosting</samp></dt>
<dd><p>Enable semihosting syscall emulation.
</p>
<p>Xtensa semihosting provides basic file IO calls, such as open/read/write/seek/select.
Tensilica baremetal libc for ISS and linux platform &quot;sim&quot; use this 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>
<a name="QEMU-Guest-Agent"></a>
<a name="QEMU-Guest-Agent-invocation"></a>
<h2 class="chapter">4 QEMU Guest Agent invocation</h2>
<div class="example">
<pre class="example"><code>qemu-ga</code> [<var>OPTIONS</var>]
</pre></div>
<p>The QEMU Guest Agent is a daemon intended to be run within virtual
machines. It allows the hypervisor host to perform various operations
in the guest, such as:
</p>
<ul>
<li> get information from the guest
</li><li> set the guest&rsquo;s system time
</li><li> read/write a file
</li><li> sync and freeze the filesystems
</li><li> suspend the guest
</li><li> reconfigure guest local processors
</li><li> set user&rsquo;s password
</li><li> ...
</li></ul>
<p>qemu-ga will read a system configuration file on startup (located at
<samp>/etc/qemu/qemu-ga.conf</samp> by default), then parse remaining
configuration options on the command line. For the same key, the last
option wins, but the lists accumulate (see below for configuration
file format).
</p>
<dl compact="compact">
<dt><samp>-m, --method=<var>method</var></samp></dt>
<dd><p>Transport method: one of &lsquo;<samp>unix-listen</samp>&rsquo;, &lsquo;<samp>virtio-serial</samp>&rsquo;, or
&lsquo;<samp>isa-serial</samp>&rsquo; (&lsquo;<samp>virtio-serial</samp>&rsquo; is the default).
</p>
</dd>
<dt><samp>-p, --path=<var>path</var></samp></dt>
<dd><p>Device/socket path (the default for virtio-serial is
&lsquo;<samp>/dev/virtio-ports/org.qemu.guest_agent.0</samp>&rsquo;,
the default for isa-serial is &lsquo;<samp>/dev/ttyS0</samp>&rsquo;)
</p>
</dd>
<dt><samp>-l, --logfile=<var>path</var></samp></dt>
<dd><p>Set log file path (default is stderr).
</p>
</dd>
<dt><samp>-f, --pidfile=<var>path</var></samp></dt>
<dd><p>Specify pid file (default is &lsquo;<samp>/var/run/qemu-ga.pid</samp>&rsquo;).
</p>
</dd>
<dt><samp>-F, --fsfreeze-hook=<var>path</var></samp></dt>
<dd><p>Enable fsfreeze hook. Accepts an optional argument that specifies
script to run on freeze/thaw. Script will be called with
&rsquo;freeze&rsquo;/&rsquo;thaw&rsquo; arguments accordingly (default is
&lsquo;<samp>/etc/qemu/fsfreeze-hook</samp>&rsquo;). If using -F with an argument, do
not follow -F with a space (for example:
&lsquo;<samp>-F/var/run/fsfreezehook.sh</samp>&rsquo;).
</p>
</dd>
<dt><samp>-t, --statedir=<var>path</var></samp></dt>
<dd><p>Specify the directory to store state information (absolute paths only,
default is &lsquo;<samp>/var/run</samp>&rsquo;).
</p>
</dd>
<dt><samp>-v, --verbose</samp></dt>
<dd><p>Log extra debugging information.
</p>
</dd>
<dt><samp>-V, --version</samp></dt>
<dd><p>Print version information and exit.
</p>
</dd>
<dt><samp>-d, --daemon</samp></dt>
<dd><p>Daemonize after startup (detach from terminal).
</p>
</dd>
<dt><samp>-b, --blacklist=<var>list</var></samp></dt>
<dd><p>Comma-separated list of RPCs to disable (no spaces, &lsquo;<samp>?</samp>&rsquo; to list
available RPCs).
</p>
</dd>
<dt><samp>-D, --dump-conf</samp></dt>
<dd><p>Dump the configuration in a format compatible with <samp>qemu-ga.conf</samp>
and exit.
</p>
</dd>
<dt><samp>-h, --help</samp></dt>
<dd><p>Display this help and exit.
</p></dd>
</dl>
<p>The syntax of the <samp>qemu-ga.conf</samp> configuration file follows the
Desktop Entry Specification, here is a quick summary: it consists of
groups of key-value pairs, interspersed with comments.
</p>
<div class="example">
<pre class="example"># qemu-ga configuration sample
[general]
daemonize = 0
pidfile = /var/run/qemu-ga.pid
verbose = 0
method = virtio-serial
path = /dev/virtio-ports/org.qemu.guest_agent.0
statedir = /var/run
</pre></div>
<p>The list of keys follows the command line options:
</p><dl compact="compact">
<dt><samp>daemon= boolean</samp></dt>
<dt><samp>method= string</samp></dt>
<dt><samp>path= string</samp></dt>
<dt><samp>logfile= string</samp></dt>
<dt><samp>pidfile= string</samp></dt>
<dt><samp>fsfreeze-hook= string</samp></dt>
<dt><samp>statedir= string</samp></dt>
<dt><samp>verbose= boolean</samp></dt>
<dt><samp>blacklist= string list</samp></dt>
</dl>
<hr>
<a name="QEMU-User-space-emulator"></a>
<a name="QEMU-User-space-emulator-1"></a>
<h2 class="chapter">5 QEMU User space emulator</h2>
<hr>
<a name="Supported-Operating-Systems"></a>
<a name="Supported-Operating-Systems-1"></a>
<h3 class="section">5.1 Supported Operating Systems</h3>
<p>The following OS are supported in user space emulation:
</p>
<ul class="no-bullet">
<li>- Linux (referred as qemu-linux-user)
</li><li>- BSD (referred as qemu-bsd-user)
</li></ul>
<hr>
<a name="Features"></a>
<a name="Features-2"></a>
<h3 class="section">5.2 Features</h3>
<p>QEMU user space emulation has the following notable features:
</p>
<dl compact="compact">
<dt><strong>System call translation:</strong></dt>
<dd><p>QEMU includes a generic system call translator. This means that
the parameters of the system calls can be converted to fix
endianness and 32/64-bit mismatches between hosts and targets.
IOCTLs can be converted too.
</p>
</dd>
<dt><strong>POSIX signal handling:</strong></dt>
<dd><p>QEMU can redirect to the running program all signals coming from
the host (such as <code>SIGALRM</code>), as well as synthesize signals from
virtual CPU exceptions (for example <code>SIGFPE</code> when the program
executes a division by zero).
</p>
<p>QEMU relies on the host kernel to emulate most signal system
calls, for example to emulate the signal mask. On Linux, QEMU
supports both normal and real-time signals.
</p>
</dd>
<dt><strong>Threading:</strong></dt>
<dd><p>On Linux, QEMU can emulate the <code>clone</code> syscall and create a real
host thread (with a separate virtual CPU) for each emulated thread.
Note that not all targets currently emulate atomic operations correctly.
x86 and ARM use a global lock in order to preserve their semantics.
</p></dd>
</dl>
<p>QEMU was conceived so that ultimately it can emulate itself. Although
it is not very useful, it is an important test to show the power of the
emulator.
</p>
<hr>
<a name="Linux-User-space-emulator"></a>
<a name="Linux-User-space-emulator-1"></a>
<h3 class="section">5.3 Linux User space emulator</h3>
<hr>
<a name="Quick-Start"></a>
<a name="Quick-Start-2"></a>
<h4 class="subsection">5.3.1 Quick Start</h4>
<p>In order to launch a Linux process, QEMU needs the process executable
itself and all the target (x86) dynamic libraries used by it.
</p>
<ul>
<li> On x86, you can just try to launch any process by using the native
libraries:
<div class="example">
<pre class="example">qemu-i386 -L / /bin/ls
</pre></div>
<p><code>-L /</code> tells that the x86 dynamic linker must be searched with a
<samp>/</samp> 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):
<div class="example">
<pre class="example">qemu-i386 -L / qemu-i386 -L / /bin/ls
</pre></div>
</li><li> On non x86 CPUs, you need first to download at least an x86 glibc
(<samp>qemu-runtime-i386-XXX-.tar.gz</samp> on the QEMU web page). Ensure that
<code>LD_LIBRARY_PATH</code> is not set:
<div class="example">
<pre class="example">unset LD_LIBRARY_PATH
</pre></div>
<p>Then you can launch the precompiled <samp>ls</samp> x86 executable:
</p>
<div class="example">
<pre class="example">qemu-i386 tests/i386/ls
</pre></div>
<p>You can look at <samp>scripts/qemu-binfmt-conf.sh</samp> so that
QEMU is automatically launched by the Linux kernel when you try to
launch x86 executables. It requires the <code>binfmt_misc</code> module in the
Linux kernel.
</p>
</li><li> The x86 version of QEMU is also included. You can try weird things such as:
<div class="example">
<pre class="example">qemu-i386 /usr/local/qemu-i386/bin/qemu-i386 \
/usr/local/qemu-i386/bin/ls-i386
</pre></div>
</li></ul>
<hr>
<a name="Wine-launch"></a>
<a name="Wine-launch-1"></a>
<h4 class="subsection">5.3.2 Wine launch</h4>
<ul>
<li> Ensure that you have a working QEMU with the x86 glibc
distribution (see previous section). In order to verify it, you must be
able to do:
<div class="example">
<pre class="example">qemu-i386 /usr/local/qemu-i386/bin/ls-i386
</pre></div>
</li><li> Download the binary x86 Wine install
(<samp>qemu-XXX-i386-wine.tar.gz</samp> on the QEMU web page).
</li><li> Configure Wine on your account. Look at the provided script
<samp>/usr/local/qemu-i386/bin/wine-conf.sh</samp>. Your previous
<code>${HOME}/.wine</code> directory is saved to <code>${HOME}/.wine.org</code>.
</li><li> Then you can try the example <samp>putty.exe</samp>:
<div class="example">
<pre class="example">qemu-i386 /usr/local/qemu-i386/wine/bin/wine \
/usr/local/qemu-i386/wine/c/Program\ Files/putty.exe
</pre></div>
</li></ul>
<hr>
<a name="Command-line-options"></a>
<a name="Command-line-options-1"></a>
<h4 class="subsection">5.3.3 Command line options</h4>
<div class="example">
<pre class="example"><code>qemu-i386</code> [<samp>-h]</samp> [<samp>-d]</samp> [<samp>-L</samp> <var>path</var>] [<samp>-s</samp> <var>size</var>] [<samp>-cpu</samp> <var>model</var>] [<samp>-g</samp> <var>port</var>] [<samp>-B</samp> <var>offset</var>] [<samp>-R</samp> <var>size</var>] <var>program</var> [<var>arguments</var>...]
</pre></div>
<dl compact="compact">
<dt><samp>-h</samp></dt>
<dd><p>Print the help
</p></dd>
<dt><samp>-L path</samp></dt>
<dd><p>Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)
</p></dd>
<dt><samp>-s size</samp></dt>
<dd><p>Set the x86 stack size in bytes (default=524288)
</p></dd>
<dt><samp>-cpu model</samp></dt>
<dd><p>Select CPU model (-cpu help for list and additional feature selection)
</p></dd>
<dt><samp>-E <var>var</var>=<var>value</var></samp></dt>
<dd><p>Set environment <var>var</var> to <var>value</var>.
</p></dd>
<dt><samp>-U <var>var</var></samp></dt>
<dd><p>Remove <var>var</var> from the environment.
</p></dd>
<dt><samp>-B offset</samp></dt>
<dd><p>Offset guest address by the specified number of bytes. This is useful when
the address region required by guest applications is reserved on the host.
This option is currently only supported on some hosts.
</p></dd>
<dt><samp>-R size</samp></dt>
<dd><p>Pre-allocate a guest virtual address space of the given size (in bytes).
&quot;G&quot;, &quot;M&quot;, and &quot;k&quot; suffixes may be used when specifying the size.
</p></dd>
</dl>
<p>Debug options:
</p>
<dl compact="compact">
<dt><samp>-d item1,...</samp></dt>
<dd><p>Activate logging of the specified items (use &rsquo;-d help&rsquo; for a list of log items)
</p></dd>
<dt><samp>-p pagesize</samp></dt>
<dd><p>Act as if the host page size was &rsquo;pagesize&rsquo; bytes
</p></dd>
<dt><samp>-g port</samp></dt>
<dd><p>Wait gdb connection to port
</p></dd>
<dt><samp>-singlestep</samp></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 &rsquo;strace&rsquo; program
(NOTE: the actual &rsquo;strace&rsquo; program will not work because the user
space emulator hasn&rsquo;t implemented ptrace). At the moment this is
incomplete. All system calls that don&rsquo;t have a specific argument
format are printed with information for six arguments. Many
flag-style arguments don&rsquo;t have decoders and will show up as numbers.
</p></dd>
</dl>
<hr>
<a name="Other-binaries"></a>
<a name="Other-binaries-1"></a>
<h4 class="subsection">5.3.4 Other binaries</h4>
<a name="index-user-mode-_0028Alpha_0029"></a>
<p><code>qemu-alpha</code> TODO.
</p>
<a name="index-user-mode-_0028ARM_0029"></a>
<p><code>qemu-armeb</code> TODO.
</p>
<a name="index-user-mode-_0028ARM_0029-1"></a>
<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>
<a name="index-user-mode-_0028ColdFire_0029"></a>
<a name="index-user-mode-_0028M68K_0029"></a>
<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>
<a name="index-user-mode-_0028Cris_0029"></a>
<p><code>qemu-cris</code> TODO.
</p>
<a name="index-user-mode-_0028i386_0029"></a>
<p><code>qemu-i386</code> TODO.
<code>qemu-x86_64</code> TODO.
</p>
<a name="index-user-mode-_0028Microblaze_0029"></a>
<p><code>qemu-microblaze</code> TODO.
</p>
<a name="index-user-mode-_0028MIPS_0029"></a>
<p><code>qemu-mips</code> TODO.
<code>qemu-mipsel</code> TODO.
</p>
<a name="index-user-mode-_0028NiosII_0029"></a>
<p><code>qemu-nios2</code> TODO.
</p>
<a name="index-user-mode-_0028PowerPC_0029"></a>
<p><code>qemu-ppc64abi32</code> TODO.
<code>qemu-ppc64</code> TODO.
<code>qemu-ppc</code> TODO.
</p>
<a name="index-user-mode-_0028SH4_0029"></a>
<p><code>qemu-sh4eb</code> TODO.
<code>qemu-sh4</code> TODO.
</p>
<a name="index-user-mode-_0028SPARC_0029"></a>
<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>
<a name="BSD-User-space-emulator"></a>
<a name="BSD-User-space-emulator-1"></a>
<h3 class="section">5.4 BSD User space emulator</h3>
<hr>
<a name="BSD-Status"></a>
<a name="BSD-Status-1"></a>
<h4 class="subsection">5.4.1 BSD Status</h4>
<ul class="no-bullet">
<li>- target Sparc64 on Sparc64: Some trivial programs work.
</li></ul>
<hr>
<a name="BSD-Quick-Start"></a>
<a name="Quick-Start-3"></a>
<h4 class="subsection">5.4.2 Quick Start</h4>
<p>In order to launch a BSD process, QEMU needs the process executable
itself and all the target dynamic libraries used by it.
</p>
<ul>
<li> On Sparc64, you can just try to launch any process by using the native
libraries:
<div class="example">
<pre class="example">qemu-sparc64 /bin/ls
</pre></div>
</li></ul>
<hr>
<a name="BSD-Command-line-options"></a>
<a name="Command-line-options-2"></a>
<h4 class="subsection">5.4.3 Command line options</h4>
<div class="example">
<pre class="example"><code>qemu-sparc64</code> [<samp>-h]</samp> [<samp>-d]</samp> [<samp>-L</samp> <var>path</var>] [<samp>-s</samp> <var>size</var>] [<samp>-bsd</samp> <var>type</var>] <var>program</var> [<var>arguments</var>...]
</pre></div>
<dl compact="compact">
<dt><samp>-h</samp></dt>
<dd><p>Print the help
</p></dd>
<dt><samp>-L path</samp></dt>
<dd><p>Set the library root path (default=/)
</p></dd>
<dt><samp>-s size</samp></dt>
<dd><p>Set the stack size in bytes (default=524288)
</p></dd>
<dt><samp>-ignore-environment</samp></dt>
<dd><p>Start with an empty environment. Without this option,
the initial environment is a copy of the caller&rsquo;s environment.
</p></dd>
<dt><samp>-E <var>var</var>=<var>value</var></samp></dt>
<dd><p>Set environment <var>var</var> to <var>value</var>.
</p></dd>
<dt><samp>-U <var>var</var></samp></dt>
<dd><p>Remove <var>var</var> from the environment.
</p></dd>
<dt><samp>-bsd type</samp></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><samp>-d item1,...</samp></dt>
<dd><p>Activate logging of the specified items (use &rsquo;-d help&rsquo; for a list of log items)
</p></dd>
<dt><samp>-p pagesize</samp></dt>
<dd><p>Act as if the host page size was &rsquo;pagesize&rsquo; bytes
</p></dd>
<dt><samp>-singlestep</samp></dt>
<dd><p>Run the emulation in single step mode.
</p></dd>
</dl>
<hr>
<a name="Implementation-notes"></a>
<a name="Implementation-notes-1"></a>
<h2 class="appendix">Appendix A Implementation notes</h2>
<hr>
<a name="CPU-emulation"></a>
<a name="CPU-emulation-1"></a>
<h3 class="section">A.1 CPU emulation</h3>
<hr>
<a name="x86"></a>
<a name="x86-and-x86_002d64-emulation"></a>
<h4 class="subsection">A.1.1 x86 and x86-64 emulation</h4>
<p>QEMU x86 target features:
</p>
<ul>
<li> The virtual x86 CPU supports 16 bit and 32 bit addressing with segmentation.
LDT/GDT and IDT are emulated. VM86 mode is also supported to run
DOSEMU. There is some support for MMX/3DNow!, SSE, SSE2, SSE3, SSSE3,
and SSE4 as well as x86-64 SVM.
</li><li> Support of host page sizes bigger than 4KB in user mode emulation.
</li><li> QEMU can emulate itself on x86.
</li><li> An extensive Linux x86 CPU test program is included <samp>tests/test-i386</samp>.
It can be used to test other x86 virtual CPUs.
</li></ul>
<p>Current QEMU limitations:
</p>
<ul>
<li> Limited x86-64 support.
</li><li> IPC syscalls are missing.
</li><li> The x86 segment limits and access rights are not tested at every
memory access (yet). Hopefully, very few OSes seem to rely on that for
normal use.
</li></ul>
<hr>
<a name="ARM"></a>
<a name="ARM-emulation"></a>
<h4 class="subsection">A.1.2 ARM emulation</h4>
<ul>
<li> Full ARM 7 user emulation.
</li><li> NWFPE FPU support included in user Linux emulation.
</li><li> Can run most ARM Linux binaries.
</li></ul>
<hr>
<a name="MIPS"></a>
<a name="MIPS-emulation"></a>
<h4 class="subsection">A.1.3 MIPS emulation</h4>
<ul>
<li> The system emulation allows full MIPS32/MIPS64 Release 2 emulation,
including privileged instructions, FPU and MMU, in both little and big
endian modes.
</li><li> The Linux userland emulation can run many 32 bit MIPS Linux binaries.
</li></ul>
<p>Current QEMU limitations:
</p>
<ul>
<li> Self-modifying code is not always handled correctly.
</li><li> 64 bit userland emulation is not implemented.
</li><li> The system emulation is not complete enough to run real firmware.
</li><li> The watchpoint debug facility is not implemented.
</li></ul>
<hr>
<a name="PPC"></a>
<a name="PowerPC-emulation"></a>
<h4 class="subsection">A.1.4 PowerPC emulation</h4>
<ul>
<li> Full PowerPC 32 bit emulation, including privileged instructions,
FPU and MMU.
</li><li> Can run most PowerPC Linux binaries.
</li></ul>
<hr>
<a name="SPARC"></a>
<a name="Sparc32-and-Sparc64-emulation"></a>
<h4 class="subsection">A.1.5 Sparc32 and Sparc64 emulation</h4>
<ul>
<li> Full SPARC V8 emulation, including privileged
instructions, FPU and MMU. SPARC V9 emulation includes most privileged
and VIS instructions, FPU and I/D MMU. Alignment is fully enforced.
</li><li> Can run most 32-bit SPARC Linux binaries, SPARC32PLUS Linux binaries and
some 64-bit SPARC Linux binaries.
</li></ul>
<p>Current QEMU limitations:
</p>
<ul>
<li> IPC syscalls are missing.
</li><li> Floating point exception support is buggy.
</li><li> Atomic instructions are not correctly implemented.
</li><li> There are still some problems with Sparc64 emulators.
</li></ul>
<hr>
<a name="Xtensa"></a>
<a name="Xtensa-emulation"></a>
<h4 class="subsection">A.1.6 Xtensa emulation</h4>
<ul>
<li> Core Xtensa ISA emulation, including most options: code density,
loop, extended L32R, 16- and 32-bit multiplication, 32-bit division,
MAC16, miscellaneous operations, boolean, FP coprocessor, coprocessor
context, debug, multiprocessor synchronization,
conditional store, exceptions, relocatable vectors, unaligned exception,
interrupts (including high priority and timer), hardware alignment,
region protection, region translation, MMU, windowed registers, thread
pointer, processor ID.
</li><li> Not implemented options: data/instruction cache (including cache
prefetch and locking), XLMI, processor interface. Also options not
covered by the core ISA (e.g. FLIX, wide branches) are not implemented.
</li><li> Can run most Xtensa Linux binaries.
</li><li> New core configuration that requires no additional instructions
may be created from overlay with minimal amount of hand-written code.
</li></ul>
<hr>
<a name="Translator-Internals"></a>
<a name="Translator-Internals-1"></a>
<h3 class="section">A.2 Translator Internals</h3>
<p>QEMU is a dynamic translator. When it first encounters a piece of code,
it converts it to the host instruction set. Usually dynamic translators
are very complicated and highly CPU dependent. QEMU uses some tricks
which make it relatively easily portable and simple while achieving good
performances.
</p>
<p>QEMU&rsquo;s dynamic translation backend is called TCG, for &quot;Tiny Code
Generator&quot;. For more information, please take a look at <code>tcg/README</code>.
</p>
<p>Some notable features of QEMU&rsquo;s dynamic translator are:
</p>
<dl compact="compact">
<dt><strong>CPU state optimisations:</strong></dt>
<dd><p>The target CPUs have many internal states which change the way it
evaluates instructions. In order to achieve a good speed, the
translation phase considers that some state information of the virtual
CPU cannot change in it. The state is recorded in the Translation
Block (TB). If the state changes (e.g. privilege level), a new TB will
be generated and the previous TB won&rsquo;t be used anymore until the state
matches the state recorded in the previous TB. The same idea can be applied
to other aspects of the CPU state. For example, on x86, if the SS,
DS and ES segments have a zero base, then the translator does not even
generate an addition for the segment base.
</p>
</dd>
<dt><strong>Direct block chaining:</strong></dt>
<dd><p>After each translated basic block is executed, QEMU uses the simulated
Program Counter (PC) and other cpu state information (such as the CS
segment base value) to find the next basic block.
</p>
<p>In order to accelerate the most common cases where the new simulated PC
is known, QEMU can patch a basic block so that it jumps directly to the
next one.
</p>
<p>The most portable code uses an indirect jump. An indirect jump makes
it easier to make the jump target modification atomic. On some host
architectures (such as x86 or PowerPC), the <code>JUMP</code> opcode is
directly patched so that the block chaining has no overhead.
</p>
</dd>
<dt><strong>Self-modifying code and translated code invalidation:</strong></dt>
<dd><p>Self-modifying code is a special challenge in x86 emulation because no
instruction cache invalidation is signaled by the application when code
is modified.
</p>
<p>User-mode emulation marks a host page as write-protected (if it is
not already read-only) every time translated code is generated for a
basic block. Then, if a write access is done to the page, Linux raises
a SEGV signal. QEMU then invalidates all the translated code in the page
and enables write accesses to the page. For system emulation, write
protection is achieved through the software MMU.
</p>
<p>Correct translated code invalidation is done efficiently by maintaining
a linked list of every translated block contained in a given page. Other
linked lists are also maintained to undo direct block chaining.
</p>
<p>On RISC targets, correctly written software uses memory barriers and
cache flushes, so some of the protection above would not be
necessary. However, QEMU still requires that the generated code always
matches the target instructions in memory in order to handle
exceptions correctly.
</p>
</dd>
<dt><strong>Exception support:</strong></dt>
<dd><p>longjmp() is used when an exception such as division by zero is
encountered.
</p>
<p>The host SIGSEGV and SIGBUS signal handlers are used to get invalid
memory accesses. QEMU keeps a map from host program counter to
target program counter, and looks up where the exception happened
based on the host program counter at the exception point.
</p>
<p>On some targets, some bits of the virtual CPU&rsquo;s state are not flushed to the
memory until the end of the translation block. This is done for internal
emulation state that is rarely accessed directly by the program and/or changes
very often throughout the execution of a translation block&mdash;this includes
condition codes on x86, delay slots on SPARC, conditional execution on
ARM, and so on. This state is stored for each target instruction, and
looked up on exceptions.
</p>
</dd>
<dt><strong>MMU emulation:</strong></dt>
<dd><p>For system emulation QEMU uses a software MMU. In that mode, the MMU
virtual to physical address translation is done at every memory
access.
</p>
<p>QEMU uses an address translation cache (TLB) to speed up the translation.
In order to avoid flushing the translated code each time the MMU
mappings change, all caches in QEMU are physically indexed. This
means that each basic block is indexed with its physical address.
</p>
<p>In order to avoid invalidating the basic block chain when MMU mappings
change, chaining is only performed when the destination of the jump
shares a page with the basic block that is performing the jump.
</p>
<p>The MMU can also distinguish RAM and ROM memory areas from MMIO memory
areas. Access is faster for RAM and ROM because the translation cache also
hosts the offset between guest address and host memory. Accessing MMIO
memory areas instead calls out to C code for device emulation.
Finally, the MMU helps tracking dirty pages and pages pointed to by
translation blocks.
</p></dd>
</dl>
<hr>
<a name="QEMU-compared-to-other-emulators"></a>
<a name="QEMU-compared-to-other-emulators-1"></a>
<h3 class="section">A.3 QEMU compared to other emulators</h3>
<p>Like bochs [1], QEMU emulates an x86 CPU. But QEMU is much faster than
bochs as it uses dynamic compilation. Bochs is closely tied to x86 PC
emulation while QEMU can emulate several processors.
</p>
<p>Like Valgrind [2], QEMU does user space emulation and dynamic
translation. Valgrind is mainly a memory debugger while QEMU has no
support for it (QEMU could be used to detect out of bound memory
accesses as Valgrind, but it has no support to track uninitialised data
as Valgrind does). The Valgrind dynamic translator generates better code
than QEMU (in particular it does register allocation) but it is closely
tied to an x86 host and target and has no support for precise exceptions
and system emulation.
</p>
<p>EM86 [3] is the closest project to user space QEMU (and QEMU still uses
some of its code, in particular the ELF file loader). EM86 was limited
to an alpha host and used a proprietary and slow interpreter (the
interpreter part of the FX!32 Digital Win32 code translator [4]).
</p>
<p>TWIN from Willows Software was a Windows API emulator like Wine. It is less
accurate than Wine but includes a protected mode x86 interpreter to launch
x86 Windows executables. Such an approach has greater potential because most
of the Windows API is executed natively but it is far more difficult to
develop because all the data structures and function parameters exchanged
between the API and the x86 code must be converted.
</p>
<p>User mode Linux [5] was the only solution before QEMU to launch a
Linux kernel as a process while not needing any host kernel
patches. However, user mode Linux requires heavy kernel patches while
QEMU accepts unpatched Linux kernels. The price to pay is that QEMU is
slower.
</p>
<p>The Plex86 [6] PC virtualizer is done in the same spirit as the now
obsolete qemu-fast system emulator. It requires a patched Linux kernel
to work (you cannot launch the same kernel on your PC), but the
patches are really small. As it is a PC virtualizer (no emulation is
done except for some privileged instructions), it has the potential of
being faster than QEMU. The downside is that a complicated (and
potentially unsafe) host kernel patch is needed.
</p>
<p>The commercial PC Virtualizers (VMWare [7], VirtualPC [8]) are faster
than QEMU (without virtualization), but they all need specific, proprietary
and potentially unsafe host drivers. Moreover, they are unable to
provide cycle exact simulation as an emulator can.
</p>
<p>VirtualBox [9], Xen [10] and KVM [11] are based on QEMU. QEMU-SystemC
[12] uses QEMU to simulate a system where some hardware devices are
developed in SystemC.
</p>
<hr>
<a name="Managed-start-up-options"></a>
<a name="Managed-start-up-options-1"></a>
<h3 class="section">A.4 Managed start up options</h3>
<p>In system mode emulation, it&rsquo;s possible to create a VM in a paused state using
the -S command line option. In this state the machine is completely initialized
according to command line options and ready to execute VM code but VCPU threads
are not executing any code. The VM state in this paused state depends on the way
QEMU was started. It could be in:
</p><dl compact="compact">
<dt>initial state (after reset/power on state)</dt>
<dt>with direct kernel loading, the initial state could be amended to execute</dt>
<dd><p>code loaded by QEMU in the VM&rsquo;s RAM and with incoming migration
</p></dd>
<dt>with incoming migration, initial state will by amended with the migrated</dt>
<dd><p>machine state after migration completes.
</p></dd>
</dl>
<p>This paused state is typically used by users to query machine state and/or
additionally configure the machine (by hotplugging devices) in runtime before
allowing VM code to run.
</p>
<p>However, at the -S pause point, it&rsquo;s impossible to configure options that affect
initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. The
experimental &ndash;preconfig command line option allows pausing QEMU
before the initial VM creation, in a &ldquo;preconfig&rdquo; state, where additional
queries and configuration can be performed via QMP before moving on to
the resulting configuration startup. In the preconfig state, QEMU only allows
a limited set of commands over the QMP monitor, where the commands do not
depend on an initialized machine, including but not limited to:
</p><dl compact="compact">
<dt>qmp_capabilities</dt>
<dt>query-qmp-schema</dt>
<dt>query-commands</dt>
<dt>query-status</dt>
<dt>x-exit-preconfig</dt>
</dl>
<hr>
<a name="Bibliography"></a>
<a name="Bibliography-1"></a>
<h3 class="section">A.5 Bibliography</h3>
<dl compact="compact">
<dt>[1]</dt>
<dd><p><a href="http://bochs.sourceforge.net/">http://bochs.sourceforge.net/</a>, the Bochs IA-32 Emulator Project,
by Kevin Lawton et al.
</p>
</dd>
<dt>[2]</dt>
<dd><p><a href="http://www.valgrind.org/">http://www.valgrind.org/</a>, Valgrind, an open-source memory debugger
for GNU/Linux.
</p>
</dd>
<dt>[3]</dt>
<dd><p><a href="http://ftp.dreamtime.org/pub/linux/Linux-Alpha/em86/v0.2/docs/em86.html">http://ftp.dreamtime.org/pub/linux/Linux-Alpha/em86/v0.2/docs/em86.html</a>,
the EM86 x86 emulator on Alpha-Linux.
</p>
</dd>
<dt>[4]</dt>
<dd><p><a href="http://www.usenix.org/publications/library/proceedings/usenix-nt97/full_papers/chernoff/chernoff.pdf">http://www.usenix.org/publications/library/proceedings/usenix-nt97/full_papers/chernoff/chernoff.pdf</a>,
DIGITAL FX!32: Running 32-Bit x86 Applications on Alpha NT, by Anton
Chernoff and Ray Hookway.
</p>
</dd>
<dt>[5]</dt>
<dd><p><a href="http://user-mode-linux.sourceforge.net/">http://user-mode-linux.sourceforge.net/</a>,
The User-mode Linux Kernel.
</p>
</dd>
<dt>[6]</dt>
<dd><p><a href="http://www.plex86.org/">http://www.plex86.org/</a>,
The new Plex86 project.
</p>
</dd>
<dt>[7]</dt>
<dd><p><a href="http://www.vmware.com/">http://www.vmware.com/</a>,
The VMWare PC virtualizer.
</p>
</dd>
<dt>[8]</dt>
<dd><p><a href="https://www.microsoft.com/download/details.aspx?id=3702">https://www.microsoft.com/download/details.aspx?id=3702</a>,
The VirtualPC PC virtualizer.
</p>
</dd>
<dt>[9]</dt>
<dd><p><a href="http://virtualbox.org/">http://virtualbox.org/</a>,
The VirtualBox PC virtualizer.
</p>
</dd>
<dt>[10]</dt>
<dd><p><a href="http://www.xen.org/">http://www.xen.org/</a>,
The Xen hypervisor.
</p>
</dd>
<dt>[11]</dt>
<dd><p><a href="http://www.linux-kvm.org/">http://www.linux-kvm.org/</a>,
Kernel Based Virtual Machine (KVM).
</p>
</dd>
<dt>[12]</dt>
<dd><p><a href="http://www.greensocs.com/projects/QEMUSystemC">http://www.greensocs.com/projects/QEMUSystemC</a>,
QEMU-SystemC, a hardware co-simulator.
</p>
</dd>
</dl>
<hr>
<a name="Deprecated-features"></a>
<a name="Deprecated-features-1"></a>
<h2 class="appendix">Appendix B Deprecated features</h2>
<p>In general features are intended to be supported indefinitely once
introduced into QEMU. In the event that a feature needs to be removed,
it will be listed in this appendix. The feature will remain functional
for 2 releases prior to actual removal. Deprecated features may also
generate warnings on the console when QEMU starts up, or if activated
via a monitor command, however, this is not a mandatory requirement.
</p>
<p>Prior to the 2.10.0 release there was no official policy on how
long features would be deprecated prior to their removal, nor
any documented list of which features were deprecated. Thus
any features deprecated prior to 2.10.0 will be treated as if
they were first deprecated in the 2.10.0 release.
</p>
<p>What follows is a list of all features currently marked as
deprecated.
</p>
<a name="Build-options"></a>
<h3 class="section">B.1 Build options</h3>
<a name="GTK-2_002ex"></a>
<h4 class="subsection">B.1.1 GTK 2.x</h4>
<p>Previously QEMU has supported building against both GTK 2.x
and 3.x series APIs. Support for the GTK 2.x builds will be
discontinued, so maintainers should switch to using GTK 3.x,
which is the default.
</p>
<a name="SDL-1_002e2"></a>
<h4 class="subsection">B.1.2 SDL 1.2</h4>
<p>Previously QEMU has supported building against both SDL 1.2
and 2.0 series APIs. Support for the SDL 1.2 builds will be
discontinued, so maintainers should switch to using SDL 2.0,
which is the default.
</p>
<a name="System-emulator-command-line-arguments"></a>
<h3 class="section">B.2 System emulator command line arguments</h3>
<a name="g_t_002dno_002dkvm-_0028since-1_002e3_002e0_0029"></a>
<h4 class="subsection">B.2.1 -no-kvm (since 1.3.0)</h4>
<p>The &ldquo;-no-kvm&rdquo; argument is now a synonym for setting
&ldquo;-machine accel=tcg&rdquo;.
</p>
<a name="g_t_002dvnc-tls-_0028since-2_002e5_002e0_0029"></a>
<h4 class="subsection">B.2.2 -vnc tls (since 2.5.0)</h4>
<p>The &ldquo;-vnc tls&rdquo; argument is now a synonym for setting
&ldquo;-object tls-creds-anon,id=tls0&rdquo; combined with
&ldquo;-vnc tls-creds=tls0&rsquo;
</p>
<a name="g_t_002dvnc-x509-_0028since-2_002e5_002e0_0029"></a>
<h4 class="subsection">B.2.3 -vnc x509 (since 2.5.0)</h4>
<p>The &ldquo;-vnc x509=/path/to/certs&rdquo; argument is now a
synonym for setting
&ldquo;-object tls-creds-x509,dir=/path/to/certs,id=tls0,verify-peer=no&rdquo;
combined with &ldquo;-vnc tls-creds=tls0&rsquo;
</p>
<a name="g_t_002dvnc-x509verify-_0028since-2_002e5_002e0_0029"></a>
<h4 class="subsection">B.2.4 -vnc x509verify (since 2.5.0)</h4>
<p>The &ldquo;-vnc x509verify=/path/to/certs&rdquo; argument is now a
synonym for setting
&ldquo;-object tls-creds-x509,dir=/path/to/certs,id=tls0,verify-peer=yes&rdquo;
combined with &ldquo;-vnc tls-creds=tls0&rsquo;
</p>
<a name="g_t_002dtftp-_0028since-2_002e6_002e0_0029"></a>
<h4 class="subsection">B.2.5 -tftp (since 2.6.0)</h4>
<p>The &ldquo;-tftp /some/dir&rdquo; argument is replaced by either
&ldquo;-netdev user,id=x,tftp=/some/dir &rdquo; (for pluggable NICs, accompanied
with &ldquo;-device ...,netdev=x&rdquo;), or &ldquo;-nic user,tftp=/some/dir&rdquo;
(for embedded NICs). The new syntax allows different settings to be
provided per NIC.
</p>
<a name="g_t_002dbootp-_0028since-2_002e6_002e0_0029"></a>
<h4 class="subsection">B.2.6 -bootp (since 2.6.0)</h4>
<p>The &ldquo;-bootp /some/file&rdquo; argument is replaced by either
&ldquo;-netdev user,id=x,bootp=/some/file &rdquo; (for pluggable NICs, accompanied
with &ldquo;-device ...,netdev=x&rdquo;), or &ldquo;-nic user,bootp=/some/file&rdquo;
(for embedded NICs). The new syntax allows different settings to be
provided per NIC.
</p>
<a name="g_t_002dredir-_0028since-2_002e6_002e0_0029"></a>
<h4 class="subsection">B.2.7 -redir (since 2.6.0)</h4>
<p>The &ldquo;-redir [tcp|udp]:hostport:[guestaddr]:guestport&rdquo; argument is
replaced by either
&ldquo;-netdev user,id=x,hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport&rdquo;
(for pluggable NICs, accompanied with &ldquo;-device ...,netdev=x&rdquo;) or
&ldquo;-nic user,hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport&rdquo;
(for embedded NICs). The new syntax allows different settings to be
provided per NIC.
</p>
<a name="g_t_002dsmb-_0028since-2_002e6_002e0_0029"></a>
<h4 class="subsection">B.2.8 -smb (since 2.6.0)</h4>
<p>The &ldquo;-smb /some/dir&rdquo; argument is replaced by either
&ldquo;-netdev user,id=x,smb=/some/dir &rdquo; (for pluggable NICs, accompanied
with &ldquo;-device ...,netdev=x&rdquo;), or &ldquo;-nic user,smb=/some/dir&rdquo;
(for embedded NICs). The new syntax allows different settings to be
provided per NIC.
</p>
<a name="g_t_002ddrive-cyls_003d_002e_002e_002e_002cheads_003d_002e_002e_002e_002csecs_003d_002e_002e_002e_002ctrans_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029"></a>
<h4 class="subsection">B.2.9 -drive cyls=...,heads=...,secs=...,trans=... (since 2.10.0)</h4>
<p>The drive geometry arguments are replaced by the the geometry arguments
that can be specified with the &ldquo;-device&rdquo; parameter.
</p>
<a name="g_t_002ddrive-serial_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029"></a>
<h4 class="subsection">B.2.10 -drive serial=... (since 2.10.0)</h4>
<p>The drive serial argument is replaced by the the serial argument
that can be specified with the &ldquo;-device&rdquo; parameter.
</p>
<a name="g_t_002ddrive-addr_003d_002e_002e_002e-_0028since-2_002e10_002e0_0029"></a>
<h4 class="subsection">B.2.11 -drive addr=... (since 2.10.0)</h4>
<p>The drive addr argument is replaced by the the addr argument
that can be specified with the &ldquo;-device&rdquo; parameter.
</p>
<a name="g_t_002dusbdevice-_0028since-2_002e10_002e0_0029"></a>
<h4 class="subsection">B.2.12 -usbdevice (since 2.10.0)</h4>
<p>The &ldquo;-usbdevice DEV&rdquo; argument is now a synonym for setting
the &ldquo;-device usb-DEV&rdquo; argument instead. The deprecated syntax
would automatically enable USB support on the machine type.
If using the new syntax, USB support must be explicitly
enabled via the &ldquo;-machine usb=on&rdquo; argument.
</p>
<a name="g_t_002dnodefconfig-_0028since-2_002e11_002e0_0029"></a>
<h4 class="subsection">B.2.13 -nodefconfig (since 2.11.0)</h4>
<p>The &ldquo;-nodefconfig&ldquo; argument is a synonym for &ldquo;-no-user-config&ldquo;.
</p>
<a name="g_t_002dballoon-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.2.14 -balloon (since 2.12.0)</h4>
<p>The <samp>--balloon virtio</samp> argument has been superseded by
<samp>--device virtio-balloon</samp>.
</p>
<a name="g_t_002dmachine-s390_002dsquash_002dmcss_003don_007coff-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.2.15 -machine s390-squash-mcss=on|off (since 2.12.0)</h4>
<p>The &ldquo;s390-squash-mcss=on&ldquo; property has been obsoleted by allowing the
cssid to be chosen freely. Instead of squashing subchannels into the
default channel subsystem image for guests that do not support multiple
channel subsystems, all devices can be put into the default channel
subsystem image.
</p>
<a name="g_t_002dfsdev-handle-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.2.16 -fsdev handle (since 2.12.0)</h4>
<p>The &ldquo;handle&rdquo; fsdev backend does not support symlinks and causes the 9p
filesystem in the guest to fail a fair amount of tests from the PJD POSIX
filesystem test suite. Also it requires the CAP_DAC_READ_SEARCH capability,
which is not the recommended way to run QEMU. This backend should not be
used and it will be removed with no replacement.
</p>
<a name="g_t_002dno_002dframe-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.2.17 -no-frame (since 2.12.0)</h4>
<p>The <code>--no-frame</code> argument works with SDL 1.2 only. The other user
interfaces never implemented this in the first place. So this will be
removed together with SDL 1.2 support.
</p>
<a name="g_t_002drtc_002dtd_002dhack-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.2.18 -rtc-td-hack (since 2.12.0)</h4>
<p>The <code>-rtc-td-hack</code> option has been replaced by
<code>-rtc driftfix=slew</code>.
</p>
<a name="g_t_002dlocaltime-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.2.19 -localtime (since 2.12.0)</h4>
<p>The <code>-localtime</code> option has been replaced by <code>-rtc base=localtime</code>.
</p>
<a name="g_t_002dstartdate-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.2.20 -startdate (since 2.12.0)</h4>
<p>The <code>-startdate</code> option has been replaced by <code>-rtc base=<var>date</var></code>.
</p>
<a name="g_t_002dvirtioconsole-_0028since-3_002e0_002e0_0029"></a>
<h4 class="subsection">B.2.21 -virtioconsole (since 3.0.0)</h4>
<p>Option <samp>-virtioconsole</samp> has been replaced by
<samp>-device virtconsole</samp>.
</p>
<a name="g_t_002dclock-_0028since-3_002e0_002e0_0029"></a>
<h4 class="subsection">B.2.22 -clock (since 3.0.0)</h4>
<p>The <code>-clock</code> option is ignored since QEMU version 1.7.0. There is no
replacement since it is not needed anymore.
</p>
<a name="g_t_002denable_002dhax-_0028since-3_002e0_002e0_0029"></a>
<h4 class="subsection">B.2.23 -enable-hax (since 3.0.0)</h4>
<p>The <samp>-enable-hax</samp> option has been replaced by <samp>-accel hax</samp>.
Both options have been introduced in QEMU version 2.9.0.
</p>
<a name="g_t_002ddrive-file_003djson_003a_007b_002e_002e_002e_007b_0027driver_0027_003a_0027file_0027_007d_007d-_0028since-3_002e0_0029"></a>
<h4 class="subsection">B.2.24 -drive file=json:{...{&rsquo;driver&rsquo;:&rsquo;file&rsquo;}} (since 3.0)</h4>
<p>The &rsquo;file&rsquo; driver for drives is no longer appropriate for character or host
devices and will only accept regular files (S_IFREG). The correct driver
for these file types is &rsquo;host_cdrom&rsquo; or &rsquo;host_device&rsquo; as appropriate.
</p>
<a name="QEMU-Machine-Protocol-_0028QMP_0029-commands"></a>
<h3 class="section">B.3 QEMU Machine Protocol (QMP) commands</h3>
<a name="block_002ddirty_002dbitmap_002dadd-_0022autoload_0022-parameter-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.3.1 block-dirty-bitmap-add &quot;autoload&quot; parameter (since 2.12.0)</h4>
<p>&quot;autoload&quot; parameter is now ignored. All bitmaps are automatically loaded
from qcow2 images.
</p>
<a name="query_002dcpus-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.3.2 query-cpus (since 2.12.0)</h4>
<p>The &ldquo;query-cpus&rdquo; command is replaced by the &ldquo;query-cpus-fast&rdquo; command.
</p>
<a name="query_002dcpus_002dfast-_0022arch_0022-output-member-_0028since-3_002e0_002e0_0029"></a>
<h4 class="subsection">B.3.3 query-cpus-fast &quot;arch&quot; output member (since 3.0.0)</h4>
<p>The &ldquo;arch&rdquo; output member of the &ldquo;query-cpus-fast&rdquo; command is
replaced by the &ldquo;target&rdquo; output member.
</p>
<a name="System-emulator-devices"></a>
<h3 class="section">B.4 System emulator devices</h3>
<a name="ivshmem-_0028since-2_002e6_002e0_0029"></a>
<h4 class="subsection">B.4.1 ivshmem (since 2.6.0)</h4>
<p>The &ldquo;ivshmem&rdquo; device type is replaced by either the &ldquo;ivshmem-plain&rdquo;
or &ldquo;ivshmem-doorbell&ldquo; device types.
</p>
<a name="Page-size-support-_003c-4k-for-embedded-PowerPC-CPUs-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsection">B.4.2 Page size support &lt; 4k for embedded PowerPC CPUs (since 2.12.0)</h4>
<p>qemu-system-ppcemb will be removed. qemu-system-ppc (or qemu-system-ppc64)
should be used instead. That means that embedded 4xx PowerPC CPUs will not
support page sizes &lt; 4096 any longer.
</p>
<a name="System-emulator-machines"></a>
<h3 class="section">B.5 System emulator machines</h3>
<a name="pc_002d0_002e10-and-pc_002d0_002e11-_0028since-3_002e0_0029"></a>
<h4 class="subsection">B.5.1 pc-0.10 and pc-0.11 (since 3.0)</h4>
<p>These machine types are very old and likely can not be used for live migration
from old QEMU versions anymore. A newer machine type should be used instead.
</p>
<a name="Device-options"></a>
<h3 class="section">B.6 Device options</h3>
<a name="Block-device-options-1"></a>
<h4 class="subsection">B.6.1 Block device options</h4>
<a name="g_t_0022backing_0022_003a-_0022_0022-_0028since-2_002e12_002e0_0029"></a>
<h4 class="subsubsection">B.6.1.1 &quot;backing&quot;: &quot;&quot; (since 2.12.0)</h4>
<p>In order to prevent QEMU from automatically opening an image&rsquo;s backing
chain, use &ldquo;&quot;backing&quot;: null&rdquo; instead.
</p>
<a name="vio_002dspapr_002ddevice-device-options"></a>
<h4 class="subsection">B.6.2 vio-spapr-device device options</h4>
<a name="g_t_0022irq_0022_003a-_0022_0022-_0028since-3_002e0_002e0_0029"></a>
<h4 class="subsubsection">B.6.2.1 &quot;irq&quot;: &quot;&quot; (since 3.0.0)</h4>
<p>The &ldquo;irq&rdquo; property is obsoleted.
</p>
<hr>
<a name="Supported-build-platforms"></a>
<a name="Supported-build-platforms-1"></a>
<h2 class="appendix">Appendix C Supported build platforms</h2>
<p>QEMU aims to support building and executing on multiple host OS platforms.
This appendix outlines which platforms are the major build targets. These
platforms are used as the basis for deciding upon the minimum required
versions of 3rd party software QEMU depends on. The supported platforms
are the targets for automated testing performed by the project when patches
are submitted for review, and tested before and after merge.
</p>
<p>If a platform is not listed here, it does not imply that QEMU won&rsquo;t work.
If an unlisted platform has comparable software versions to a listed platform,
there is every expectation that it will work. Bug reports are welcome for
problems encountered on unlisted platforms unless they are clearly older
vintage than what is described here.
</p>
<p>Note that when considering software versions shipped in distros as support
targets, QEMU considers only the version number, and assumes the features in
that distro match the upstream release with the same version. In other words,
if a distro backports extra features to the software in their distro, QEMU
upstream code will not add explicit support for those backports, unless the
feature is auto-detectable in a manner that works for the upstream releases
too.
</p>
<p>The Repology site <a href="https://repology.org">https://repology.org</a> is a useful resource to identify
currently shipped versions of software in various operating systems, though
it does not cover all distros listed below.
</p>
<a name="Linux-OS"></a>
<h3 class="section">C.1 Linux OS</h3>
<p>For distributions with frequent, short-lifetime releases, the project will
aim to support all versions that are not end of life by their respective
vendors. For the purposes of identifying supported software versions, the
project will look at Fedora, Ubuntu, and openSUSE distros. Other short-
lifetime distros will be assumed to ship similar software versions.
</p>
<p>For distributions with long-lifetime releases, the project will aim to support
the most recent major version at all times. Support for the previous major
version will be dropped 2 years after the new major version is released. For
the purposes of identifying supported software versions, the project will look
at RHEL, Debian, Ubuntu LTS, and SLES distros. Other long-lifetime distros will
be assumed to ship similar software versions.
</p>
<a name="Windows-2"></a>
<h3 class="section">C.2 Windows</h3>
<p>The project supports building with current versions of the MinGW toolchain,
hosted on Linux.
</p>
<a name="macOS"></a>
<h3 class="section">C.3 macOS</h3>
<p>The project supports building with the two most recent versions of macOS, with
the current homebrew package set available.
</p>
<a name="FreeBSD"></a>
<h3 class="section">C.4 FreeBSD</h3>
<p>The project aims to support the all the versions which are not end of life.
</p>
<a name="NetBSD"></a>
<h3 class="section">C.5 NetBSD</h3>
<p>The project aims to support the most recent major version at all times. Support
for the previous major version will be dropped 2 years after the new major
version is released.
</p>
<a name="OpenBSD"></a>
<h3 class="section">C.6 OpenBSD</h3>
<p>The project aims to support the all the versions which are not end of life.
</p>
<hr>
<a name="License"></a>
<a name="License-1"></a>
<h2 class="appendix">Appendix D License</h2>
<p>QEMU is a trademark of Fabrice Bellard.
</p>
<p>QEMU is released under the
<a href="https://www.gnu.org/licenses/gpl-2.0.txt">GNU General Public License</a>,
version 2. Parts of QEMU have specific licenses, see file
<a href="https://git.qemu.org/?p=qemu.git;a=blob_plain;f=LICENSE">LICENSE</a>.
</p>
<hr>
<a name="Index"></a>
<a name="Index-1"></a>
<h2 class="appendix">Appendix E Index</h2>
<hr>
<a name="Concept-Index"></a>
<a name="Concept-Index-1"></a>
<h3 class="section">E.1 Concept Index</h3>
<p>This is the main index. Should we combine all keywords in one index? TODO
</p><table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Concept-Index_cp_letter-O"><b>O</b></a>
&nbsp;
<a class="summary-letter" href="#Concept-Index_cp_letter-Q"><b>Q</b></a>
&nbsp;
<a class="summary-letter" href="#Concept-Index_cp_letter-S"><b>S</b></a>
&nbsp;
<a class="summary-letter" href="#Concept-Index_cp_letter-U"><b>U</b></a>
&nbsp;
</td></tr></table>
<table class="index-cp" border="0">
<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Concept-Index_cp_letter-O">O</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-operating-modes">operating modes</a>:</td><td>&nbsp;</td><td valign="top"><a href="#intro_005ffeatures">intro_features</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Concept-Index_cp_letter-Q">Q</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-QEMU-monitor">QEMU monitor</a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-quick-start">quick start</a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fquickstart">pcsys_quickstart</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Concept-Index_cp_letter-S">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation">system emulation</a>:</td><td>&nbsp;</td><td valign="top"><a href="#intro_005ffeatures">intro_features</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028ARM_0029">system emulation (ARM)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ARM-System-emulator">ARM System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028ColdFire_0029">system emulation (ColdFire)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ColdFire-System-emulator">ColdFire System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028Cris_0029">system emulation (Cris)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Cris-System-emulator">Cris System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028M68K_0029">system emulation (M68K)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#ColdFire-System-emulator">ColdFire System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028Microblaze_0029">system emulation (Microblaze)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Microblaze-System-emulator">Microblaze System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028MIPS_0029">system emulation (MIPS)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#MIPS-System-emulator">MIPS System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028PC_0029">system emulation (PC)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#QEMU-PC-System-emulator">QEMU PC System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028PowerPC_0029">system emulation (PowerPC)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#PowerPC-System-emulator">PowerPC System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028SH4_0029">system emulation (SH4)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#SH4-System-emulator">SH4 System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028Sparc32_0029">system emulation (Sparc32)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Sparc32-System-emulator">Sparc32 System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028Sparc64_0029">system emulation (Sparc64)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Sparc64-System-emulator">Sparc64 System emulator</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system-emulation-_0028Xtensa_0029">system emulation (Xtensa)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Xtensa-System-emulator">Xtensa System emulator</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Concept-Index_cp_letter-U">U</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028Alpha_0029">user mode (Alpha)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028ARM_0029">user mode (ARM)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028ARM_0029-1">user mode (ARM)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028ColdFire_0029">user mode (ColdFire)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028Cris_0029">user mode (Cris)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028i386_0029">user mode (i386)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028M68K_0029">user mode (M68K)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028Microblaze_0029">user mode (Microblaze)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028MIPS_0029">user mode (MIPS)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028NiosII_0029">user mode (NiosII)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028PowerPC_0029">user mode (PowerPC)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028SH4_0029">user mode (SH4)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-_0028SPARC_0029">user mode (SPARC)</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Other-binaries">Other binaries</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-user-mode-emulation">user mode emulation</a>:</td><td>&nbsp;</td><td valign="top"><a href="#intro_005ffeatures">intro_features</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Concept-Index_cp_letter-O"><b>O</b></a>
&nbsp;
<a class="summary-letter" href="#Concept-Index_cp_letter-Q"><b>Q</b></a>
&nbsp;
<a class="summary-letter" href="#Concept-Index_cp_letter-S"><b>S</b></a>
&nbsp;
<a class="summary-letter" href="#Concept-Index_cp_letter-U"><b>U</b></a>
&nbsp;
</td></tr></table>
<hr>
<a name="Function-Index"></a>
<a name="Function-Index-1"></a>
<h3 class="section">E.2 Function Index</h3>
<p>This index could be used for command line options and monitor functions.
</p><table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Function-Index_fn_symbol-1"><b>-</b></a>
&nbsp;
<br>
<a class="summary-letter" href="#Function-Index_fn_letter-A"><b>A</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-B"><b>B</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-C"><b>C</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-D"><b>D</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-E"><b>E</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-G"><b>G</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-H"><b>H</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-I"><b>I</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-L"><b>L</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-M"><b>M</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-N"><b>N</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-O"><b>O</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-P"><b>P</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-Q"><b>Q</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-R"><b>R</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-S"><b>S</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-T"><b>T</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-W"><b>W</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-X"><b>X</b></a>
&nbsp;
</td></tr></table>
<table class="index-fn" border="0">
<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_symbol-1">-</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002d_002dpreconfig"><code>--preconfig</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002d_002dtrace"><code>--trace</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#qemu_005fimg_005finvocation">qemu_img_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002d_002dtrace-1"><code>--trace</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#qemu_005fnbd_005finvocation">qemu_nbd_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002daccel"><code>-accel</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dacpitable"><code>-acpitable</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dadd_002dfd"><code>-add-fd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dalt_002dgrab"><code>-alt-grab</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dappend"><code>-append</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002daudio_002dhelp"><code>-audio-help</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dballoon"><code>-balloon</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dbios"><code>-bios</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dblockdev"><code>-blockdev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dboot"><code>-boot</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dbt"><code>-bt</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dcdrom"><code>-cdrom</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dchardev"><code>-chardev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dchroot"><code>-chroot</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dcpu"><code>-cpu</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dctrl_002dgrab"><code>-ctrl-grab</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dcurses"><code>-curses</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dd"><code>-d</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dD"><code>-D</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddaemonize"><code>-daemonize</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddebugcon"><code>-debugcon</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddevice"><code>-device</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddfilter"><code>-dfilter</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddisplay"><code>-display</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddrive"><code>-drive</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddtb"><code>-dtb</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ddump_002dvmstate"><code>-dump-vmstate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dechr"><code>-echr</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002denable_002dfips"><code>-enable-fips</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002denable_002dhax"><code>-enable-hax</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002denable_002dkvm"><code>-enable-kvm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dfda"><code>-fda</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dfdb"><code>-fdb</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dfsdev"><code>-fsdev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dfull_002dscreen"><code>-full-screen</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dfw_005fcfg"><code>-fw_cfg</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dg"><code>-g</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dgdb"><code>-gdb</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dglobal"><code>-global</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dh"><code>-h</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dhda"><code>-hda</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dhdb"><code>-hdb</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dhdc"><code>-hdc</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dhdd"><code>-hdd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dicount"><code>-icount</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dincoming"><code>-incoming</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dinitrd"><code>-initrd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002discsi"><code>-iscsi</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dk"><code>-k</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dkernel"><code>-kernel</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dL"><code>-L</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dloadvm"><code>-loadvm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dm"><code>-m</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dmachine"><code>-machine</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dmem_002dpath"><code>-mem-path</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dmem_002dprealloc"><code>-mem-prealloc</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dmon"><code>-mon</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dmonitor"><code>-monitor</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dmsg"><code>-msg</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dmtdblock"><code>-mtdblock</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dname"><code>-name</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dnet"><code>-net</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dnetdev"><code>-netdev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dnic"><code>-nic</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002dacpi"><code>-no-acpi</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002dfd_002dbootchk"><code>-no-fd-bootchk</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002dframe"><code>-no-frame</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002dhpet"><code>-no-hpet</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002dquit"><code>-no-quit</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002dreboot"><code>-no-reboot</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002dshutdown"><code>-no-shutdown</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dno_002duser_002dconfig"><code>-no-user-config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dnodefaults"><code>-nodefaults</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dnographic"><code>-nographic</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dnuma"><code>-numa</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dobject"><code>-object</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dold_002dparam-_0028ARM_0029"><code>-old-param (ARM)</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002donly_002dmigratable"><code>-only-migratable</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002doption_002drom"><code>-option-rom</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dovercommit"><code>-overcommit</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dparallel"><code>-parallel</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dpflash"><code>-pflash</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dpidfile"><code>-pidfile</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dportrait"><code>-portrait</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dprom_002denv"><code>-prom-env</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dqmp"><code>-qmp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dqmp_002dpretty"><code>-qmp-pretty</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dreadconfig"><code>-readconfig</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002drealtime"><code>-realtime</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002drotate"><code>-rotate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002drtc"><code>-rtc</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002drunas"><code>-runas</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dS"><code>-S</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002ds"><code>-s</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsandbox"><code>-sandbox</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsd"><code>-sd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsdl"><code>-sdl</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsemihosting"><code>-semihosting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsemihosting_002dconfig"><code>-semihosting-config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dserial"><code>-serial</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dset"><code>-set</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dshow_002dcursor"><code>-show-cursor</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsinglestep"><code>-singlestep</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsmbios"><code>-smbios</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsmp"><code>-smp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsnapshot"><code>-snapshot</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dsoundhw"><code>-soundhw</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dspice"><code>-spice</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dtb_002dsize"><code>-tb-size</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dtpmdev"><code>-tpmdev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dtrace"><code>-trace</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dtrace_002dunassigned"><code>-trace-unassigned</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dusb"><code>-usb</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dusbdevice"><code>-usbdevice</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002duuid"><code>-uuid</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dversion"><code>-version</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dvga"><code>-vga</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dvirtfs"><code>-virtfs</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dvirtfs_005fsynth"><code>-virtfs_synth</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dvirtioconsole"><code>-virtioconsole</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dvnc"><code>-vnc</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dwatchdog"><code>-watchdog</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dwatchdog_002daction"><code>-watchdog-action</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dwin2k_002dhack"><code>-win2k-hack</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dwriteconfig"><code>-writeconfig</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dxen_002dattach"><code>-xen-attach</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dxen_002dcreate"><code>-xen-create</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dxen_002ddomid"><code>-xen-domid</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002dxen_002ddomid_002drestrict"><code>-xen-domid-restrict</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#sec_005finvocation">sec_invocation</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-A">A</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-acl_005fadd"><code>acl_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-acl_005fpolicy"><code>acl_policy</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-acl_005fremove"><code>acl_remove</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-acl_005freset"><code>acl_reset</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-acl_005fshow"><code>acl_show</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-B">B</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-balloon"><code>balloon</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fjob_005fcancel"><code>block_job_cancel</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fjob_005fcomplete"><code>block_job_complete</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fjob_005fpause"><code>block_job_pause</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fjob_005fresume"><code>block_job_resume</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fjob_005fset_005fspeed"><code>block_job_set_speed</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fpasswd"><code>block_passwd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fresize"><code>block_resize</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fset_005fio_005fthrottle"><code>block_set_io_throttle</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-block_005fstream"><code>block_stream</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-boot_005fset"><code>boot_set</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-C">C</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-change"><code>change</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-chardev_002dadd"><code>chardev-add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-chardev_002dchange"><code>chardev-change</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-chardev_002dremove"><code>chardev-remove</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-chardev_002dsend_002dbreak"><code>chardev-send-break</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-client_005fmigrate_005finfo"><code>client_migrate_info</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-closefd"><code>closefd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-commit"><code>commit</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cont"><code>cont</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cpu"><code>cpu</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cpu_002dadd"><code>cpu-add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-D">D</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-delvm"><code>delvm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-device_005fadd"><code>device_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-device_005fdel"><code>device_del</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-drive_005fadd"><code>drive_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-drive_005fbackup"><code>drive_backup</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-drive_005fdel"><code>drive_del</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-drive_005fmirror"><code>drive_mirror</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-dump_002dguest_002dmemory"><code>dump-guest-memory</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-dump_002dskeys"><code>dump-skeys</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-E">E</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-eject"><code>eject</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-exit_005fpreconfig"><code>exit_preconfig</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-expire_005fpassword"><code>expire_password</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-G">G</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-gdbserver"><code>gdbserver</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-getfd"><code>getfd</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-gpa2hpa"><code>gpa2hpa</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-gpa2hva"><code>gpa2hva</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-H">H</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-help"><code>help</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-hostfwd_005fadd"><code>hostfwd_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-hostfwd_005fremove"><code>hostfwd_remove</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-I">I</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-i"><code>i</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info"><code>info</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-balloon"><code>info balloon</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-block"><code>info block</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-block_002djobs"><code>info block-jobs</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-blockstats"><code>info blockstats</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-capture"><code>info capture</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-chardev"><code>info chardev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-cmma"><code>info cmma</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-cpus"><code>info cpus</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-cpustats"><code>info cpustats</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-dump"><code>info dump</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-history"><code>info history</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-hotpluggable_002dcpus"><code>info hotpluggable-cpus</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-ioapic"><code>info ioapic</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-iothreads"><code>info iothreads</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-irq"><code>info irq</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-jit"><code>info jit</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-kvm"><code>info kvm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-lapic"><code>info lapic</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-mem"><code>info mem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-memdev"><code>info memdev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-memory_002ddevices"><code>info memory-devices</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-memory_005fsize_005fsummary"><code>info memory_size_summary</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-mice"><code>info mice</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-migrate"><code>info migrate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-migrate_005fcache_005fsize"><code>info migrate_cache_size</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-migrate_005fcapabilities"><code>info migrate_capabilities</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-migrate_005fparameters"><code>info migrate_parameters</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-mtree"><code>info mtree</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-name"><code>info name</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-network"><code>info network</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-numa"><code>info numa</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-opcount"><code>info opcount</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-pci"><code>info pci</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-pic"><code>info pic</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-profile"><code>info profile</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-qdm"><code>info qdm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-qom_002dtree"><code>info qom-tree</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-qtree"><code>info qtree</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-ramblock"><code>info ramblock</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-registers"><code>info registers</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-rocker"><code>info rocker</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-rocker_002dof_002ddpa_002dflows"><code>info rocker-of-dpa-flows</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-rocker_002dof_002ddpa_002dgroups"><code>info rocker-of-dpa-groups</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-rocker_002dports"><code>info rocker-ports</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-roms"><code>info roms</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-sev"><code>info sev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-skeys"><code>info skeys</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-snapshots"><code>info snapshots</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-spice"><code>info spice</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-status"><code>info status</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-tlb"><code>info tlb</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-tpm"><code>info tpm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-trace_002devents"><code>info trace-events</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-usb"><code>info usb</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-usbhost"><code>info usbhost</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-usernet"><code>info usernet</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-uuid"><code>info uuid</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-version"><code>info version</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-vm_002dgeneration_002did"><code>info vm-generation-id</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-info-vnc"><code>info vnc</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-L">L</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-loadvm"><code>loadvm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-log"><code>log</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-logfile"><code>logfile</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-M">M</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-mce-_0028x86_0029"><code>mce (x86)</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-memsave"><code>memsave</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate"><code>migrate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fcancel"><code>migrate_cancel</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fcontinue"><code>migrate_continue</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fincoming"><code>migrate_incoming</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fpause"><code>migrate_pause</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005frecover"><code>migrate_recover</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fset_005fcache_005fsize"><code>migrate_set_cache_size</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fset_005fcapability"><code>migrate_set_capability</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fset_005fdowntime"><code>migrate_set_downtime</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fset_005fparameter"><code>migrate_set_parameter</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fset_005fspeed"><code>migrate_set_speed</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migrate_005fstart_005fpostcopy"><code>migrate_start_postcopy</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-migration_005fmode"><code>migration_mode</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-mouse_005fbutton"><code>mouse_button</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-mouse_005fmove"><code>mouse_move</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-mouse_005fset"><code>mouse_set</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-N">N</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-nbd_005fserver_005fadd"><code>nbd_server_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-nbd_005fserver_005fremove"><code>nbd_server_remove</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-nbd_005fserver_005fstart"><code>nbd_server_start</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-nbd_005fserver_005fstop"><code>nbd_server_stop</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-netdev_005fadd"><code>netdev_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-netdev_005fdel"><code>netdev_del</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-nmi"><code>nmi</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-O">O</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-o"><code>o</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-object_005fadd"><code>object_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-object_005fdel"><code>object_del</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-P">P</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-pcie_005faer_005finject_005ferror"><code>pcie_aer_inject_error</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-pmemsave"><code>pmemsave</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-print"><code>print</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-Q">Q</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-qemu_002dio"><code>qemu-io</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-quit"><code>quit</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-R">R</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-ringbuf_005fread"><code>ringbuf_read</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-ringbuf_005fwrite"><code>ringbuf_write</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-S">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-savevm"><code>savevm</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-screendump"><code>screendump</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sendkey"><code>sendkey</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-set_005flink"><code>set_link</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-set_005fpassword"><code>set_password</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-singlestep"><code>singlestep</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-snapshot_005fblkdev"><code>snapshot_blkdev</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-snapshot_005fblkdev_005finternal"><code>snapshot_blkdev_internal</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-snapshot_005fdelete_005fblkdev_005finternal"><code>snapshot_delete_blkdev_internal</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-stop"><code>stop</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-stopcapture"><code>stopcapture</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-sum"><code>sum</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system_005fpowerdown"><code>system_powerdown</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system_005freset"><code>system_reset</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-system_005fwakeup"><code>system_wakeup</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-T">T</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-trace_002devent"><code>trace-event</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-trace_002dfile"><code>trace-file</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-W">W</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-watchdog_005faction"><code>watchdog_action</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-wavcapture"><code>wavcapture</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Function-Index_fn_letter-X">X</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-x"><code>x</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-xp"><code>xp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-x_005fcolo_005flost_005fheartbeat"><code>x_colo_lost_heartbeat</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fmonitor">pcsys_monitor</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Function-Index_fn_symbol-1"><b>-</b></a>
&nbsp;
<br>
<a class="summary-letter" href="#Function-Index_fn_letter-A"><b>A</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-B"><b>B</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-C"><b>C</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-D"><b>D</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-E"><b>E</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-G"><b>G</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-H"><b>H</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-I"><b>I</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-L"><b>L</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-M"><b>M</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-N"><b>N</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-O"><b>O</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-P"><b>P</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-Q"><b>Q</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-R"><b>R</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-S"><b>S</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-T"><b>T</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-W"><b>W</b></a>
&nbsp;
<a class="summary-letter" href="#Function-Index_fn_letter-X"><b>X</b></a>
&nbsp;
</td></tr></table>
<hr>
<a name="Keystroke-Index"></a>
<a name="Keystroke-Index-1"></a>
<h3 class="section">E.3 Keystroke Index</h3>
<p>This is a list of all keystrokes which have a special function
in system emulation.
</p>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Keystroke-Index_ky_letter-C"><b>C</b></a>
&nbsp;
</td></tr></table>
<table class="index-ky" border="0">
<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Keystroke-Index_ky_letter-C">C</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002da-b"><code>Ctrl-a b</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#mux_005fkeys">mux_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002da-c"><code>Ctrl-a c</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#mux_005fkeys">mux_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002da-Ctrl_002da"><code>Ctrl-a Ctrl-a</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#mux_005fkeys">mux_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002da-h"><code>Ctrl-a h</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#mux_005fkeys">mux_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002da-s"><code>Ctrl-a s</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#mux_005fkeys">mux_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002da-t"><code>Ctrl-a t</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#mux_005fkeys">mux_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002da-x"><code>Ctrl-a x</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#mux_005fkeys">mux_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dAlt"><code>Ctrl-Alt</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dAlt_002d_002b"><code>Ctrl-Alt-+</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dAlt_002d_002d"><code>Ctrl-Alt--</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dAlt_002df"><code>Ctrl-Alt-f</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dAlt_002dn"><code>Ctrl-Alt-n</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dAlt_002du"><code>Ctrl-Alt-u</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dDown"><code>Ctrl-Down</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dPageDown"><code>Ctrl-PageDown</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dPageUp"><code>Ctrl-PageUp</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Ctrl_002dUp"><code>Ctrl-Up</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#pcsys_005fkeys">pcsys_keys</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Keystroke-Index_ky_letter-C"><b>C</b></a>
&nbsp;
</td></tr></table>
<hr>
<a name="Program-Index"></a>
<a name="Program-Index-1"></a>
<h3 class="section">E.4 Program Index</h3>
<hr>
<a name="Data-Type-Index"></a>
<a name="Data-Type-Index-1"></a>
<h3 class="section">E.5 Data Type Index</h3>
<p>This index could be used for qdev device names and options.
</p>
<hr>
<a name="Variable-Index"></a>
<a name="Variable-Index-1"></a>
<h3 class="section">E.6 Variable Index</h3>
<hr>
</body>
</html>