QEMU
| QEMU | |
|---|---|
| Puppy Linux running in QEMU running in FreeBSD running in QEMU running in Windows XP
| |
| Developer | Fabrice Bellard |
| Latest release | 0.7 / April 27, 2005 |
| OS | Windows, Linux, Mac OS X |
| Genre | Emulator |
| License | Various |
| Website | http://fabrice.bellard.free.fr/qemu/ |
QEMU is free software written by Fabrice Bellard that implements a fast processor emulator, allowing a user to run one operating system within another. It is similar to projects such as Bochs and PearPC, but has several features these lack, including increased speed and support for multiple architectures. By using dynamic translation it achieves a reasonable speed while being easy to port on new host CPUs. QEMU has two operating modes:
- User mode emulation, QEMU can launch Linux processes compiled for one CPU on another CPU. Linux system calls are converted because of endianness and 32/64 bit mismatches. WINE and Dosemu are the main targets for QEMU.
- System mode emulation, QEMU emulates a full system, including a processor and various peripherials. It enables easier testing and debugging of system code. It can also be used to provide virtual hosting of several virtual PC on a single server.
The majority of the programme is under the LGPL, with the system mode emulation under the GPL; a closed source, currently free-of-charge, Linux kernel module is available which speeds up i386 emulation on i386 platforms to a level where the loss of speed is negligible even compared to native execution. It does this by running Ring 3 privilege level code directly on the host computer's CPU, and emulating only Ring 0 calls and the rest of the computer. As a result, DOS will not speed up much if at all as a guest OS, whereas Windows 2000 will run at close to native speeds.
Table of contents |
Advantages of QEMU
- Supports both IA-32 (x86) and PowerPC 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
- Support for running Linux binaries for other platforms
- Can save and restore the state of the machine (programs running, etc.)
- Virtual network card emulation
Disadvantages of QEMU
- Incomplete support for Microsoft Windows and other host operating systems (emulation of these systems is just fine)
- Incomplete support for less frequently-used architectures
- Used on x86, it still isn't as fast as a virtual machine such as VMware, unless using the kqemu accelerator
- Requires X11 and SDL
- More difficult to install and use than comparable emulators
Example of QEMU's usage
This command will create a 500MB hard disk image in QEMU's "qcow" format.
qemu-img create -f qcow c.img 500M
This will start a virtual machine with 128MB of memory, using the c.img file created with the previous command and booting from a CD-ROM image linux.iso. The virtual machine will have audio support and use the system's clock to run in "real time."
qemu -hda c.img -cdrom linux.iso -boot d -m 128 -enable-audio -localtime
This will create a virtual machine with 64MB of memory, booting from c.img and using the system's CD-ROM drive. The virtual machine will run in full-screen mode.
qemu -hda c.img -cdrom /dev/cdrom -boot c -m 64 -full-screen
While a virtual machine is running, press Ctrl-Alt-2 to access the "QEMU console", which lets one control the virtual machine (for example, changing disk images, rebooting, quitting QEMU, etc.) and Ctrl-Alt-1 to switch back to your emulation. Ctrl-Alt-F toggles between full-screen and windowed mode.
The QEMU Accelerator module (kqemu)
The creator of QEMU Fabrice Bellard has created a Linux kernel module that will improve the speed of QEMU. The module enables near native speed emulation when emulating x86 on x86 hardware. This kernel module, known as kqemu, is however not open source, but a proprietary product. Fabrice Bellard has stated his willingness to open-source the module in case a company steps up to sponsor it. This has thus far not happened, and kqemu remains proprietary.
See also
External links
- QEMU Homepage
- QEMU page (in the Morphix wiki)
Categories: Virtualization software | Emulation software | Linux Emulation Software