QEMU
Introduction
➢ QEMU short for Quick Emulator.
➢ QEMU creates a virtual machine, similar to
VMWare, Virtualbox, KVM, and Xen.
➢ It allows you to run one operating system from
within another operating system.
➢ The operating systems can be the same ones,
or different.
➢ Your memory resources will be divided between
your native (host) OS and your virtual machine
(guest) OS.
➢ QEMU is a free and open-source hosted
hypervisor that performs hardware virtualization.
➢ It emulates CPUs through dynamic binary
translation and provides a set of device models,
enabling it to run a variety of unmodified guest
operating systems.
➢ It also can be used together with KVM in order
to run virtual machines at near-native speed.
➢ QEMU can also be used purely for CPU
emulation for user-level processes, allowing
applications compiled for one architecture to be
run on another.
Operating modes
➢ User-mode emulation
➢ System-mode emulation
User-mode emulation
➢ In this mode QEMU runs single Linux
programs that were compiled for a different
instruction set.
➢ System calls are thunked for endianness and
for 32/64 bit mismatches.
➢ Fast cross-compilation and cross-debugging
are the main targets for user-mode emulation.
System-mode emulation
➢ In this mode QEMU emulates a full computer
system, including 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, windows.
➢ It supports emulating several instruction sets,
including x86, 32-bit ARMv7, ARMv8.
Features
➢ QEMU can save and restore the state of the
virtual machine with all programs running.
➢ Guest operating-systems do not need
patching in order to run inside QEMU.
➢ QEMU supports the emulation of various
architectures, including:
IA-32 (x86) PCs
x86-64 PCs
ARM development boards
QEMU Internals
➢ Portable dynamic translation
➢ Condition code optimisations
➢ CPU state optimisations
➢ Translation cache
➢ Direct block chaining
➢ Self-modifying code and translated code invalidation
➢ Exception support
➢ MMU emulation
➢ Device emulation
➢ Hardware interrupts
Supported disk image formats
➢ OS X Universal Disk Image Format (.dmg) – Read-only
➢ Bochs – Read-only
➢ Linux cloop – Read-only
➢ Parallels disk image (.hdd, .hds) – Read-only
➢ QEMU copy-on-write (.qcow2, qed, .qcow, cow)
➢ VirtualBox Virtual Disk Image (.vdi)
➢ Virtual PC Virtual Hard Disk (.vhd)
➢ Virtual VFAT
➢ VMware Virtual Machine Disk (.vmdk)
➢ Raw images (.img) that contain sector-by-sector contents of a
disk.
➢ CD/DVD images (.iso) that contain sector-by-sector contents
of an optical disk.

Qemu

  • 1.
  • 2.
    Introduction ➢ QEMU shortfor Quick Emulator. ➢ QEMU creates a virtual machine, similar to VMWare, Virtualbox, KVM, and Xen. ➢ It allows you to run one operating system from within another operating system. ➢ The operating systems can be the same ones, or different. ➢ Your memory resources will be divided between your native (host) OS and your virtual machine (guest) OS.
  • 3.
    ➢ QEMU isa free and open-source hosted hypervisor that performs hardware virtualization. ➢ It emulates CPUs through dynamic binary translation and provides a set of device models, enabling it to run a variety of unmodified guest operating systems. ➢ It also can be used together with KVM in order to run virtual machines at near-native speed. ➢ QEMU can also be used purely for CPU emulation for user-level processes, allowing applications compiled for one architecture to be run on another.
  • 4.
    Operating modes ➢ User-modeemulation ➢ System-mode emulation
  • 5.
    User-mode emulation ➢ Inthis mode QEMU runs single Linux programs that were compiled for a different instruction set. ➢ System calls are thunked for endianness and for 32/64 bit mismatches. ➢ Fast cross-compilation and cross-debugging are the main targets for user-mode emulation.
  • 6.
    System-mode emulation ➢ Inthis mode QEMU emulates a full computer system, including 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, windows. ➢ It supports emulating several instruction sets, including x86, 32-bit ARMv7, ARMv8.
  • 7.
    Features ➢ QEMU cansave and restore the state of the virtual machine with all programs running. ➢ Guest operating-systems do not need patching in order to run inside QEMU. ➢ QEMU supports the emulation of various architectures, including: IA-32 (x86) PCs x86-64 PCs ARM development boards
  • 8.
    QEMU Internals ➢ Portabledynamic translation ➢ Condition code optimisations ➢ CPU state optimisations ➢ Translation cache ➢ Direct block chaining ➢ Self-modifying code and translated code invalidation ➢ Exception support ➢ MMU emulation ➢ Device emulation ➢ Hardware interrupts
  • 9.
    Supported disk imageformats ➢ OS X Universal Disk Image Format (.dmg) – Read-only ➢ Bochs – Read-only ➢ Linux cloop – Read-only ➢ Parallels disk image (.hdd, .hds) – Read-only ➢ QEMU copy-on-write (.qcow2, qed, .qcow, cow) ➢ VirtualBox Virtual Disk Image (.vdi) ➢ Virtual PC Virtual Hard Disk (.vhd) ➢ Virtual VFAT ➢ VMware Virtual Machine Disk (.vmdk) ➢ Raw images (.img) that contain sector-by-sector contents of a disk. ➢ CD/DVD images (.iso) that contain sector-by-sector contents of an optical disk.