Kernel-based Virtual Machine (KVM) is a
virtualization
In computing, virtualization or virtualisation (sometimes abbreviated v12n, a numeronym) is the act of creating a virtual (rather than actual) version of something at the same abstraction level, including virtual computer hardware platforms, stor ...
module in the
Linux kernel that allows the
kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine learn ...
to function as a
hypervisor
A hypervisor (also known as a virtual machine monitor, VMM, or virtualizer) is a type of computer software, firmware or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is calle ...
. It was merged into the
mainline Linux kernel
The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU op ...
in version 2.6.20, which was released on February 5, 2007.
KVM requires a processor with
hardware virtualization
Hardware virtualization is the virtualization of computers as complete hardware platforms, certain logical abstractions of their componentry, or only the functionality required to run various operating systems. Virtualization hides the physica ...
extensions, such as
Intel VT
x86 virtualization is the use of hardware-assisted virtualization capabilities on an x86/x86-64 CPU.
In the late 1990s x86 virtualization was achieved by complex software techniques, necessary to compensate for the processor's lack of hardware-as ...
or
AMD-V. KVM has also been ported to other operating systems such as
FreeBSD and
illumos
Illumos (stylized as illumos) is a partly free and open-source Unix operating system. It is based on OpenSolaris, which was based on System V Release 4 (SVR4) and the Berkeley Software Distribution (BSD). Illumos comprises a kernel, device d ...
in the form of loadable kernel modules.
KVM was originally designed for
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was intr ...
processors but has since been
ported
In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program (meant for such execution) was originally desi ...
to
S/390
The IBM System/390 is a discontinued mainframe product family implementing the ESA/390, the fifth generation of the System/360 instruction set architecture. The first computers to use the ESA/390 were the Enterprise System/9000 (ES/90 ...
,
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
,
IA-64
IA-64 (Intel Itanium architecture) is the instruction set architecture (ISA) of the Itanium family of 64-bit Intel microprocessors. The basic ISA specification originated at Hewlett-Packard (HP), and was subsequently implemented by Intel in col ...
, and
ARM
In human anatomy, the arm refers to the upper limb in common usage, although academically the term specifically means the upper arm between the glenohumeral joint (shoulder joint) and the elbow joint. The distal part of the upper limb between th ...
.
KVM provides
hardware-assisted virtualization
In computing, hardware-assisted virtualization is a platform virtualization approach that enables efficient full virtualization using help from hardware capabilities, primarily from the host processors. A full virtualization is used to emulate a ...
for a wide variety of guest operating systems including Linux,
BSD
The Berkeley Software Distribution or Berkeley Standard Distribution (BSD) is a discontinued operating system based on Research Unix, developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berk ...
,
Solaris
Solaris may refer to:
Arts and entertainment Literature, television and film
* ''Solaris'' (novel), a 1961 science fiction novel by Stanisław Lem
** ''Solaris'' (1968 film), directed by Boris Nirenburg
** ''Solaris'' (1972 film), directed by ...
,
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
,
Haiku
is a type of short form poetry originally from Japan. Traditional Japanese haiku consist of three phrases that contain a ''kireji'', or "cutting word", 17 '' on'' (phonetic units similar to syllables) in a 5, 7, 5 pattern, and a ''kigo'', or s ...
,
ReactOS,
Plan 9,
AROS Research Operating System
AROS Research Operating System (AROS, pronounced "AR-OS") is a free and open-source software, free and open-source multi media centric implementation of the AmigaOS 3.1 application programming interface (API). Designed to be portable and flexib ...
and
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
. In addition, Android 2.2,
GNU/Hurd
GNU Hurd is a collection of microkernel servers written as part of GNU, for the GNU Mach microkernel. It has been under development since 1990 by the GNU Project of the Free Software Foundation, designed as a replacement for the Unix kernel, and ...
(
Debian K16),
Minix 3.1.2a, Solaris 10 U3 and
Darwin 8.0.1, together with other operating systems and some newer versions of these listed, are known to work with certain limitations.
Additionally, KVM provides
paravirtualization
In computing, paravirtualization or para-virtualization is a virtualization technique that presents a software interface to the virtual machines which is similar, yet not identical, to the underlying hardware–software interface.
The intent o ...
support for Linux,
OpenBSD, FreeBSD,
NetBSD, Plan 9 and Windows guests using the VirtIO
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
. This includes a paravirtual
Ethernet card, disk I/O controller,
balloon driver In computing, memory ballooning is a technique used to eliminate the need to overprovision host memory used by a virtual machine (VM). To implement it, the virtual machine's kernel implements a "balloon driver" which allocates unused memory within ...
, and a
VGA
Video Graphics Array (VGA) is a video display controller and accompanying de facto graphics standard, first introduced with the IBM PS/2 line of computers in 1987, which became ubiquitous in the PC industry within three years. The term can no ...
graphics interface using
SPICE
A spice is a seed, fruit, root, bark, or other plant substance primarily used for flavoring or coloring food. Spices are distinguished from herbs, which are the leaves, flowers, or stems of plants used for flavoring or as a garnish. Spices a ...
or
VMware
VMware, Inc. is an American cloud computing and virtualization technology company with headquarters in Palo Alto, California. VMware was the first commercially successful company to virtualize the x86 architecture.
VMware's desktop software ru ...
drivers.
History
Avi Kivity began the development of KVM in mid-2006 at
Qumranet
Qumranet, Inc. was an enterprise software company offering a desktop virtualization platform based on hosted desktops in Kernel-based Virtual Machines (KVM) on servers, linked with their SPICE protocol. The company was also the creator, maintainer ...
, a technology
startup company
A startup or start-up is a company or project undertaken by an entrepreneur to seek, develop, and validate a scalable business model. While entrepreneurship refers to all new businesses, including self-employment and businesses that never intend ...
that was acquired by
Red Hat
Red Hat, Inc. is an American software company that provides open source software products to enterprises. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North Carolina, with other offices worldwide.
Red Hat has become ass ...
in 2008.
KVM surfaced in October, 2006 and was merged into the Linux kernel mainline in kernel version 2.6.20, which was released on 5 February 2007.
KVM is maintained by Paolo Bonzini.
Internals
![Kernel-based Virtual Machine](https://upload.wikimedia.org/wikipedia/commons/4/40/Kernel-based_Virtual_Machine.svg)
KVM provides device abstraction but no processor emulation. It exposes the interface, which a user mode host can then use to:
* Set up the guest VM's address space. The host must also supply a firmware image (usually a custom BIOS when emulating PCs) that the guest can use to bootstrap into its main OS.
* Feed the guest simulated I/O.
* Map the guest's video display back onto the system host.
Originally a forked version of
QEMU
QEMU is a free and open-source emulator (Quick EMUlator). It emulates the machine's central processing unit, processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it t ...
was provided to launch guests and deal with hardware emulation that isn't handled by the kernel. That support was eventually merged into the upstream project. There are now numerous Virtual Machine Monitors (VMMs) which can utilise the KVM interface including kvmtool, crosvm and
Firecracker
A firecracker (cracker, noise maker, banger) is a small explosive device primarily designed to produce a large amount of noise, especially in the form of a loud bang, usually for celebration or entertainment; any visual effect is incidental t ...
and numerous specialised VMMs build with frameworks such as rust-vmm.
Internally, KVM uses
SeaBIOS
SeaBIOS is an open-source implementation of an x86 BIOS, serving as a freely available firmware for x86 systems. Aiming for compatibility, it supports standard BIOS features and calling interfaces that are implemented by a typical proprietary x ...
as an open source implementation of a 16-bit x86
BIOS.
Features
KVM has had support for
hot swappable vCPUs, dynamic memory management, and
Live Migration
Live migration refers to the process of moving a running virtual machine (VM) or application between different physical machines without disconnecting the client or application. Memory, storage, and network connectivity of the virtual machine are ...
since February 2007. Memory write intensive workload impact in migration process
Emulated hardware
KVM itself emulates very little hardware, instead deferring to a higher level client application such as
QEMU
QEMU is a free and open-source emulator (Quick EMUlator). It emulates the machine's central processing unit, processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it t ...
, crosvm, or
Firecracker
A firecracker (cracker, noise maker, banger) is a small explosive device primarily designed to produce a large amount of noise, especially in the form of a loud bang, usually for celebration or entertainment; any visual effect is incidental t ...
for device emulation.
KVM provides the following emulated devices:
* Virtual
CPU and memory
* VirtIO
Graphical management tools
![Libvirt support](https://upload.wikimedia.org/wikipedia/commons/d/d0/Libvirt_support.svg)
*
Kimchi
''Kimchi'' (; ko, 김치, gimchi, ), is a traditional Korean side dish of salted and fermented vegetables, such as napa cabbage and Korean radish. A wide selection of seasonings are used, including '' gochugaru'' (Korean chili powder), ...
web-based virtualization management tool for KVM
*
Virtual Machine Manager supports creating, editing, starting, and stopping KVM-based virtual machines, as well as live or cold drag-and-drop migration of VMs between hosts.
*
Proxmox Virtual Environment
Proxmox Virtual Environment (Proxmox VE or PVE) is an open-source software server for virtualization management. It is a hosted hypervisor that can run operating systems including Linux and Windows on x64 hardware. It is a Debian-based Lin ...
an open-source virtualization management package including KVM and
LXC. It has a bare-metal installer, a web-based remote management GUI, a HA cluster stack, unified storage, flexible network, and optional commercial support.
*
OpenQRM
openQRM is a free and open-source cloud computing management platform for managing heterogeneous data centre infrastructures.
Provides a complete Automated Workflow Engine for all Bare-Metal and VM deployment, as well as for all IT subsystems, e ...
management platform for managing heterogeneous data center infrastructures
*
GNOME Boxes
GNOME Boxes is an application of the GNOME Desktop Environment, used to access virtual systems. Boxes uses the QEMU, KVM, and libvirt virtualization technologies.
GNOME Boxes requires the CPU to support some form of hardware-assisted virtual ...
Gnome interface for managing libvirt guests on Linux
*
oVirt
oVirt is a free, open-source virtualization management platform. It was founded by Red Hat as a community project on which Red Hat Virtualization is based. It allows centralized management of virtual machines, compute, storage and networking ...
open-source virtualization management tool for KVM built on top of
libvirt
libvirt is an open-source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESXi, QEMU and other virtualization technologies. These APIs are widely used in the orchestration laye ...
Licensing
The kernel-mode component of KVM is a part of
Linux kernel, itself licensed under
GNU General Public License, version 2.
See also
*
CloudStack
CloudStack is open-source cloud computing software for creating, managing, and deploying infrastructure cloud services. It uses existing hypervisor platforms for virtualization, such as KVM, VMware vSphere, including ESXi and vCenter, and ...
*
Comparison of platform virtualization software
Platform virtualization software, specifically emulators and hypervisors, are software packages that emulate the whole physical computer machine, often providing multiple virtual machines on one physical platform. The table below compares basic i ...
*
Kernel same-page merging
In computing, kernel same-page merging (KSM), also known as kernel shared memory, memory merging, memory deduplication, and page deduplication is a kernel feature that makes it possible for a hypervisor system to share memory pages that have ide ...
(KSM)
*
Lguest
*
libguestfs
libguestfs is a C library and a set of tools for accessing and modifying virtual disk images used in platform virtualization. The tools can be used for viewing and editing virtual machines (VMs) managed by libvirt and files inside VMs, scripting ...
*
Open Virtualization Alliance
The Open Virtualization Alliance (OVA) was a Linux Foundation Collaborative Project committed to foster the adoption of free and open-source software virtualization solutions including KVM, but also software to manage such, e.g. oVirt. The cons ...
*
OpenNebula
OpenNebula is a cloud computing platform for managing heterogeneous distributed data center infrastructures. The OpenNebula platform manages a data center's virtual infrastructure to build private, public and hybrid implementations of Infrastru ...
*
OpenStack
OpenStack is a free, open standard cloud computing platform. It is mostly deployed as infrastructure-as-a-service (IaaS) in both public and private clouds where virtual servers and other resources are made available to users. The software pl ...
*
Red Hat Virtualization
Red Hat Virtualization (RHV) formerly known as Red Hat Enterprise Virtualization, is an x86 virtualization product developed by Red Hat, and is based on the KVM hypervisor. Red Hat Virtualization uses the SPICE protocol and VDSM (Virtual Deskt ...
*
Vx32
{{Infobox software
, name = Vx32
, title = Vx32
, logo =
, screenshot =
, caption =
, collapsible =
, author =
, developer ...
*
Xen
References
Bibliography
*
External links
*
Best practices for the Kernel-based Virtual Machine IBM, second edition, April 2012
Virtio-blk Performance Improvement KVM Forum 2012, November 8, 2012, by Asias He
Wikibook QEMU & KVMcrosvm - chrome OS virtual machine monitorFirecracker VMM for KVM
{{DEFAULTSORT:Kernel-based Virtual Machine
Free emulation software
Free software programmed in C
Free virtualization software
Linux kernel features
Virtualization software
Virtualization software for Linux
Red Hat software