Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
QEMU
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Features== QEMU supports the emulation of various architectures, including [[x86]], [[MIPS architecture|MIPS64]] (up to Release 6),<ref name="aLeNi3">{{cite web |title=QEMU PRIP 1 - support for MIPS64 Release 6 - PRPL |url=http://wiki.prplfoundation.org/wiki/QEMU_PRIP_1_-_support_for_MIPS64_Release_6 |url-status=dead |archive-url=https://web.archive.org/web/20170421171437/http://wiki.prplfoundation.org/wiki/QEMU_PRIP_1_-_support_for_MIPS64_Release_6 |archive-date=2017-04-21 |access-date=2014-12-22 |website=wiki.prplfoundation.org}}</ref> [[SPARC]] (sun4m and sun4u), [[ARM architecture|ARM]] (Integrator/CP and Versatile/PB), [[SuperH]], [[PowerPC]] ([[PReP]] and [[Power Macintosh]]), [[ETRAX CRIS]], [[MicroBlaze]], and [[RISC-V]]. It supports saving the virtual machine state while all programs are running. Guest operating systems do not need patching to run inside QEMU. The virtual machine can interface with many types of physical host hardware, including the user's hard disks, [[Optical disc drive|CD-ROM drives]], [[Network interface controller|network cards]], [[Sound card|audio interfaces]], and USB devices. USB devices can be emulated entirely, or the host's USB devices can be used, although this requires administrator privileges and does not work with some devices. Virtual disk images can be stored in [[QCOW]] format, which can significantly reduce image size. QCOW images only occupy the actual used disk space, not the full configured capacity. This means a configured 120 GB disk may only occupy a few hundred megabytes on the host, as QCOW does not store unused disk space in the image file. The QCOW2 format also allows the creation of overlay images, which are files that store only the changes made from an original (unmodified) base image file. This enables the emulated disk's contents to be reverted to an earlier state. For instance, a base image could contain a fresh installation of a known working operating system, and overlay images can be used to record changes. Should the guest system become unusable (through virus attack, accidental system destruction, etc.), the user can delete the overlay and use an earlier emulated disk image. QEMU can emulate network cards (of different models) that share the host system's connectivity by translating network addresses, effectively allowing the guest to use the same network as the host. The virtual network cards can also connect to network cards of other instances of QEMU or to local [[TUN/TAP|TAP]] interfaces. Network connectivity can also be achieved by bridging a TUN/TAP interface used by QEMU with a non-virtual Ethernet interface on the host OS using the host OS's bridging features. QEMU integrates several services to allow the host and guest systems to communicate for example: an integrated [[Server Message Block|SMB]] server and network-port redirection (to allow incoming connections to the virtual machine). It can also boot Linux kernels without a [[bootloader]]. QEMU does not depend on the presence of graphical output methods on the host system. Instead, it provides access to the guest OS screen via an integrated [[VNC]] server. It can also use an emulated serial line without any screen, with applicable operating systems. Simulating multiple CPUs running [[Symmetric multiprocessing|SMP]] is possible. QEMU does not require administrative rights to run unless additional kernel modules are used to improve speed (like [[QEMU#Accelerator|KQEMU]]) or certain modes of its network connectivity model are utilized. ===Tiny Code Generator=== The Tiny Code Generator (TCG) aims to remove the shortcoming of relying on a particular version of [[GNU Compiler Collection|GCC]] or any [[compiler]], instead incorporating the compiler into other tasks performed by QEMU at run time. The whole translation task thus consists of two parts: [[basic block]]s of target code (''TBs'') being rewritten in ''TCG ops'' – a kind of machine-independent intermediate notation, and subsequently this notation being compiled for the host's architecture by TCG. Optional optimization passes are performed between them, for a [[just-in-time compiler]] (JIT) mode. TCG requires dedicated code written to support every architecture it runs on, so that the JIT knows what to translate the ''TCG ops'' to. If no dedicated JIT code is available for the architecture, TCG falls back to a slow [[Interpreter (computing)|interpreter]] mode called TCG Interpreter (TCI). It also requires updating the target code to use TCG ops instead of the old ''DynGen'' ops.{{Clarify|reason=This appears to be a unique usage of the jargon "dyngen", researching this term, it appears to be more commonly used in the cellular simulation space.|date=December 2024}} Starting with QEMU Version 0.10.0, TCG ships with the QEMU stable release. It replaces ''DynGen'', which relied on GCC 3.x to work.<ref name="DhNAG3">{{cite web |title=[Qemu-devel] ANNOUNCE: Release 0.10.0 of QEMU |url=http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00154.html |website=lists.gnu.org}}</ref><ref name="8NZ3y3">{{cite web |last1=Filardo |first1=Nathaniel |date=September 11, 2007 |title=Porting QEMU to Plan 9: QEMU Internals and Port Strategy |url=http://gsoc.cat-v.org/people/nwf/paper-strategy-plus.pdf |website=gsoc.cat-v.org}} -- a review of how the old dyngen worked</ref> ===Accelerator=== KQEMU was a [[Linux kernel]] [[Loadable kernel module|module]], also written by [[Fabrice Bellard]], which notably sped up emulation of x86 or x86-64 guests on platforms with the same CPU architecture. This worked by running [[user mode]] code (and optionally some kernel code) directly on the host computer's CPU, and by using processor and peripheral emulation only for [[kernel mode|kernel-mode]] and [[real mode|real-mode]] code. KQEMU could execute code from many guest operating systems even if the host CPU did not support [[hardware-assisted virtualization]]. KQEMU was initially a [[closed-source]] product available free of charge but starting from version 1.3.0pre10 (February 2007),<ref name="xrH6Q">{{cite web |url=https://lwn.net/Articles/220807/ |title=KQEMU 1.3.0pre10 released - under the GPL [LWN.net] |publisher=Lwn.net |date=February 6, 2007 |access-date=2009-01-03}}</ref> it was [[Software relicensing|relicensed]] under the [[GNU General Public License]]. QEMU versions starting with 0.12.0 ({{as of|2009|08|lc=on}}) support large memory which makes them incompatible with KQEMU.<ref name="KjeBA">{{cite web |first=Anthony |last=Liguori |url=http://lists.gnu.org/archive/html/qemu-devel/2009-08/msg00478.html |title=[Qemu-devel] [PATCH 1/2] Unbreak large mem support by removing kqemu |date=10 August 2009 |access-date=2010-03-11}}</ref> Newer releases of QEMU have completely removed support for KQEMU. QVM86 was a [[GNU General Public License|GNU GPLv2]] licensed drop-in replacement for the then closed-source KQEMU. The developers of QVM86 ceased development in January 2007. [[Kernel-based Virtual Machine]] (''KVM'') has mostly taken over as the Linux-based hardware-assisted virtualization solution for use with QEMU following the lack of support for KQEMU and QVM86.{{citation needed|date=May 2014}} QEMU can also use KVM on other architectures like [[ARM architecture|ARM]] and [[MIPS architecture|MIPS]].<ref name="aOKWh">{{cite web |title=QEMU / KVM CPU model configuration |url=https://www.qemu.org/docs/master/system/qemu-cpu-models.html |website=QEMU 5.0.50 (v5.0.0-962-g49ee115552) documentation}}</ref> Intel's Hardware Accelerated Execution Manager (''HAXM'') is an open-source alternative<ref name="Wsj2a">{{cite web | url = https://lists.nongnu.org/archive/html/qemu-devel/2017-11/msg02504.html | title = HAXM goes open source | date = 2017-11-17 | publisher = QEMU developers | access-date = 2017-01-14 | quote = HAXM is now open source}}</ref> to KVM for x86-based hardware-assisted virtualization on NetBSD, Linux, Windows and macOS using [[Intel VT]]. {{As of | 2013}} Intel mostly solicits its use with QEMU for Android development.<ref name="g4gd5">{{cite web | url = https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager | title = Intel Hardware Accelerated Execution Manager<!-- (The URL does not credit any author) | last1 = Haoren | first1 = J. --> | date = 2013-11-27 | publisher = Intel | access-date = 2014-05-12 | quote = The Intel Hardware Accelerated Execution Manager (Intel® HAXM) is a hardware-assisted virtualization engine (hypervisor) that uses Intel Virtualization Technology (Intel® VT) to speed up Android app emulation on a host machine.}}</ref> Starting with version 2.9.0, the official QEMU includes support for HAXM, under the name ''Hax''.<ref name="qemu-inv">{{cite web |title=Invocation |url=https://www.qemu.org/docs/master/system/invocation.html |website=QEMU 5.0.50 (v5.0.0-962-g49ee115552) documentation}}</ref> QEMU also supports the following accelerators:<ref name="qemu-inv" /> * ''hvf'', Apple's {{Code|Hypervisor.framework}} based on Intel VT. * ''whpx'', Microsoft's Windows Hypervisor Platform based on Intel VT or AMD-V. * ''tcg'', QEMU's own [[#Tiny Code Generator|Tiny Code Generator]]. This is the default. ===Supported disk image formats=== QEMU supports the following [[disk image]] formats:<ref name="X1QXO3">{{cite web |title=QEMU Emulator User Documentation |url=https://qemu.weilnetz.de/doc/qemu-doc.html#disk_005fimages |url-status=dead |archive-url=https://web.archive.org/web/20190427013412/https://qemu.weilnetz.de/doc/qemu-doc.html#disk_005fimages |archive-date=2019-04-27 |access-date=2018-04-10 |website=qemu.weilnetz.de}}</ref> * [[macOS]] [[Universal Disk Image Format]] (<code>.dmg</code>) – Read-only * [[Bochs]] – Read-only * [[Linux]] [[cloop]] – Read-only * [[Parallels, Inc.|Parallels]] disk image (<code>.hdd</code>, <code>.hds</code>) – Read-only * [[Qcow|QEMU copy-on-write]] (<code>.qcow2</code>, <code>.qed</code>, <code>.qcow</code>, <code>.cow</code>) * [[VirtualBox]] [[VDI (file format)|Virtual Disk Image]] (<code>.vdi</code>) * [[Virtual PC]] [[VHD (file format)|Virtual Hard Disk]] (<code>.vhd</code>) * Virtual [[VFAT]] * [[VMware]] [[VMDK|Virtual Machine Disk]] (<code>.vmdk</code>) * [[IMG (file format)|Raw images]] (<code>.img</code>) that contain sector-by-sector contents of a disk * [[ISO image|CD/DVD images]] (<code>.iso</code>) that contain sector-by-sector contents of an optical disk (e.g. booting live OSes)<ref name="XFZZb3">{{cite web |date=3 August 2015 |title=Booting from an ISO image using qemu |url=https://linux-tips.com/t/booting-from-an-iso-image-using-qemu/136 |website=Linux Tips}}</ref> === QEMU Object Model === The '''QEMU Object Model''' (QOM) provides a framework for registering types that users can make and instantiating objects from those types.<ref name="The QEMU Object Model (QOM); Repository3">{{Cite web |date=26 October 2021 |title=Qemu Readme |url=https://github.com/qemu/qemu/blob/master/docs/devel/qom.rst |website=[[GitHub]]}}</ref> QOM provides the following features: * System for dynamically registering types * Support for single-inheritance of types * Multiple inheritances of stateless interfaces {{See also|Object model}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)