Kernel-based Virtual Machine explained

KVM
Logo Size:160px
Screenshot Size:300px
Author:Qumranet
Developer:The Linux Kernel community
Operating System:Unix-like
Programming Language:C
Platform:ARM, PowerPC, ESA/390, IA-32, x86-64
Genre:Hypervisor
License:GNU GPL or LGPL

Kernel-based Virtual Machine (KVM) is a free and open-source virtualization module in the Linux kernel that allows the kernel to function as a hypervisor. It was merged into the mainline Linux kernel in version 2.6.20, which was released on February 5, 2007.[1] KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V.[2] KVM has also been ported to other operating systems such as FreeBSD[3] and illumos[4] in the form of loadable kernel modules.

KVM was originally designed for x86 processors but has since been ported to ESA/390,[5] PowerPC,[6] IA-64, and ARM.[7] [8] The IA-64 port was removed in 2014.[9]

KVM supports hardware-assisted virtualization for a wide variety of guest operating systems including BSD, Solaris, Windows, Haiku, ReactOS, Plan 9, AROS, macOS, and even other Linux systems.[10] [11] In addition, Android 2.2, GNU/Hurd[12] (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.[13]

Additionally, KVM provides paravirtualization support for Linux, OpenBSD,[14] FreeBSD,[15] NetBSD,[16] Plan 9[17] and Windows guests using the VirtIO API.[18] This includes a paravirtual Ethernet card, disk I/O controller,[19] balloon driver, and a VGA graphics interface using SPICE or VMware drivers.

History

Avi Kivity began the development of KVM in mid-2006 at Qumranet, a technology startup company[20] that was acquired by Red Hat in 2008.[21]

KVM surfaced in October 2006[22] 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.[23]

Internals

KVM provides device abstraction but no processor emulation. It exposes the interface, which a user mode host can then use to:

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 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.[24]

Features

KVM has had support for hot swappable vCPUs,[25] dynamic memory management,[26] and Live Migration since February 2007.[27] [28] It also reduces the impact that memory write-intensive workloads have on the migration process.[29]

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:

Graphical management tools

Licensing

The kernel-mode component of KVM is a part of Linux kernel, itself licensed under GNU General Public License, version 2.[31]

See also

Bibliography

External links

Notes and References

  1. Web site: Linux kernel 2.6.20, Section 2.2. Virtualization support through KVM . 2007-02-05 . 2014-06-16 . kernelnewbies.org.
  2. http://www.linux-kvm.org/page/FAQ#What_do_I_need_to_use_KVM.3F KVM FAQ: What do I need to use KVM?
  3. Web site: FreeBSD Quarterly Status Report: Porting Linux KVM to FreeBSD.
  4. Web site: KVM on illumos.
  5. Web site: Gmane - Mail To News And Back Again . 2007-05-07 . https://web.archive.org/web/20070929124348/http://article.gmane.org/gmane.comp.emulators.kvm.devel/2570 . 2007-09-29 . dead .
  6. http://news.gmane.org/gmane.comp.emulators.kvm.devel/2595 Gmane Loom
  7. Web site: KVM/ARM Open Source Project . 2017-11-01 . https://web.archive.org/web/20130310052146/http://columbia.github.com/linux-kvm-arm/ . 2013-03-10 . dead .
  8. Web site: KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor . Christoffer Dall . Jason Nieh . ACM International Conference on Architectural Support for Programming Languages and Operating Systems . 2014.
  9. Web site: kernel/git/torvalds/linux.git: KVM: ia64: remove.
  10. Web site: KVM wiki: Guest support status . 2007-05-27 .
  11. Web site: Running Mac OS X as a QEMU/KVM Guest. 2014-08-20.
  12. Web site: status . Gnu.org . 2014-02-12.
  13. Web site: Guest Support Status - KVM . Linux-kvm.org . 2014-02-12.
  14. Web site: OpenBSD man page virtio(4) . 2018-02-04.
  15. Web site: virtio binary packages for FreeBSD. 2012-10-29.
  16. Web site: NetBSD man page virtio(4) . 2013-07-15 . 2019-11-13 . https://web.archive.org/web/20191113035952/https://netbsd.gw.com/cgi-bin/man-cgi?virtio++NetBSD-current . dead .
  17. Web site: plan9front . 2013-02-11.
  18. Web site: An API for virtual I/O: virtio . 2007-07-11 . 2014-04-16 . LWN.net.
  19. Web site: SCSI target for KVM wiki . linux-iscsi.org . 2012-08-07 . 2012-08-12 . 2020-06-05 . https://web.archive.org/web/20200605120413/http://linux-iscsi.org/wiki/VHost . dead .
  20. http://kerneltrap.org/node/8088 Interview: Avi Kivity
  21. Web site: Red Hat Advances Virtualization Leadership with Qumranet, Inc. Acquisition . 4 September 2008 . 16 June 2015 . Red Hat.
  22. Web site: KVM 15 equipped with live migration | IT World Canada News. 7 March 2007.
  23. Web site: Git Success Stories and Tips from KVM Maintainer Paolo Bonzini . 7 April 2015 . 17 June 2015 . Libby Clark . . 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 . 15 March 2016 . dead . dmy-all.
  24. Web site: SeaBIOS . seabios.org . 2013-12-21 . 2014-06-16.
  25. Web site: Hot Plugging Virtual CPUs with Red Hat Enterprise Virtualization Manager.
  26. Web site: Faq - KVM.
  27. Web site: KVM-15 release [LWN.net].
  28. Web site: Migration - KVM.
  29. Web site: Daniel P. Berrangé » Blog Archive » Analysis of techniques for ensuring migration completion with KVM.
  30. Web site: The Definitive KVM (Kernel-based Virtual Machine) API Documentation — the Linux Kernel documentation .
  31. Web site: Linux kernel licensing rules — The Linux Kernel documentation. www.kernel.org. 2020-01-06. 7 March 2020. https://web.archive.org/web/20200307065451/https://www.kernel.org/doc/html/latest/process/license-rules.html#kernel-licensing. live.