Kernel-based Virtual Machine (KVM) is a
virtualization module in the
Linux kernel that allows the
kernel to function as a
hypervisor. 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 ...
in version 2.6.20, which was released on February 5, 2007.
KVM requires a processor with
hardware virtualization 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-as ...
. KVM has also been ported to other operating systems such as
FreeBSD and
illumos in the form of loadable kernel modules.
KVM was originally designed for
x86 processors but has since been
ported 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/9000 ...
,
PowerPC,
IA-64, and
ARM.
KVM provides
hardware-assisted virtualization for a wide variety of guest operating systems including Linux,
BSD,
Solaris,
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 se ...
,
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 ...
,
ReactOS,
Plan 9,
AROS Research Operating System
AROS Research Operating System (AROS, pronounced "AR-OS") is a free and open-source multi media centric implementation of the AmigaOS 3.1 application programming interface (API). Designed to be portable and flexible. , ports are available for ...
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 la ...
. 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, a ...
(
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 support for Linux,
OpenBSD, FreeBSD,
NetBSD, Plan 9 and Windows guests using the VirtIO
API. This includes a paravirtual
Ethernet card, disk I/O controller,
balloon driver, 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 now ...
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 drivers.
History
Avi Kivity began the development of KVM in mid-2006 at
Qumranet, a technology
startup company that was acquired by
Red Hat 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
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 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 and numerous specialised VMMs build with frameworks such as rust-vmm.
Internally, KVM uses
SeaBIOS 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 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, crosvm, or
Firecracker for device emulation.
KVM provides the following emulated devices:
* Virtual
CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
and memory
* VirtIO
Graphical management tools
*
Kimchi web-based virtualization management tool for KVM
*
Virtual Machine Manager
In computing, the Red Hat Virtual Machine Manager, also known as virt-manager, is a desktop virtual machine monitor.
Features
Virtual Machine Manager allows users to:
* create, edit, start and stop VMs
* view and control each VM's cons ...
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 Li ...
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 ...
. 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 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
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 X ...
*
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 ...
*
Kernel same-page merging (KSM)
*
Lguest
*
libguestfs
*
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 conso ...
*
OpenNebula
*
OpenStack
*
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