From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.
Upon completion, be sure to remove all User:Egberts/Drafts from all Wiki links.

Virtualization is the concept and technique that permits running software in an environment separate from a computer operating system.

The operating system actually running on the hardware is referred to as the host. On this host resides a hypervisor (aka virtual machine manager), which runs virtual machines containing guest software.


There are two types of hypervisors:

  • Type-1 hypervisors are installed directly on hardware. (VMware ESXi, Xen)
  • Type-2 hypervisors are installed on top of an operating system. (VMware Workstation, QEMU/KVM)

Type-1 hypervisor

Type 1 hypervisors provide a higher level of performance as there is no overhead from the interaction of the hypervisor with the guest OS.

Type-2 hypervisor

Type-2 hypervisor subcategories are broken down into:

  • Software-assisted virtualization
  • (Pure) hardware-assisted (native) virtualization
  • Hybrid hardware-assisted virtualization

Virtualization concept is shown below:

Virtualization Modeling

Software-assisted virtualization

  • use of machine code translator (qemu/tcg, (VMware Workstation <7)

(Pure) hardware-assisted (native) virtualization

Hardware-assisted virtualization provides virtual machines with high performance because the physical CPU is partly mapped directly to the virtual CPU (vCPU); machine codes within guest VM are directly executed on host CPU.

  • CPU VT flag enables direct execution of binary code.

Hybrid hardware-assisted virtualization

By mitigating some performance hit, guest drivers are deployed to replace the direct-PCI drivers and allow multiple guest to share the same host devices.

This combination has been called "hybrid virtualization"

Virtualization software

There is a comparison table of virtualization software that can handle virtual machines and containers. QEMU is also broken out by its supported accelerators add-ons as well as its default software-emulation mode.

Virtual machines

Virtualizer Accelerator Virtualization type Description Gentoo package name
qemu tcg full[1]/software-emulation QEMU's own Tiny Code Generator. This is the default. More frequently denoted as qemu and not qemu/tcg so often. app-emulation/qemu
qemu hvf[2] paravirtualization[3] Apple's Hypervisor.framework based on Intel VT.
qemu whpx[4] hybrid Microsoft's Windows Hypervisor Platform based on Intel VT or AMD-V.
qemu kvm paravirtualization[5] Linux Type-2 Hypervisor. This is the common choice for host using amd64, arm64, or mips[6]. Supports Microsoft Windows. app-emulation/qemu
qemu haxm[7] paravirtualization[8] Intel VT, by Intel Corporation.
VMware ESXi n/a native VMware, Inc. sells a variety of closed-source hypervisors. Type-1 virtualization. Also uses libvirt driver. app-emulation/open-vm-tools
Xen kvm native Native, bare-metal, hypervisor that allows multiple distinct virtual machines (referred to as domains) to share a single physical machine. Type-1 Virtualization; supports Microsoft Windows guest OS app-emulation/xen
Xen n/a paravirtualization[9] Type-2 Virtualization; does not support Microsoft Windows guest OS[10] app-emulation/xen
VirtualBox n/a paravirtualization[11] Cross-platform virtualization software that allows users to run guest operating systems inside a Virtualbox host operating system. app-emulation/virtualbox
Bhyve (FreeBSD) n/a paravirtualization[12] bhyve, the "BSD hypervisor" is a hypervisor/virtual machine manager available on FreeBSD, macOS, and Illumos.
User-Mode Linux (UML) n/a paravirtualization[13] The UML driver for libvirt allows use and management of paravirtualized guests built for User Mode Linux. UML is a software-assist, Type-2 virtualization. incorporated into mainstream Linux repository in 2016

Wikipedia has more on virtualization this over at Libvirt#Supported Hypervisors.


Virtualizer Virtualization type Description Gentoo package name
Docker OS[14] Container virtualization environment which can establish development or runtime environments without modifying the environment of the base operating system. app-containers/docker
LXC (Linux Containers) OS[15] Virtualization system making use of the cgroups feature of the Linux kernel. app-containers/lxc
systemd-nspawn[16] OS[17] Systemd nspawn sys-apps/gentoo-systemd-integration
LXD OS[18] Next generation system container manager. app-containers/lxd
Podman OS[19] Daemonless container engine for developing, managing, and running OCI Containers on linux. app-containers/podman

See also

See also

External resources