Virtualization

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.
Resources
This article has some todo items:
  • Reword.
  • Elaborate.
  • Explain guest facilities more.
  • Copy any relevant & still current content from old VPS article.
  • Add more packages.
  • Etc.

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

Many 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

Most virtualization systems provide software to be installed inside the guest operating systems, to provide extra functionality.

These packages are for Gentoo guests running inside virtual machines. See respective hypervisor documentation for tools helping to run other operating systems inside virtual machines.

Name Package Description
VirtualBox app-emulation/virtualbox-guest-additions VirtualBox Guest Additions
VMware app-emulation/open-vm-tools VMware, Inc. sells a variety of closed-source hypervisors.

See also