KVM (Kernel-based Virtual Machine)

From Bauman National Library
This page was last modified on 24 December 2015, at 11:50.
KVM
Kvm-logo 300dpi.png

Kernel-based Virtual Machine (KVM) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions Intel VT (Virtualization Technology) and AMD SVM (Secure Virtual Machine).It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko as well as userspace components (modifed QEMU). KVM is open source software. It was merged into the Linux kernel mainline in kernel version 2.6.20, which was released on February 5, 2007.[1] KVM requires a processor with harrdware virtualization extension.[2] KVM has also been ported to FreeBSD[3] in the form of loadable kernel modules.

A wide variety of guest operating systems work with KVM, including many flavours and versions of Linux, BSD, Solaris, Windows, Haiku, ReactOS, Plan 9, AROS Research Operating System[4] and OS X.[5] In addition, Android 2.2, GNU/Hurd[6] (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.[7]

Paravirtualization support for certain devices is available for Linux, OpenBSD,[8] FreeBSD,[9] NetBSD,[10] Plan 9[11] and Windows guests using the VirtIO[12] API. This supports a paravirtual Ethernet card, a paravirtual disk I/O controller,[13] a balloon device for adjusting guest memory usage, and a VGA graphics interface using SPICE or VMware drivers.

Internals

A high-level overview of the KVM/QEMU virtualization environment[14]

By itself, KVM does not perform any emulation. Instead, it exposes the /dev/kvm interface, which a userspace 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 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.

Internally, KVM uses SeaBIOS as an open source implementation of a 16-bit x86 BIOS.[15]

Licensing

KVM's parts are licensed under various GNU licenses:[16]

  • 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

History

Avi Kivity began the development of KVM at Qumranet, a technology startup company[17] that was acquired by Red Hat in 2008.[18]

KVM was merged into the Linux kernel mainline in kernel version 2.6.20, which was released on 5 February 2007.[1]

KVM is maintained by Paolo Bonzini.[19]

Graphical management tools

libvirt supports KVM
  • 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 OpenVZ. It has a bare-metal installer, a web-based remote management GUI, 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

Emulated hardware

Class Device
Video card Cirrus CLGD 5446 PCI VGA card, dummy VGA card with Bochs VESA extensions,[20] or Virgil as a virtual 3D GPU[21]
PCI Intel 440FX host PCI bridge and PIIX3 PCI to ISA bridge[20]
Input device PS/2 Mouse and Keyboard[20]
Sound card Sound Blaster 16, ENSONIQ AudioPCI ES1370, Gravis Ultrasound GF1], CS4231A compatible[20]
EthernetNetwork 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

Implementations

  • Debian 5.0 and above
  • Gentoo Linux
  • illumos-based distributions
  • OpenIndiana
  • Red Hat Enterprise Linux (RHEL) 5.4 and above
  • SmartOS
  • SUSE Linux Enterprise Server (SLES) 11 SP1 and above
  • Ubuntu 10.04 LTS and above
  • Univention Corporate Server

References

  1. 1.0 1.1 http://kernelnewbies.org/Linux_2_6_20#head-bca4fe7ffe454321118a470387c2be543ee51754
  2. http://www.linux-kvm.org/page/FAQ
  3. http://www.freebsd.org/news/status/report-2007-07-2007-10.html#Porting-Linux-KVM-to-FreeBSD
  4. http://www.linux-kvm.org/page/Guest_Support_Status
  5. http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/
  6. http://www.gnu.org/software/hurd/hurd/status.html
  7. http://www.linux-kvm.org/page/Guest_Support_Status
  8. http://www.openbsd.org/cgi-bin/man.cgi?query=virtio&manpath=OpenBSD%20Current&sektion=4&format=html
  9. http://people.freebsd.org/~kuriyama/virtio/
  10. http://netbsd.gw.com/cgi-bin/man-cgi?virtio++NetBSD-current
  11. http://code.google.com/p/plan9front/wiki/qemu
  12. http://lwn.net/Articles/239238/
  13. http://linux-iscsi.org/wiki/vHost
  14. http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/linuxonibm/liaav/LPCKVMSSPV2.1.pdf
  15. http://www.seabios.org/SeaBIOS
  16. Licensing info from Ubuntu 7.04 /usr/share/doc/kvm/copyright
  17. http://kerneltrap.org/node/8088
  18. http://www.redhat.com/en/about/press-releases/qumranet/
  19. http://www.linux.com/news/featured-blogs/200-libby-clark/821899-git-success-stories-and-tips-from-kvm-maintainer-paolo-bonzini
  20. 20.0 20.1 20.2 20.3 wiki.qemu.org – QEMU Emulator User Documentation
  21. http://airlied.livejournal.com/77553.html