ArticleslgStudy

computer science

Kernel-based Virtual Machine

Kernel-based Virtual Machine is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Kernel-based Virtual Machine rather than just read about it. In short: 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.

Kernel-based Virtual Machine — main illustration
Kernel-based Virtual Machine — illustration

Key takeaways

  • Kernel-based Virtual Machine belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Kernel-based Virtual Machine to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Kernel-based Virtual Machine from memory before moving on to harder problems.

Reference excerpt

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. 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 was originally designed for x86 processors but has since been ported to z/Architecture, PowerPC, IA-64, and ARM. The IA-64 port was removed in 2014. 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. 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 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 that was acquired by Red Hat in 2008. KVM surfaced in October 2006 and was merged into the Linux kernel mainline in version 2.6.20, released on 5 February 2007. KVM is maintained by Paolo Bonzini.

Internals

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. 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 built 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. It also reduces the impact that memory write-intensive workloads have on the 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 and memory VirtIO

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 OpenNebula – is an open source cloud computing platform for managing heterogeneous data center, public cloud and edge computing infrastructure resources that are running on KVM, QEMU or LXC.

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

See also

References

Bibliography Amit Shah (2016-11-02). "Ten years of KVM". lwn.net. Retrieved 2017-02-10.

External links Best practices for the Kernel-based Virtual Machine Archived 2019-11-06 at the Wayback Machine, IBM, second edition, April 2012 Virtio-blk Performance Improvement, KVM Forum 2012, November 8, 2012, by Asias He Wikibook QEMU & KVM crosvm - Chrome OS virtual machine monitor Firecracker VMM for KVM

Illustrations

Kernel-based Virtual Machine illustration
Kernel-based Virtual Machine illustration
Kernel-based Virtual Machine: A high-level overview of the KVM/QEMU virtualization environment[25]: 3
A high-level overview of the KVM/QEMU virtualization environment[25]: 3
Kernel-based Virtual Machine: libvirt supports KVM
libvirt supports KVM

Worked examples

Example 1 — a first encounter with Kernel-based Virtual Machine

Start with the simplest possible case. Write down what Kernel-based Virtual Machine claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Kernel-based Virtual Machine before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Kernel-based Virtual Machine ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Kernel-based Virtual Machine

In research
Kernel-based Virtual Machine appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Kernel-based Virtual Machine in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Kernel-based Virtual Machine is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free emulation software, Free software programmed in C, Free virtualization software, so understanding it makes those chapters shorter.
In everyday life
Look for Kernel-based Virtual Machine outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Kernel-based Virtual Machine” →

How to study Kernel-based Virtual Machine in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Kernel-based Virtual Machine means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Kernel-based Virtual Machine out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Kernel-based Virtual Machine in simple terms?

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.

Why does Kernel-based Virtual Machine matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Kernel-based Virtual Machine?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Kernel-based Virtual Machine.

Tags

  • Free emulation software
  • Free software programmed in C
  • Free virtualization software
  • Linux kernel features
  • Red Hat software
  • Software using the GNU General Public License
  • Virtualization software
  • Virtualization software for Linux

Keep exploring