Virtualization
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.
Hardware feature
Most modern computer architectures include support for virtualization at the hardware level.
For the AMD64 and x86 computer architectures, hardware virtualization is supported via AMD's AMD-V (svm) or Intel's Vt-x (vmx) virtualization extensions. The virtualization extensions must be supported by the processor and enabled in the system's firmware (typically the motherboard's firmware menu) in order to be accessible by guest operating system(s).
System firmware
Accessing the appropriate menu for enabling virtualization support in the system firmware is beyond the scope of this article. Each manufacture has a sightly different navigation and title for the setting. Generally, there is a toggle for "Virtualization" under the CPU settings of the motherboard firmware.
Once enabled at the firmware level, validate support is available in the kernel.
Kernel support
AMD CPUs
To inspect hardware for virtualization support issue the following command:
user $
grep --color -E "svm" /proc/cpuinfo
The running kernel supports hardware virtualization when "svm" is visible in the output.
Intel CPUs
Hardware virtualization support for Intel based systems can be tested by running the following command:
user $
grep --color -E "vmx" /proc/cpuinfo
The running kernel supports hardware virtualization when "vmx" is visible in the output.
Available software
Hypervisors
Name | Package | Description |
---|---|---|
QEMU | app-emulation/qemu | Quick EMUlator, a generic, open source, hardware emulator and virtualization suite. |
VirtualBox | app-emulation/virtualbox | Cross-platform virtualization software that allows users to run guest operating systems inside a host operating system. |
Xen | app-emulation/xen | Native, bare-metal, hypervisor that allows multiple distinct virtual machines (referred to as domains) to share a single physical machine. |
Containers
Containers provide isolated user space instances.
Name | Package | Description |
---|---|---|
Buildah | app-containers/buildah | Tool that facilitates building OCI images. |
Docker | app-containers/docker | Container virtualization environment which can establish development or runtime environments without modifying the environment of the base operating system. |
LXC (Linux Containers) | app-containers/lxc | Virtualization system making use of the cgroups feature of the Linux kernel. |
LXD | app-containers/lxd | Next generation system container manager. |
Podman | app-containers/podman | Daemonless container engine for developing, managing, and running OCI Containers on linux. |
Orchestration
Container orchestration concerns the details of managing multiple Linux containers. This management layer spins up and spins down individual containers. Examples of container managers are Docker and Mesos, although others exist. There is also container orchestration where K8/docker swarm and related software compete for similar management functions.
GUIs
Name | Package | Description |
---|---|---|
GNOME Boxes | gnome-extra/gnome-boxes | Simple GNOME application to access remote or virtual systems. |
virt-manager | app-emulation/virt-manager | Graphical tool for administering virtual machines. |
VirtualBox | app-emulation/virtualbox | A GUI is included by default with VirtualBox. The headless USE flag is can be enabled to remove GUI support.
|
Guest facilities
Guest facilities are packages that are installed and configured inside the guest domain (VM) that enables better interactions with its VM manager on the host platform. Such extra functionality may entail power-switch handling, graphic card passthrough, battery-level, or keyboard handling.
While guest facilities deals with Linux-centric guest OS, there are some tools that are specific to the host's (non-Linux) operating system.
The following packages are for Gentoo guests running inside virtual machines. See Category:QEMU Guests for tools helping to run other operating systems inside virtual machines.
Name | Package | Description | Host O/S |
---|---|---|---|
ACPI | sys-power/acpid | for proper shutdown handling by libvirt | Linux |
USB | net-misc/spice-gtk | USB redirection | Linux |
VirtualBox | app-emulation/virtualbox-guest-additions | VirtualBox Guest Additions | Windows/Linux/macOS |
VMware | app-emulation/open-vm-tools | VMware, Inc. sells a variety of closed-source hypervisors. | Windows/Linux/macOS |
See also
- Comparison of virtual machines — compares the features of several platform virtual machines.
- Recommended applications — applications recommended for use in a graphical environment (X11, Wayland)