Kernel-based Virtual Machine (KVM) is a free, open source virtualization architecture for Linux distributions.
KVM virtualization is often compared with Xen, which is the open source hypervisor for Oracle VM, Citrix Systems Inc.'s XenServer and other platforms. But KVM virtualization, which is supported by Red Hat Inc. and Canonical Ltd., uses a type-two hypervisor that resides within the Linux kernel.
This tutorial on KVM virtualization -- part of our Virtualization School series -- explains the differences between Xen and KVM virtualization. It also covers KVM management tools and how to set up a KVM virtualization environment.
After completing the lessons below, you can take a brief quiz to test your KVM virtualization knowledge.
Virtualization School: KVM virtualization
- Lesson 1: The differences between Xen and KVM virtualization: Xen and KVM are free Linux virtualization hypervisors, but their approach to open source virtualization is vastly different. Xen is a type-one, bare-metal hypervisor that's more mature than KVM. It includes several built-in management tools and supports numerous host and guest environments, as well as hardware architectures.
Conversely, the KVM virtualization architecture is relatively new. Because KVM is embedded in the Linux kernel, KVM proponents claim it's easier to manage virtual machines (VMs) and Linux updates.
- Lesson 2: KVM management tools: There are two KVM management tools: virsh and virt-manager. From the command line, virsh can streamline KVM management. Because it's a master command with numerous subcommands, the learning curve is steep.
Virt-manager, on the other hand, is a graphical user interface that simplifies the management of virtual machines in Red Hat Enterprise Linux. Virsh has a larger feature set, but virt-manager's point-and-click interface can perform most administrative tasks.
- Lesson 3: Creating a KVM virtualization environment: Deploying a KVM environment is straightforward. Before you configure Red Hat Enterprise Linux as a KVM host, determine whether you have the proper hardware. Next, install the KVM framework. After you've configured the infrastructure, you can create KVM virtual machines in Red Hat Enterprise Linux. For KVM beginners, it may be easier to launch VMs with virt-manager instead of the text-heavy virsh command.
- Quiz: KVM virtualization and management: Feeling confident about your KVM virtualization knowledge? There's only one way to be sure. Take our quiz on KVM virtualization and management tools, and you'll receive a score with additional resources at the end.