| QEMU | |
|---|---|
Internet Explorer running on Windows XP running in QEMU running on Debian GNU/Linux |
|
| Developer | Fabrice Bellard |
| Latest release | 0.9.0 / February 5, 2007 |
| OS | Windows, Solaris, Linux, FreeBSD, NetBSD, OpenBSD, Mac OS X, ZETA, BeOS |
| Genre | Emulator |
| License | Various |
| Website | fabrice.bellard.free.fr/qemu |
QEMU is a processor emulator that relies on dynamic binary translation to achieve a reasonable speed while being easy to port on new host CPU architectures. In conjunction with CPU emulation, it also provides a set of device models, allowing it to run a variety of unmodified guest operating systems, thus is can be viewed as a hosted virtual machine monitor. It also provides an accelerated mode for supporting a mixture of binary translation (for kernel code) and native execution (for user code), in the same fashion as VMware Workstation and Microsoft Virtual PC. Qemu can also be used purely for CPU emulation for user level processes, in this mode of operation, it is most similar to valgrind.
Contents |
Licensing
Qemu was written by Fabrice Bellard, It is free software. In particular, the QEMU virtual CPU core library is released under the GNU Lesser General Public License (GNU LGPL). Many hardware device emulation sources are released under the BSD license.[1] When running on Windows, the proprietary FMOD library is usually used, which disqualifies it for a single, unified, Open Source software license.
Details
QEMU has two operating modes[2]:
- User mode emulation
- QEMU can launch Linux or Darwin/Mac OS X processes compiled for one CPU on another CPU. Target OS system calls are thunked for endianness and 32/64 bit mismatches. Wine windows API reimplementation and DOSEMU are the main targets for QEMU in user mode emulation. This mode also allows to ease cross-compilation and cross-debugging.
- Complete Computer System mode emulation
- QEMU emulates a full computer system, including a processor and various peripherals. It can be used to provide virtual hosting of several virtual computers on a single computer. QEMU can boot many guest operating systems, including Linux, Solaris, Microsoft Windows, DOS, and BSD [1]; it supports emulating several hardware platforms, including x86, amd64, alpha, mips, and sparc.
Features
- Supports emulating IA-32 (x86) PCs, AMD64 PCs, MIPS R4000, Sun's SPARC sun4m, Sun's SPARC sun4u, ARM development boards (Integrator/CP and Versatile/PB), SH4 SHIX board, PowerPC (PReP and Power Macintosh), and ETRAX CRIS architectures.
- Support for other architectures in both host and emulated systems (see homepage for complete list).
- Increased speed — some applications can run in close to real time.
- Implements Copy-On-Write disk image formats. You can declare a multi-gigabyte virtual drive, the disk image will only be as large as what is actually used.
- Also implements overlay images. You can keep a snapshot of the guest system, and write changes to a separate image file. If the guest system breaks, it's simple to roll back to the snapshot.
- Support for running Linux binaries for other architectures.
- Can save and restore the state of the machine (programs running, etc.).
- Virtual network card emulation.
- SMP support.
- Guest OS does not need to be modified/patched
- Performance is improved when the KQEMU kernel module is used.
- Command line tools allow a full control of QEMU without having to run X11.
- Remote control of emulated machine via integrated VNC server
- USB tablet support — this provides "grabless" mouse control. Activated with "-usb -usbdevice tablet".
Accelerator
Fabrice Bellard also wrote a Linux kernel kernel module (with preliminary ports to FreeBSD and Windows) named KQEMU or QEMU Accelerator, which notably speeds up i386 emulation on i386 platforms. This is accomplished by running user mode code directly on the host computer's CPU, and using processor and peripheral emulation only for kernel mode and real mode code. KQEMU also supports a kernel emulation mode in which portions of kernel mode code run on the host's CPU.
KQEMU
The QEMU accelerator module KQEMU, was initially released as a closed-source proprietary product (although it was always given away for free). Since version 1.3.0pre10[3], which was released on February 5, 2007, it has been available under the GNU General Public License. KQEMU has been licensed by Win4Lin for use in their Win4Lin Pro Desktop product.
QVM86
QVM86 was a Linux kernel module to provide x86 virtualization capabilities for the QEMU emulator. Virtualization allowed "emulated" code to be run natively on the host CPU, using the CPU protection mechanisms to intercept and emulate privileged events. It was licensed under GNU GPLv2 license. It was developed as a drop-in replacement for the then closed-source KQEMU, which has since been made available under the GPL. The developer of QVM86 ceased development on January 21 2007 as they decided that the project had been rendered obsolete by the release of VirtualBox.
Integration in other virtualization solutions
VirtualBox
In January 2007, VirtualBox was released, which has a built-in dynamic recompiler that is based on QEMU. As with KQEMU, it runs nearly all guest code natively on the host, and uses the recompiler only for special situations. In addition, VirtualBox goes through a lot of code analysis and patching via a built-in disassembler to reduce usage of the recompiler to a minimum. VirtualBox is open-source software under the GPL, except for a number of enterprise features.
Xen-HVM
The Xen virtual machine monitor can run in HVM (hardware virtual machine) mode, using Intel's VT-x or AMD's AMD-V hardware virtualization extensions. 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 [4]. Xen-HVM has device emulation based on the QEMU project to provide I/O virtualization to the VMs. Hardware is emulated via a patched QEMU "device manager" (qemu-dm) daemon running as a backend in dom0. This means that the vitualized machines see as hardware: a PIIX3 IDE (with some rudimentary PIIX4 capabilities), Cirrus Logic or vanilla VGA emulated video, RTL8139 or NE2000 network emulation, PAE, and somewhat limited ACPI and APIC support and no SCSI emulation.[5]
Kernel-based Virtual Machine (KVM)
KVM is a linux kernel virtualization infrastructure. By itself, it does not perform any emulation. Instead, a user-space program uses the /dev/kvm interface to set up the guest VM's address space, feed it simulated I/O and map its video display back onto the host's and currently, the only such program that does this is a modified version of QEMU [2].
Darwine
Darwine was originally intended to support compiling of Win32 source into Mach-O/PowerPC binaries for Macintosh computers. The project shifted objectives combining Wine's program loader with QEMU in user mode emulation, to allow running of Win32 binaries on Mac OS X for PowerPC.
Shortcomings
- Incomplete support for Microsoft Windows and other host operating systems (emulation of these systems is just fine): this has improved with recent versions
- Incomplete support for less frequently-used architectures
- No special device drivers (graphics, sound, IO) for guests are available, thus quite large overhead for multimedia applications. For example, a Cirrus Logic graphics chip and various popular sound cards (ES1370, Sound Blaster 16, and AdLib) are emulated, but they do not provide hardware-accelerated performance on the host system. Also, it supports only SDL or Cocoa video output libraries although a patch for GGI support exists[6]
- Doesn't compile with modern versions of GCC (no support for versions 4.x)
Qemu-Launcher
Qemu Launcher is a Gtk+ front-end for the QEMU, written by Erik Meitner and Linas Žvirblis. Qemu Launcher provides a graphical front-end to all basic, and many advanced QEMU computer emulator options. It allows you to create, save, and run multiple virtual machine configurations, create and convert disk images. Qemu Launcher utilizes the full system emulation mode of QEMU that allows you to run unmodified operating system on virtual hardware. Qemu Launcher also supports launching virtual machines from the command line, by specifying the configuration name. Note that you still need a graphical environment to do this, unless the virtual machine is set to start in non-graphics mode.
See also
| Free software Portal |
- Comparison of virtual machines
- FreeOsZoo for ready-to-launch OSes disk images
- OpenBIOS – firmware used as Open Firmware replacement on emulated SPARC CPUs
- QEMU ports and frontends
- Other virtual machines
- Bochs
- Cooperative Linux
- KVM - Kernel-based Virtual Machine
- Microsoft Virtual PC
- Parallels Workstation
- Simics
- User-mode Linux
- VirtualBox
- VMware
- Xen
References
External links
- QEMU Homepage
- QEMU Forum
- QEMU Pendrive Linux
- QEMUMenu and Qemu Manager that provide easy and quick control of QEMU for Windows.
- QEMU on Windows
- QEMU summary
- QEMU on Ubuntu
- Installing Ubuntu under Windows XP with QEMU
- Debian HOW-TO : QEMU Virtual Machine
- QEMU for OpenSolaris
- QEMU on Gentoo
- QEMU on Arch Linux
- Systems Emulation with QEMU an IBM developerWorks article by M. Tim Jones
- QVM86 project page
- QVM86 on the QEMU forum
- ARM Emulation with QEMU


