Kernel-based Virtual Machine
|Developer(s)||Open Virtualization Alliance (OVA)|
|Platform||ARM, IA-64, PowerPC, S/390, x86, x86-64|
|License||GNU GPL or LGPL|
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 Linux kernel mainline in kernel 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. KVM has also been ported to other operating systems such as FreeBSD and illumos in the form of loadable kernel modules.
KVM provides hardware-assisted virtualization for a wide variety of guest operating systems including Linux, BSD, Solaris, Windows, Haiku, ReactOS, Plan 9, AROS Research Operating System and macOS. In addition, Android 2.2, GNU/Hurd (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 device, and a VGA graphics interface using SPICE or VMware drivers.
KVM is maintained by Paolo Bonzini.
KVM provides device abstraction but no processor emulation. It exposes the /dev/kvm 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.
On Linux, QEMU versions 0.10.1 and later is one such userspace host. QEMU uses KVM when available to virtualize guests at near-native speeds, but otherwise falls back to software-only emulation.
This article may be confusing or unclear to readers. In particular, previous sections says KVM does no emulate anything by itself, but this section lists emulated hardware. Some clarification from experts is welcome.. (February 2019) (Learn how and when to remove this template message)
|Video card||Cirrus CLGD 5446 PCI VGA card, dummy VGA card with Bochs VESA extensions, or Virgil as a virtual 3D GPU|
|PCI||i440FX host PCI bridge and PIIX3 PCI to ISA bridge|
|Input device||PS/2 Mouse and Keyboard|
|Sound card||Sound Blaster 16, ENSONIQ AudioPCI ES1370, Gravis Ultrasound GF1, CS4231A compatible|
|Ethernet Network card||AMD Am79C970A (Am7990), E1000 (Intel 82540EM, 82573L, 82544GC), NE2000, and Realtek RTL8139|
|Watchdog timer||Intel 6300ESB or IB700|
|RAM||between 50 MB and 32 TB|
|CPU||1 – 160 CPUs|
Graphical management tools
- Kimchi – 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. 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
KVM's parts are licensed under various GNU licenses:
- KVM kernel module: GPL v2
- KVM user module: LGPL v2
- QEMU virtual CPU core library (libqemu.a) and QEMU PC system emulator: LGPL
- Linux user mode QEMU emulator: GPL
- BIOS files (bios.bin, vgabios.bin and vgabios-cirrus.bin): LGPL v2 or later
- "Linux kernel 2.6.20, Section 2.2. Virtualization support through KVM". kernelnewbies.org. 2007-02-05. Retrieved 2014-06-16.
- KVM FAQ: What do I need to use KVM?
- "FreeBSD Quarterly Status Report: Porting Linux KVM to FreeBSD".
- "KVM on illumos".
- "Gmane - Mail To News And Back Again". Archived from the original on 2007-09-29. Retrieved 2007-05-07.
- Gmane Loom Archived 2007-09-29 at the Wayback Machine
- "KVM/ARM Open Source Project". Archived from the original on 2013-03-10. Retrieved 2017-11-01.
- "KVM wiki: Guest support status". Retrieved 2007-05-27.
- "Running Mac OS X as a QEMU/KVM Guest". Retrieved 2014-08-20.
- "status". Gnu.org. Retrieved 2014-02-12.
- "Guest Support Status - KVM". Linux-kvm.org. Retrieved 2014-02-12.
- "OpenBSD man page virtio(4)". Retrieved 2018-02-04.
- "virtio binary packages for FreeBSD". Retrieved 2012-10-29.
- "NetBSD man page virtio(4)". Retrieved 2013-07-15.
- "plan9front". Retrieved 2013-02-11.
- "An API for virtual I/O: virtio". LWN.net. 2007-07-11. Retrieved 2014-04-16.
- "SCSI target for KVM wiki". linux-iscsi.org. 2012-08-07. Retrieved 2012-08-12.
- Interview: Avi Kivity Archived 2007-04-26 at the Wayback Machine on KernelTrap
- "Red Hat Advances Virtualization Leadership with Qumranet, Inc. Acquisition". Red Hat. 4 September 2008. Retrieved 16 June 2015.
- Libby Clark (7 April 2015). "Git Success Stories and Tips from KVM Maintainer Paolo Bonzini". Linux.com. Archived from the original on 15 March 2016. Retrieved 17 June 2015.
- Khoa Huynh; Stefan Hajnoczi (2010). "KVM/QEMU Storage Stack Performance Discussion" (PDF). IBM. Linux Plumbers Conference. Retrieved January 3, 2015.[permanent dead link]
- "SeaBIOS". seabios.org. 2013-12-21. Retrieved 2014-06-16.
- wiki.qemu.org – QEMU Emulator User Documentation, read 2010-05-06
- "Introducing Virgil - 3D virtual GPU for qemu". 2013-07-18. Archived from the original on 2013-07-25.
- Licensing info from Ubuntu 7.04 /usr/share/doc/kvm/copyright
- Amit Shah (2016-11-02). "Ten years of KVM". lwn.net. Retrieved 2017-02-10.
- Official website
- 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 & KVM