Content deleted Content added
TheSameGuy (talk | contribs) m Rearranged categories in a way that makes more sense |
Guy Harris (talk | contribs) Better reference for z/Architecture and PPC, and also a reference for IA-64. Add another reference for "s390" really meaning "s390x", i.e. z/Architecture. |
||
(107 intermediate revisions by 57 users not shown) | |||
Line 1:
{{short description|Virtualization module in the Linux kernel}}
{{Distinguish|KVM switch}}▼
{{Infobox software
| name
| logo
| logo size
| screenshot
| screenshot size
| caption
| author
| developer =
| operating_system
| programming_language
| platform = [[ARM architecture|ARM]], [[
| genre
| license
| website
}}
▲{{Distinguish|KVM switch}}
'''Kernel-based Virtual Machine''' ('''KVM''') is a [[free and open-source]] [[virtualization]] module in the [[Linux kernel]] that allows the [[Kernel (operating system)|kernel]] to function as a [[hypervisor]]. It was merged into the
| url = http://kernelnewbies.org/Linux_2_6_20#head-bca4fe7ffe454321118a470387c2be543ee51754
| title = Linux kernel 2.6.20, Section 2.2. Virtualization support through KVM
| date = 2007-02-05
| | website = kernelnewbies.org}}</ref> KVM requires a processor with [[hardware virtualization]] extensions, such as [[Intel VT]] or [[AMD-V]].<ref>[http://www.linux-kvm.org/page/FAQ#What_do_I_need_to_use_KVM.3F KVM FAQ: What do I need to use KVM?]</ref> KVM has also been ported to other operating systems such as [[FreeBSD]]<ref>{{cite web|url=http://www.freebsd.org/news/status/report-2007-07-2007-10.html#Porting-Linux-KVM-to-FreeBSD|title=FreeBSD Quarterly Status Report: Porting Linux KVM to FreeBSD}}</ref> and [[illumos]]<ref>{{cite web|url=http://dtrace.org/blogs/bmc/2011/08/15/kvm-on-illumos/|title=KVM on illumos|date=15 August 2011 }}</ref> in the form of loadable kernel modules.▼
▲}}</ref> KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V.<ref>[http://www.linux-kvm.org/page/FAQ#What_do_I_need_to_use_KVM.3F KVM FAQ: What do I need to use KVM?]</ref> KVM has also been ported to other operating systems such as [[FreeBSD]]<ref>{{cite web|url=http://www.freebsd.org/news/status/report-2007-07-2007-10.html#Porting-Linux-KVM-to-FreeBSD|title=FreeBSD Quarterly Status Report: Porting Linux KVM to FreeBSD}}</ref> and [[illumos]]<ref>{{cite web|url=http://dtrace.org/blogs/bmc/2011/08/15/kvm-on-illumos/|title=KVM on illumos}}</ref> in the form of loadable kernel modules.
KVM was originally designed for [[x86]] processors but has since been [[porting|ported]] to [[z/Architecture]],<ref name="2626notes">{{cite web
| url = https://kernelnewbies.org/Linux_2_6_26#KVM_ported_to_IA64.2C_PPC_and_S390
| title = Linux_2_6_26
| at = 1.2. KVM ported to IA64, PPC and S390
| date = 2008-07-13
| access-date = 2025-08-23
| website = kernelnewbies.org}}</ref><ref>{{cite web |url=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0c632db637d68ad39d9f97f452ce176253f5f4e |title=KVM: s390: arch backend for the kvm kernel module |date=2008-04-27}}</ref> [[PowerPC]],<ref name="2626notes" /> [[IA-64]],<ref name="2626notes" /> and [[ARM architecture|ARM]].<ref>{{cite web |url=https://systems.cs.columbia.edu/projects/kvm-arm/ |title=KVM/ARM: An Open-Source ARM Virtualization System}}</ref><ref>{{Cite web |url=https://columbia.github.com/linux-kvm-arm |title=KVM/ARM Open Source Project |access-date=2017-11-01 |archive-url=https://web.archive.org/web/20130310052146/http://columbia.github.com/linux-kvm-arm/ |archive-date=2013-03-10 |url-status=dead }}</ref><ref>{{Cite journal|url=https://dl.acm.org/doi/10.1145/2654822.2541946 | title = KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor | author1 = Christoffer Dall | author2 = Jason Nieh | journal = SIGARCH Comput. Archit. News | publisher = ACM International Conference on Architectural Support for Programming Languages and Operating Systems | date = 2014| volume = 42 | issue = 1 | pages = 333–348 | doi = 10.1145/2654822.2541946 }}</ref>
The IA-64 port was removed in 2014.<ref>{{Cite web|url=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=003f7de6258900e17f6206e8e417d76c75ca549f | title=kernel/git/torvalds/linux.git: KVM: ia64: remove}}</ref>
KVM
Additionally, KVM provides [[paravirtualization]] support for Linux, [[OpenBSD]],<ref>{{cite web |url=https://man.openbsd.org/virtio.4|title=OpenBSD man page virtio(4) |
==History==
[[Avi Kivity]] began the development of KVM in mid-2006 at [[Qumranet]], a technology [[startup company]]<ref>[http://kerneltrap.org/node/8088 Interview: Avi Kivity] {{webarchive|url=https://web.archive.org/web/20070426033902/http://kerneltrap.org/node/8088 |date=2007-04-26 }} on [[KernelTrap]]</ref> that was acquired by [[Red Hat]] in 2008.<ref>{{cite web
| url = http://www.redhat.com/en/about/press-releases/qumranet
| title = Red Hat Advances Virtualization Leadership with Qumranet, Inc. Acquisition
| date = 4 September 2008
| | publisher = [[Red Hat]]}}</ref>
KVM surfaced in October 2006<ref>{{Cite web|url=https://www.itworldcanada.com/article/kvm-15-equipped-with-live-migration/7901|title=KVM 15 equipped with live migration | IT World Canada News|date=7 March 2007}}</ref> and was merged into the Linux kernel mainline in
KVM is maintained by Paolo Bonzini.<ref>{{cite web
| url = http://www.linux.com/news/featured-blogs/200-libby-clark/821899-git-success-stories-and-tips-from-kvm-maintainer-paolo-bonzini
| title = Git Success Stories and Tips from KVM Maintainer Paolo Bonzini
| date = 7 April 2015
| | author = Libby Clark
| publisher = [[Linux.com]] | archive-url = https://web.archive.org/web/20160315095510/http://www.linux.com/news/featured-blogs/200-libby-clark/821899-git-success-stories-and-tips-from-kvm-maintainer-paolo-bonzini
| archive-date = 15 March 2016
| url-status = dead
| df = dmy-all}}</ref>
== Internals ==
[[File:Kernel-based Virtual Machine.svg|thumb|right|upright=1.8|A high-level overview of the KVM/QEMU virtualization environment<ref>{{cite web
| url = http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/linuxonibm/liaav/LPCKVMSSPV2.1.pdf
| title = KVM/QEMU Storage Stack Performance Discussion
| year = 2010
|
| author1 = Khoa Huynh
| author2 = Stefan Hajnoczi
| publisher = Linux Plumbers Conference
| website =
}}{{dead link
| date = January 2018
| bot = InternetArchiveBot
| fix-attempted = yes}}</ref>{{rp|3}}]]
* Set up the guest VM's address space.
* 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 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_(software)|Firecracker]] 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]].<ref>{{cite web|url=http://www.seabios.org/SeaBIOS |title=SeaBIOS |publisher=seabios.org |date=2013-12-21 |
==Features==
== Emulated hardware ==▼
KVM has had support for [[Hot swapping|hot swappable vCPUs]],<ref>{{Cite web|url=https://access.redhat.com/articles/1339413|title=Hot Plugging Virtual CPUs with Red Hat Enterprise Virtualization Manager|date=16 February 2016 }}</ref> dynamic memory management,<ref>{{Cite web|url=https://www.linux-kvm.org/page/FAQ#Is_dynamic_memory_management_for_guests_supported.3F|title=Faq - KVM}}</ref> and [[Live Migration]] since February 2007.<ref>{{Cite web|url=https://lwn.net/Articles/223754/|title = KVM-15 release [LWN.net]}}</ref><ref>{{Cite web|url=https://www.linux-kvm.org/page/Migration|title = Migration - KVM}}</ref> It also reduces the impact that memory write-intensive workloads have on the migration process.<ref>{{Cite web|url=https://www.berrange.com/posts/2016/05/12/analysis-of-techniques-for-ensuring-migration-completion-with-kvm/|title=Daniel P. Berrangé » Blog Archive » Analysis of techniques for ensuring migration completion with KVM}}</ref>
== Graphical management tools ==▼
KVM itself emulates very little hardware, instead deferring to a higher level client application such as [[QEMU]], crosvm, or [[Firecracker (software)|Firecracker]] for device emulation.
KVM provides the following emulated devices:
* Virtual [[CPU]] and memory<ref>{{cite web | url=https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-irqchip | title=The Definitive KVM (Kernel-based Virtual Machine) API Documentation — the Linux Kernel documentation }}</ref>
* VirtIO
[[File:Libvirt support.svg|thumb|300px|[[libvirt]] supports KVM]]
Line 98 ⟶ 103:
* [[Virtual Machine Manager]]{{snd}} 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]]{{snd}} 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]]{{snd}} management platform for managing heterogeneous data center infrastructures
* [[GNOME Boxes]]{{snd}} Gnome interface for managing libvirt guests on Linux
* [[oVirt]]{{snd}} 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]], itself licensed under [[GNU General Public License#Version 2|GNU General Public License, version 2]].<ref name="Linux_Licensing">{{Cite web|url=https://www.kernel.org/doc/html/latest/process/license-rules.html#kernel-licensing|title=Linux kernel licensing rules — The Linux Kernel documentation|website=www.kernel.org|access-date=2020-01-06|archive-date=7 March 2020|archive-url=https://web.archive.org/web/20200307065451/https://www.kernel.org/doc/html/latest/process/license-rules.html#kernel-licensing|url-status=live}}</ref>
==
{{Portal|Free and open-source software|Linux}}
Line 116:
* [[CloudStack]]
* [[Comparison of platform virtualization software]]
* [[Kernel same-page merging]] (KSM)
* [[Lguest]]
* [[libguestfs]]
▲* [[libvirt]]
* [[Open Virtualization Alliance]]
* [[OpenNebula]]
* [[OpenStack]]
* [[
* [[Vx32]]
* [[Xen]]
Line 131:
{{Reflist|30em}}
==
* {{cite web|
▲* {{cite web|accessdate=2017-02-10|title=Ten years of KVM|url=https://lwn.net/Articles/705160/|website=lwn.net|author=Amit Shah|date=2016-11-02}}
==External links==
* [http://public.dhe.ibm.com/software/dw/linux390/perf/ZSW03346USEN.pdf Best practices for the Kernel-based Virtual Machine] {{Webarchive|url=https://web.archive.org/web/20191106035557/http://public.dhe.ibm.com/software/dw/linux390/perf/ZSW03346USEN.pdf |date=2019-11-06 }}, IBM, second edition, April 2012
* [https://web.archive.org/web/20141021055601/http://www.linux-kvm.org/wiki/images/f/f9/2012-forum-virtio-blk-performance-improvement.pdf Virtio-blk Performance Improvement], KVM Forum 2012, November 8, 2012, by Asias He
* [https://web.archive.org/web/20101128114720/http://qemu-buch.de/e/Content Wikibook QEMU & KVM]
* [https://chromium.googlesource.com/chromiumos/platform/crosvm/ crosvm - Chrome OS virtual machine monitor]
* [https://firecracker-microvm.github.io/ Firecracker VMM for KVM]
{{Virtualization products}}
Line 152:
[[Category:Linux kernel features]]
[[Category:Virtualization software]]
[[Category:Virtualization
[[Category:Red Hat software]]
|