Kernel-based Virtual Machine (KVM) is a
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
virtualization
In computing, virtualization (abbreviated v12n) is a series of technologies that allows dividing of physical computing resources into a series of virtual machines, operating systems, processes or containers.
Virtualization began in the 1960s wit ...
module in the
Linux kernel
The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
that allows the
kernel 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 called ...
. It was merged into the
mainline Linux kernel 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 emulates the hardw ...
extensions, such as
Intel VT or
AMD-V
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- ...
. KVM has also been ported to other operating systems such as
FreeBSD
FreeBSD is a free-software Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable ...
and
illumos
Illumos (stylized as "illumos") is a partly free and open-source Unix operating system. It has been developed since 2010 and is based on OpenSolaris, after the discontinuation of that product by Oracle. It comprises a kernel, device driver ...
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 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
processors but has since been
ported to
ESA/390
IBM Enterprise Systems Architecture is an instruction set architecture introduced by IBM as Enterprise Systems Architecture/370 (ESA/370) in 1988. It is based on the IBM System/370-XA architecture.
It extended the dual-address-space mechanis ...
,
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 discontinued Itanium family of 64-bit Intel microprocessors. The basic ISA specification originated at Hewlett-Packard (HP), and was subsequently implemented by ...
, and
ARM.
The IA-64 port was removed in 2014.
KVM supports
hardware-assisted virtualization
In computing, virtualization (abbreviated v12n) is a series of technologies that allows dividing of physical computing resources into a series of virtual machines, operating systems, processes or containers.
Virtualization began in the 1960s with ...
for a wide variety of guest operating systems including
BSD
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
,
Solaris
Solaris is the Latin word for sun.
It 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
** ''Sol ...
,
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
Haiku
is a type of short form poetry that originated in Japan. Traditional Japanese haiku consist of three phrases composed of 17 Mora (linguistics), morae (called ''On (Japanese prosody), on'' in Japanese) in a 5, 7, 5 pattern; that include a ''kire ...
,
ReactOS
ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
,
Plan 9,
AROS,
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
, and even other Linux systems. In addition, Android 2.2,
GNU/Hurd (
Debian
Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
K16),
Minix
MINIX is a Unix-like operating system based on a microkernel Software architecture, architecture, first released in 1987 and written by American-Dutch computer scientist Andrew S. Tanenbaum. It was designed as a clone of the Unix operating syste ...
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, virtualization (abbreviated v12n) is a series of technologies that allows dividing of physical computing resources into a series of virtual machines, operating systems, processes or containers.
Virtualization began in the 1960s with ...
support for Linux,
OpenBSD
OpenBSD is a security-focused operating system, security-focused, free software, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by fork (software development), forking NetBSD ...
, FreeBSD,
NetBSD
NetBSD is a free and open-source Unix-like operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was fork (software development), forked. It continues to ...
, Plan 9 and Windows guests using the VirtIO
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
. This includes a paravirtual
Ethernet card, disk I/O controller,
balloon driver, and a
VGA graphics interface using
SPICE
In the culinary arts, a spice is any seed, fruit, root, Bark (botany), bark, or other plant substance in a form primarily used for flavoring or coloring food. Spices are distinguished from herbs, which are the leaves, flowers, or stems of pl ...
or
VMware drivers.
History
Avi Kivity began the development of KVM in mid-2006 at
Qumranet, a technology
startup company
A startup or start-up is a company or project undertaken by an Entrepreneurship, entrepreneur to seek, develop, and validate a scalable business model. While entrepreneurship includes all new businesses including self-employment and businesses tha ...
that was acquired by
Red Hat
Red Hat, Inc. (formerly Red Hat Software, Inc.) is an American software company that provides open source software products to enterprises and is a subsidiary of IBM. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North ...
in 2008.
KVM surfaced in October 2006 and was merged into the Linux kernel mainline in version 2.6.20, released on 5 February 2007.
KVM is maintained by Paolo Bonzini.
Internals

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
The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
was provided to launch guests and deal with hardware emulation that is not 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 to ...
and numerous specialised VMMs built with frameworks such as rust-vmm.
Internally, KVM uses
SeaBIOS as an open source implementation of a 16-bit x86
BIOS
In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is a type of firmware used to provide runtime services for operating systems and programs and to perform hardware initialization d ...
.
Features
KVM has had support for
hot swappable vCPUs, dynamic memory management, and
Live Migration since February 2007. It also reduces the impact that memory write-intensive workloads have on the migration process.
Emulated hardware
KVM itself emulates very little hardware, instead deferring to a higher level client application such as
QEMU
The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
, 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 to ...
for device emulation.
KVM provides the following emulated devices:
* Virtual
CPU and memory
* VirtIO
Graphical management tools

*
Kimchi
Kimchi (; ) is a traditional Korean side dish (''banchan'') consisting of salted and fermented vegetables, most often napa cabbage or 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 an open-source virtualization management package including KVM and
LXC
Linux Containers (LXC) is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.
The Linux kernel provides the cgroups functionality that allows l ...
. 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 an Automated Workflow Engine for all Bare-Metal and VM deployment, as well as for all IT subsystems, enablin ...
management platform for managing heterogeneous data center infrastructures
*
GNOME Boxes Gnome interface for managing libvirt guests on Linux
*
oVirt open-source virtualization management tool for KVM built on top of
libvirt
Licensing
The kernel-mode component of KVM is a part of the
Linux kernel
The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
, itself licensed under
GNU General Public License, version 2.
See also
*
CloudStack
*
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 ...
*
Hyper-V
Hyper-V is a native hypervisor developed by Microsoft; it can create virtual machines on x86-64 systems running Windows. It is included in Pro and Enterprise editions of Windows (since Windows 8) as an optional feature to be manually enabled. A ...
*
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 id ...
(KSM)
*
Lguest
*
libguestfs
*
Open Virtualization Alliance
*
OpenNebula
OpenNebula is an open source cloud computing platform for managing heterogeneous data center, public cloud and edge computing infrastructure resources. OpenNebula manages on-premises and remote virtualization, virtual infrastructure to build priv ...
*
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 pla ...
*
Red Hat Virtualization
*
Vx32
*
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