QEMU Version 2.11.0 User Documentation I
Total Page:16
File Type:pdf, Size:1020Kb
QEMU version 2.11.0 User Documentation i Table of Contents 1 Introduction ::::::::::::::::::::::::::::::::::::: 1 1.1 Features :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 2 QEMU PC System emulator ::::::::::::::::::: 2 2.1 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2.2 Quick Start::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2.3 Invocation :::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.3.1 Standard options :::::::::::::::::::::::::::::::::::::::::: 3 2.3.2 Block device options ::::::::::::::::::::::::::::::::::::::: 9 2.3.3 USB options:::::::::::::::::::::::::::::::::::::::::::::: 19 2.3.4 Display options ::::::::::::::::::::::::::::::::::::::::::: 19 2.3.5 i386 target only::::::::::::::::::::::::::::::::::::::::::: 26 2.3.6 Network options :::::::::::::::::::::::::::::::::::::::::: 27 2.3.7 Character device options:::::::::::::::::::::::::::::::::: 35 2.3.8 Device URL Syntax::::::::::::::::::::::::::::::::::::::: 39 2.3.9 Bluetooth(R) options ::::::::::::::::::::::::::::::::::::: 42 2.3.10 TPM device options ::::::::::::::::::::::::::::::::::::: 42 2.3.11 Linux/Multiboot boot specific ::::::::::::::::::::::::::: 43 2.3.12 Debug/Expert options ::::::::::::::::::::::::::::::::::: 44 2.3.13 Generic object creation :::::::::::::::::::::::::::::::::: 53 2.4 Keys in the graphical frontends :::::::::::::::::::::::::::::::: 58 2.5 Keys in the character backend multiplexer ::::::::::::::::::::: 59 2.6 QEMU Monitor ::::::::::::::::::::::::::::::::::::::::::::::: 59 2.6.1 Commands ::::::::::::::::::::::::::::::::::::::::::::::: 59 2.6.2 Integer expressions:::::::::::::::::::::::::::::::::::::::: 71 2.7 Disk Images ::::::::::::::::::::::::::::::::::::::::::::::::::: 71 2.7.1 Quick start for disk image creation:::::::::::::::::::::::: 71 2.7.2 Snapshot mode ::::::::::::::::::::::::::::::::::::::::::: 71 2.7.3 VM snapshots :::::::::::::::::::::::::::::::::::::::::::: 71 2.7.4 qemu-img Invocation:::::::::::::::::::::::::::::::::::::: 72 2.7.5 qemu-nbd Invocation:::::::::::::::::::::::::::::::::::::: 81 2.7.6 Disk image file formats ::::::::::::::::::::::::::::::::::: 84 2.7.6.1 Read-only formats ::::::::::::::::::::::::::::::::::: 89 2.7.7 Using host drives ::::::::::::::::::::::::::::::::::::::::: 89 2.7.7.1 Linux:::::::::::::::::::::::::::::::::::::::::::::::: 90 2.7.7.2 Windows :::::::::::::::::::::::::::::::::::::::::::: 90 2.7.7.3 Mac OS X ::::::::::::::::::::::::::::::::::::::::::: 90 2.7.8 Virtual FAT disk images :::::::::::::::::::::::::::::::::: 90 2.7.9 NBD access :::::::::::::::::::::::::::::::::::::::::::::: 91 2.7.10 Sheepdog disk images:::::::::::::::::::::::::::::::::::: 91 2.7.11 iSCSI LUNs ::::::::::::::::::::::::::::::::::::::::::::: 92 2.7.12 GlusterFS disk images ::::::::::::::::::::::::::::::::::: 94 2.7.13 Secure Shell (ssh) disk images:::::::::::::::::::::::::::: 95 ii 2.7.14 Disk image file locking ::::::::::::::::::::::::::::::::::: 96 2.8 Network emulation :::::::::::::::::::::::::::::::::::::::::::: 96 2.8.1 VLANs ::::::::::::::::::::::::::::::::::::::::::::::::::: 96 2.8.2 Using TAP network interfaces::::::::::::::::::::::::::::: 96 2.8.2.1 Linux host ::::::::::::::::::::::::::::::::::::::::::: 96 2.8.2.2 Windows host ::::::::::::::::::::::::::::::::::::::: 97 2.8.3 Using the user mode network stack:::::::::::::::::::::::: 97 2.8.4 Connecting VLANs between QEMU instances ::::::::::::: 97 2.9 Other Devices ::::::::::::::::::::::::::::::::::::::::::::::::: 97 2.9.1 Inter-VM Shared Memory device:::::::::::::::::::::::::: 98 2.9.1.1 Migration with ivshmem ::::::::::::::::::::::::::::: 98 2.9.1.2 ivshmem and hugepages:::::::::::::::::::::::::::::: 98 2.10 Direct Linux Boot :::::::::::::::::::::::::::::::::::::::::::: 98 2.11 USB emulation ::::::::::::::::::::::::::::::::::::::::::::::: 99 2.11.1 Connecting USB devices ::::::::::::::::::::::::::::::::: 99 2.11.2 Using host USB devices on a Linux host :::::::::::::::: 100 2.12 VNC security ::::::::::::::::::::::::::::::::::::::::::::::: 101 2.12.1 Without passwords ::::::::::::::::::::::::::::::::::::: 101 2.12.2 With passwords :::::::::::::::::::::::::::::::::::::::: 101 2.12.3 With x509 certificates :::::::::::::::::::::::::::::::::: 101 2.12.4 With x509 certificates and client verification :::::::::::: 102 2.12.5 With x509 certificates, client verification and passwords :: 102 2.12.6 With SASL authentication:::::::::::::::::::::::::::::: 102 2.12.7 With x509 certificates and SASL authentication::::::::: 102 2.12.8 Generating certificates for VNC::::::::::::::::::::::::: 102 2.12.8.1 Setup the Certificate Authority :::::::::::::::::::: 103 2.12.8.2 Issuing server certificates :::::::::::::::::::::::::: 103 2.12.8.3 Issuing client certificates ::::::::::::::::::::::::::: 104 2.12.9 Configuring SASL mechanisms:::::::::::::::::::::::::: 104 2.13 GDB usage ::::::::::::::::::::::::::::::::::::::::::::::::: 105 2.14 Target OS specific information :::::::::::::::::::::::::::::: 106 2.14.1 Linux :::::::::::::::::::::::::::::::::::::::::::::::::: 106 2.14.2 Windows ::::::::::::::::::::::::::::::::::::::::::::::: 106 2.14.2.1 SVGA graphic modes support ::::::::::::::::::::: 106 2.14.2.2 CPU usage reduction :::::::::::::::::::::::::::::: 107 2.14.2.3 Windows 2000 disk full problem ::::::::::::::::::: 107 2.14.2.4 Windows 2000 shutdown::::::::::::::::::::::::::: 107 2.14.2.5 Share a directory between Unix and Windows :::::: 107 2.14.2.6 Windows XP security problem ::::::::::::::::::::: 107 2.14.3 MS-DOS and FreeDOS ::::::::::::::::::::::::::::::::: 107 2.14.3.1 CPU usage reduction :::::::::::::::::::::::::::::: 107 3 QEMU System emulator for non PC targets :: 108 3.1 PowerPC System emulator ::::::::::::::::::::::::::::::::::: 108 3.2 Sparc32 System emulator ::::::::::::::::::::::::::::::::::::: 109 3.3 Sparc64 System emulator ::::::::::::::::::::::::::::::::::::: 110 3.4 MIPS System emulator ::::::::::::::::::::::::::::::::::::::: 110 3.5 ARM System emulator ::::::::::::::::::::::::::::::::::::::: 111 iii 3.6 ColdFire System emulator :::::::::::::::::::::::::::::::::::: 114 3.7 Cris System emulator::::::::::::::::::::::::::::::::::::::::: 115 3.8 Microblaze System emulator :::::::::::::::::::::::::::::::::: 115 3.9 SH4 System emulator :::::::::::::::::::::::::::::::::::::::: 115 3.10 Xtensa System emulator::::::::::::::::::::::::::::::::::::: 115 4 QEMU Guest Agent invocation ::::::::::::: 116 5 QEMU User space emulator ::::::::::::::::: 118 5.1 Supported Operating Systems :::::::::::::::::::::::::::::::: 118 5.2 Features:::::::::::::::::::::::::::::::::::::::::::::::::::::: 118 5.3 Linux User space emulator:::::::::::::::::::::::::::::::::::: 118 5.3.1 Quick Start ::::::::::::::::::::::::::::::::::::::::::::: 118 5.3.2 Wine launch::::::::::::::::::::::::::::::::::::::::::::: 119 5.3.3 Command line options ::::::::::::::::::::::::::::::::::: 119 5.3.4 Other binaries ::::::::::::::::::::::::::::::::::::::::::: 120 5.4 BSD User space emulator::::::::::::::::::::::::::::::::::::: 121 5.4.1 BSD Status ::::::::::::::::::::::::::::::::::::::::::::: 121 5.4.2 Quick Start ::::::::::::::::::::::::::::::::::::::::::::: 121 5.4.3 Command line options ::::::::::::::::::::::::::::::::::: 121 Appendix A Implementation notes :::::::::::: 122 A.1 CPU emulation :::::::::::::::::::::::::::::::::::::::::::::: 122 A.1.1 x86 and x86-64 emulation ::::::::::::::::::::::::::::::: 122 A.1.2 ARM emulation::::::::::::::::::::::::::::::::::::::::: 122 A.1.3 MIPS emulation :::::::::::::::::::::::::::::::::::::::: 122 A.1.4 PowerPC emulation ::::::::::::::::::::::::::::::::::::: 122 A.1.5 Sparc32 and Sparc64 emulation ::::::::::::::::::::::::: 123 A.1.6 Xtensa emulation ::::::::::::::::::::::::::::::::::::::: 123 A.2 Translator Internals:::::::::::::::::::::::::::::::::::::::::: 123 A.3 QEMU compared to other emulators ::::::::::::::::::::::::: 125 A.4 Bibliography::::::::::::::::::::::::::::::::::::::::::::::::: 126 Appendix B Deprecated features :::::::::::::: 127 B.1 System emulator command line arguments ::::::::::::::::::: 127 B.1.1 -drive boot=on|off (since 1.3.0) ::::::::::::::::::::::::: 127 B.1.2 -tdf (since 1.3.0) :::::::::::::::::::::::::::::::::::::::: 127 B.1.3 -no-kvm-pit-reinjection (since 1.3.0) ::::::::::::::::::::: 127 B.1.4 -no-kvm-irqchip (since 1.3.0) :::::::::::::::::::::::::::: 127 B.1.5 -no-kvm-pit (since 1.3.0) :::::::::::::::::::::::::::::::: 127 B.1.6 -no-kvm (since 1.3.0) :::::::::::::::::::::::::::::::::::: 127 B.1.7 -mon default=on (since 2.4.0) ::::::::::::::::::::::::::: 127 B.1.8 -vnc tls (since 2.5.0)::::::::::::::::::::::::::::::::::::: 128 B.1.9 -vnc x509 (since 2.5.0) :::::::::::::::::::::::::::::::::: 128 B.1.10 -vnc x509verify (since 2.5.0) :::::::::::::::::::::::::::: 128 B.1.11 -tftp (since 2.6.0) :::::::::::::::::::::::::::::::::::::: 128 iv B.1.12 -bootp (since 2.6.0) :::::::::::::::::::::::::::::::::::: 128 B.1.13 -redir (since 2.6.0) ::::::::::::::::::::::::::::::::::::: 128 B.1.14 -smb (since 2.6.0) :::::::::::::::::::::::::::::::::::::: 128 B.1.15 -net channel (since 2.6.0)::::::::::::::::::::::::::::::: 128 B.1.16 -net vlan (since 2.9.0) :::::::::::::::::::::::::::::::::: 128 B.1.17 -drive if=scsi (since 2.9.0) :::::::::::::::::::::::::::::: 128 B.1.18 -net dump (since 2.10.0) ::::::::::::::::::::::::::::::: 129 B.1.19 -hdachs (since 2.10.0) :::::::::::::::::::::::::::::::::: 129 B.1.20 -usbdevice (since 2.10.0) ::::::::::::::::::::::::::::::: 129 B.1.21 -nodefconfig (since 2.11.0) :::::::::::::::::::::::::::::: 129 B.2 qemu-img command line arguments :::::::::::::::::::::::::: 129 B.2.1 convert