VMcasting is an automatic virtual machine deployment mechanism based on RSS2.0 whereby virtual machine images are transferred from a server to a client securely delivering files containing a technical specification? and virtual disk image.
[Article: QEMU | Discussion «]
HomePage Reload page Edit Versions Download HTML

QEMU is free software? written by Fabrice Bellard? that implements a fast processor? emulator,? allowing full virtualization? of a PC system within another one. QEMU is a hypervisor? and is similar to projects such as Bochs,? VMware Workstation and PearPC,? but has several features these lack, including increased speed on x86 (through an optional accelerator),? and support for multiple architectures in-progress. By using dynamic translation? it achieves a reasonable speed while being easy to port on new host CPUs.

Contents

Details

QEMU has two operating modes:

User mode emulation
QEMU can launch Linux? processes compiled for one CPU on another CPU. Linux system calls are thunked? for endianness? and 32/64 bit mismatches. Wine? and Dosemu? are the main targets for QEMU.
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.

The majority of the program is under the LGPL, with the user mode emulation under the GPL.?

Accelerator

Fabrice Bellard also wrote a closed source, currently free-of-charge, Linux kernel module (with preliminary ports to FreeBSD and Windows) named kqemu or QEMU Accelerator, which speeds up i386 emulation on i386 platforms to a level where the loss of speed is notably less. This is accomplished by running user mode? and virtual 8086 mode? code directly on the host computer's CPU, and using processor and peripheral emulation only for kernel mode? and real mode? code. This is similar to what VMware Workstation and Virtual PC? do. As a result, real mode DOS? will not speed up much if at all as a guest OS, whereas Windows 2000? will run at close to native speeds. (Note, however, that as soon as a memory manager? is used with DOS, most of DOS code is actually run in a virtual 8086 mode task, and should theoretically benefit from kqemu's speedup.)

kqemu versus QVM86

Fabrice Bellard has stated his willingness to open-source the kqemu QEMU accelerator module if a company steps up to sponsor it. This has so far not happened, and kqemu remains proprietary. It is free to use, but one is not allowed to distribute it to other people without an explicit authorization. Distributors wishing to include the QEMU accelerator on CDs, ISO images or packages must contact the author to know the exact terms.

Meanwhile, a GPL licensed module purporting to perform the same task, QVM86,? has appeared, although as of early 2006 (Pre-Alpha status), it appears to be unmaintained.

kqemu has been licensed by Win4Lin? for use in their Win4Lin Pro Desktop product.

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. As opposed to kqemu, however, VirtualBox is open-source software under the GPL, except for a number of enterprise features.

Advantages of QEMU

  • 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, and PowerPC? (PReP? and Power Macintosh)? 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.
  • Implement 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 implement 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 "free but closed source" 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".

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.
  • No special device drivers (graphics, sound, IO) for guests are available thus quite large overhead for multimedia applications. It does emulate a Cirrus Logic graphics chip and several existing soundcards though, so using existing drivers for those does accomplish a similar task.
  • Supports only SDL? or Cocoa? video output libraries although a patch for GGI? support existshttp://members.aon.at/berny_f/qemu/

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

In this command the -f option is for the disk image format. The following formats are supported: vfat,? vpc,? bochs,? dmg,? cloop,? vmdk,? cow,? qcow,? and raw,? depending on the OS. See also: .img? and .iso.? The supported filesystem formats are abbreviations for:

  • vfat - Virtual VFAT
  • vpc - Virtual PC
  • bochs - BOCHS filesystem
  • dmg - macintosh Disk iMaGe
  • cloop - linux Compressed LOOP
  • vmdk - vmware Virtual Machine DisK format
  • qcow - Qemu Copy-On-Write
  • raw - RAW filesystem (no special format)
  • cow - user mode linux Copy-On-Write

The following command 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." Note that one could also replace the -cdrom linux.iso parameter with -cdrom /dev/cdrom or whatever one's CD-ROM device is, and physically boot from installation medium and install to the image specified after -hda, in this case c.img.

 qemu -hda c.img -cdrom linux.iso -boot d -m 128 -soundhw sb16 -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.

See also

References


External links



Last changed: 25.01.2007 11:19 by 206.223.168.166 - HomePage Reload page Edit Versions Download HTML
.......................................
BUILT BY AN ENOMALY : SOME RIGHTS RESERVED : PRIVACY : TERMS & CONDITIONS : VMcast