Original author(s) | Fabrice Bellard |
---|---|
Developer(s) | QEMU team: Peter Maydell, et al. |
Stable release | |
Repository | |
Written in | C |
Operating system | Linux, Microsoft Windows, macOS and some other UNIX platforms |
Type | Hypervisor, Emulator |
License | GPL-2.0-only [2] |
Website | www |
QEMU (Quick Emulator) [3] is a free and open-source emulator that uses dynamic binary translation to emulate the processor of a computer. It provides a variety of hardware and device models for the machine, enabling it to run different guest operating systems. QEMU can be used in conjunction with Kernel-based Virtual Machine (KVM) to execute virtual machines at near-native speeds. Additionally, QEMU supports the emulation of user-level processes, allowing applications compiled for one processor architecture to run on another. [4]
QEMU supports the emulation of various processor architectures, including x86, ARM, PowerPC, RISC-V, and others.
QEMU was developed by Fabrice Bellard and is free software. Its different components are licensed under the GNU General Public License (GPL), BSD license, GNU Lesser General Public License (LGPL), or other GPL-compatible licenses. [5]
QEMU has multiple operating modes: [6]
QEMU can save and restore the state of the virtual machine while all programs are running. Guest operating systems do not need patching in order to run inside QEMU.
QEMU supports the emulation of various architectures, including x86, MIPS64 (up to Release 6), [9] SPARC (sun4m and sun4u), ARM (Integrator/CP and Versatile/PB), SuperH, PowerPC (PReP and Power Macintosh), ETRAX CRIS, MicroBlaze, and RISC-V.
The virtual machine can interface with many types of physical host hardware, including the user's hard disks, CD-ROM drives, network cards, audio interfaces, and USB devices. USB devices can be completely emulated, 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 a special format (qcow or qcow2) that only takes up as much disk space as the guest OS actually uses. This way, an emulated 120 GB disk may occupy only a few hundred megabytes on the host. The QCOW2 format also allows the creation of overlay images that record the difference from another (unmodified) base image file. This provides the possibility of reverting the emulated disk's contents to an earlier state. For example, a base image could hold a fresh install of an operating system that is known to work, and the overlay images are used. 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) which share the host system's connectivity by doing network address translation, 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 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 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 can allow one to access the screen of the guest OS via an integrated VNC server. It can also use an emulated serial line, without any screen, with applicable operating systems.
Simulating multiple CPUs running SMP is possible.
QEMU does not require administrative rights to run unless additional kernel modules for improving speed (like KQEMU) are used or certain modes of its network connectivity model are utilized.
The Tiny Code Generator (TCG) aims to remove the shortcoming of relying on a particular version of GCC or any compiler, instead incorporating the compiler (code generator) into other tasks performed by QEMU at run time. The whole translation task thus consists of two parts: basic blocks 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 mode called TCG Interpreter (TCI). It also requires updating the target code to use TCG ops instead of the old dyngen ops.
Starting with QEMU Version 0.10.0, TCG ships with the QEMU stable release. It replaces the dyngen, which relied on GCC 3.x to work. [10] [11]
KQEMU was a Linux kernel 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 and real-mode code. KQEMU could execute code from many guest OSes 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), [12] it was relicensed under the GNU General Public License. QEMU versions starting with 0.12.0 (as of August 2009 [update] ) support large memory which makes them incompatible with KQEMU. [13] Newer releases of QEMU have completely removed support for KQEMU.
QVM86 was a 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 in the wake of the lack of support for KQEMU and QVM86.[ citation needed ] QEMU can also use KVM on other architectures like ARM and MIPS. [14]
Intel's Hardware Accelerated Execution Manager (HAXM) is an open-source alternative [15] to KVM for x86-based hardware-assisted virtualization on NetBSD, Linux, Windows and macOS using Intel VT. As of 2013 [update] Intel mostly solicits its use with QEMU for Android development. [16] Starting with version 2.9.0, the official QEMU includes support for HAXM, under the name hax. [17]
QEMU also supports the following accelerators: [17]
Hypervisor.framework
based on Intel VT.QEMU supports the following disk image formats: [18]
.dmg
) – Read-only.hdd
, .hds
) – Read-only.qcow2
, .qed
, .qcow
, .cow
).vdi
).vhd
).vmdk
).img
) that contain sector-by-sector contents of a disk.iso
) that contain sector-by-sector contents of an optical disk (e.g. booting live OSes) [19] The QEMU Object Model (QOM) provides a framework for registering user creatable types and instantiating objects from those types. [20]
QOM provides the following features:
Virtualization solutions that use QEMU can execute multiple virtual CPUs in parallel. For user-mode emulation, QEMU maps emulated threads to host threads. For full system emulation, QEMU is capable of running a host thread for each emulated virtual CPU (vCPU). This is dependent on the guest having been updated to support parallel system emulation, currently ARM, Alpha, HP-PA, PowerPC, RISC-V, s390x, x86 and Xtensa. Otherwise, a single thread is used to emulate all virtual CPUs (vCPUS) which executes each vCPU in a round-robin manner.
VirtualBox, first released in January 2007, used some of QEMU's virtual hardware devices, and had a built-in dynamic recompiler based on QEMU. As with KQEMU, VirtualBox runs nearly all guest code natively on the host via the VMM (Virtual Machine Manager) and uses the recompiler only as a fallback mechanism – for example, when guest code executes in real mode. [21] In addition, VirtualBox did a lot of code analysis and patching using a built-in disassembler in order to minimize recompilation. VirtualBox is free and open-source (available under GPL), except for certain features.
Xen, a virtual machine monitor, can run in HVM (hardware virtual machine) mode, using Intel VT-x or AMD-V hardware x86 virtualization extensions and ARM Cortex-A7 and Cortex-A15 virtualization extensions. [22] This means that instead of paravirtualized devices, a real set of virtual hardware is exposed to the domU to use real device drivers to talk to.
QEMU includes several components: CPU emulators, emulated devices, generic devices, machine descriptions, user interface, and a debugger. The emulated devices and generic devices in QEMU make up its device models for I/O virtualization. [23] They comprise a PIIX3 IDE (with some rudimentary PIIX4 capabilities), Cirrus Logic or plain VGA emulated video, RTL8139 or E1000 network emulation, and ACPI support. [24] APIC support is provided by Xen.
Xen-HVM has device emulation based on the QEMU project to provide I/O virtualization to the VMs. Hardware is emulated via a QEMU "device model" daemon running as a backend in dom0. Unlike other QEMU running modes (dynamic translation or KVM), virtual CPUs are completely managed to the hypervisor, which takes care of stopping them while QEMU is emulating memory-mapped I/O accesses.
KVM (Kernel-based Virtual Machine) is a FreeBSD and Linux kernel module that allows a user space program access to the hardware virtualization features of various processors, with which QEMU is able to offer virtualization for x86, PowerPC, and S/390 guests. When the target architecture is the same as the host architecture, QEMU can make use of KVM particular features, such as acceleration.
In early 2005, Win4Lin introduced Win4Lin Pro Desktop, based on a 'tuned' version of QEMU and KQEMU and it hosts NT-versions of Windows. In June 2006, [25] Win4Lin released Win4Lin Virtual Desktop Server based on the same code base. Win4Lin Virtual Desktop Server serves Microsoft Windows sessions to thin clients from a Linux server.
In September 2006, Win4Lin announced a change of the company name to Virtual Bridges with the release of Win4BSD Pro Desktop, a port of the product to FreeBSD and PC-BSD. Solaris support followed in May 2007 with the release of Win4Solaris Pro Desktop and Win4Solaris Virtual Desktop Server. [26]
SerialICE is a QEMU-based firmware debugging tool running system firmware inside of QEMU while accessing real hardware through a serial connection to a host system. This can be used as a cheap replacement for hardware in-circuit emulators (ICE). [27]
WinUAE introduced support for the CyberStorm PPC and Blizzard 603e boards using the QEMU PPC core in version 3.0.0. [28]
Unicorn is a CPU emulation framework based on QEMU's "TCG" CPU emulator. Unlike QEMU, Unicorn focuses on the CPU only: no emulation of any peripherals is provided and raw binary code (outside of the context of an executable file or a system image) can be run directly. Unicorn is thread-safe and has multiple bindings and instrumentation interfaces. [29]
Limbo is an X86 and ARM64 virtual machine for Android based on QEMU [30] It is one of the few pieces of virtual machine software available for Android capable of emulating Microsoft Windows, [31] although it was designed to emulate Linux and DOS. Unlike other QEMU-based emulators, it does not require users to type commands to use, instead having a user interface to set the virtual machine's settings.
It is more popular in developing countries in Asia such as India, Malaysia, and Thailand on YouTube due to the high usage of the Android Operating System. [32] Limbo was removed from the Google Play Store for unknown reasons between February 2019 and December 2020, though it can still be installed off the developer's website with an APK (Android Package) installation. [33] Limbo is known for having stepped, glitchy and laggy audio quality, and no known fixes have been found as of 2023. [34] Limbo is generally unknown in popularity compared to other virtual machine software, making troubleshooting very difficult.
It is required to install a special application known as "Hacker's Keyboard" to use many keyboard functions that a basic Android keyboard cannot do in Limbo X86, such as the Ctrl, Alt, Del, and function keys. [35] It is recommended to install Hacker's Keyboard with an APK file due to the Google Play Store stating it does not support newer Android versions; an APK file allows installing Hacker's Keyboard on newer versions of Android. [36] [ verification needed ]
QEMU can emulate i386 and x86_64 architecture. Besides the CPU (which is also configurable and can emulate a number of Intel CPU models including (as of 3 March 2018) Sandy Bridge, [37] Ivy Bridge, [38] Haswell, [39] Broadwell [40] [41] and Skylake [39] ), the following devices are emulated:
The BIOS implementation used by QEMU starting from version 0.12 is SeaBIOS. The VGA BIOS implementation of SeaBIOS is also used starting from version 2.0.0. The UEFI firmware for QEMU is OVMF. [45]
QEMU emulates the following PowerMac peripherals:
OpenBIOS is used as the firmware.
QEMU emulates the following PREP peripherals:
On the PREP target, Open Hack'Ware, an Open-Firmware-compatible BIOS, is used.
QEMU can emulate the paravirtual sPAPR interface with the following peripherals:
On the sPAPR target, another Open-Firmware-compatible BIOS is used, called SLOF.
QEMU emulates the ARMv7 instruction set (and down to ARMv5TEJ) with NEON extension. [46] It emulates full systems like Integrator/CP board, Versatile baseboard, RealView Emulation baseboard, XScale-based PDAs, Palm Tungsten|E PDA, Nokia N800 and Nokia N810 Internet tablets, etc. QEMU also powers the Android emulator which is part of the Android SDK (most current Android implementations are ARM-based). Starting from version 2.0.0 of their Bada SDK, Samsung has chosen QEMU to help development on emulated 'Wave' devices.
In 1.5.0 and 1.6.0, Samsung Exynos 4210 (dual-core Cortex-A9) and Versatile Express ARM Cortex-A9 ARM Cortex-A15 are emulated. In 1.6.0, the 32-bit instructions of the ARMv8 (AArch64) architecture are emulated, but 64-bit instructions are unsupported.
The Xilinx Cortex A9-based Zynq SoC is modelled, with the following elements:
This section is empty. To simulate a 64-bit Arm machine use the qemu-system-aarch64 executable. You can help by adding to it. (October 2024) |
QEMU has support for both 32- and 64-bit SPARC architectures.
When the firmware in the JavaStation (sun4m-Architecture) became version 0.8.1 Proll, [47] a PROM replacement used in version 0.8.2, was replaced with OpenBIOS.
QEMU emulates the following sun4m/sun4c/sun4d peripherals:
QEMU emulates Sun4u (UltraSPARC PC-like machine), Sun4v (T1 PC-like machine), or generic Niagara (T1) machine with the following peripherals:
QEMU supports the following peripherals:
Supported peripherals: From the Milkymist SoC
External trees exist, supporting the following targets:
In computing, a virtual machine (VM) is the virtualization or emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination of the two. Virtual machines differ and are organized by their function, shown here:
Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system memory independently of the central processing unit (CPU).
Xen is a free and open-source type-1 hypervisor, providing services that allow multiple computer operating systems to execute on the same computer hardware concurrently. It was originally developed by the University of Cambridge Computer Laboratory and is now being developed by the Linux Foundation with support from Intel, Citrix, Arm Ltd, Huawei, AWS, Alibaba Cloud, AMD, Bitdefender and EPAM Systems.
x86 virtualization is the use of hardware-assisted virtualization capabilities on an x86/x86-64 CPU.
A hypervisor, also known as a virtual machine monitor (VMM) or virtualizer, is a type of computer software, firmware or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine. The hypervisor presents the guest operating systems with a virtual operating platform and manages the execution of the guest operating systems. Unlike an emulator, the guest executes most instructions on the native hardware. Multiple instances of a variety of operating systems may share the virtualized hardware resources: for example, Linux, Windows, and macOS instances can all run on a single physical x86 machine. This contrasts with operating-system–level virtualization, where all instances must share a single kernel, though the guest operating systems can differ in user space, such as different Linux distributions with the same kernel.
Platform virtualization software, specifically emulators and hypervisors, are software packages that emulate the whole physical computer machine, often providing multiple virtual machines on one physical platform. The table below compares basic information about platform virtualization hypervisors.
Parallels Workstation is the first commercial software product released by Parallels, Inc., a developer of desktop and server virtualization software. The Workstation software comprises a virtual machine suite for Intel x86-compatible computers which allows the simultaneous creation and execution of multiple x86 virtual computers. They distributed the product as a download package. Parallels Workstation has been discontinued for Windows and Linux as of 2013.
twoOStwo was a commercial software product developed by Parallels Software Studio. The workstation software consisted of a virtual machine suite for Intel x86-compatible computers which allowed the creation and execution of multiple x86 virtual computers simultaneously. Each virtual machine instance could execute its own guest operating system including Windows, Linux, OS/2 and BSD variants.
In computing, Intel's Advanced Programmable Interrupt Controller (APIC) is a family of programmable interrupt controllers. As its name suggests, the APIC is more advanced than Intel's 8259 Programmable Interrupt Controller (PIC), particularly enabling the construction of multiprocessor systems. It is one of several architectural designs intended to solve interrupt routing efficiency issues in multiprocessor computer systems.
In computing, an input–output memory management unit (IOMMU) is a memory management unit (MMU) connecting a direct-memory-access–capable (DMA-capable) I/O bus to the main memory. Like a traditional MMU, which translates CPU-visible virtual addresses to physical addresses, the IOMMU maps device-visible virtual addresses to physical addresses. Some units also provide memory protection from faulty or malicious devices.
In computing, virtualization is the use of a computer to simulate another computer. The following is a chronological list of virtualization technologies.
Kernel-based Virtual Machine (KVM) is a free and open-source virtualization module in the Linux kernel that allows the kernel to function as a hypervisor. It was merged into the mainline Linux kernel in version 2.6.20, which was released on February 5, 2007. KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V. KVM has also been ported to other operating systems such as FreeBSD and illumos in the form of loadable kernel modules.
Microsoft Hyper-V, codenamed Viridian, and briefly known before its release as Windows Server Virtualization, is a native hypervisor; it can create virtual machines on x86-64 systems running Windows. Starting with Windows 8, Hyper-V superseded Windows Virtual PC as the hardware virtualization component of the client editions of Windows NT. A server computer running Hyper-V can be configured to expose individual virtual machines to one or more networks. Hyper-V was first released with Windows Server 2008, and has been available without additional charge since Windows Server 2012 and Windows 8. A standalone Windows Hyper-V Server is free, but has a command-line interface only. The last version of free Hyper-V Server is Hyper-V Server 2019, which is based on Windows Server 2019.
In computing, virtualization (v12n) is a series of technologies that allows dividing of physical computing resources into a series of virtual machines, operating systems, processes or containers.
libvirt is an open-source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESXi, QEMU and other virtualization technologies. These APIs are widely used in the orchestration layer of hypervisors in the development of a cloud-based solution.
SeaBIOS is an open-source implementation of an x86 BIOS, serving as a freely available firmware for x86 systems. Aiming for compatibility, it supports standard BIOS features and calling interfaces that are implemented by a typical proprietary x86 BIOS. SeaBIOS can either run on bare hardware as a coreboot payload, or can be used directly in emulators such as QEMU and Bochs.
Second Level Address Translation (SLAT), also known as nested paging, is a hardware-assisted virtualization technology which makes it possible to avoid the overhead associated with software-managed shadow page tables.
In computer security, virtual machine (VM) escape is the process of a program breaking out of the virtual machine on which it is running and interacting with the host operating system. In theory, a virtual machine is a "completely isolated guest operating system installation within a normal host operating system", but this isn't always the case in practice.
GPU virtualization refers to technologies that allow the use of a GPU to accelerate graphics or GPGPU applications running on a virtual machine. GPU virtualization is used in various applications such as desktop virtualization, cloud gaming and computational science.
86Box is an IBM PC emulator for Windows, Linux and Mac based on PCem that specializes in running old operating systems and software that are designed for IBM PC compatibles. Originally forked from PCem, it later added support for other IBM PC compatible computers as well.
{{cite web}}
: CS1 maint: postscript (link)HAXM is now open source
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.