KVM

A kernel-based virtual machine (KVM) is a virtualization infrastructure built for Linux OS and designed to operate on x86-based processor architecture.

KVM is developed by Red Hat Corporation to provide a virtualization solution and services on the Linux operating system platform. KVM is designed over the primary Linux OS kernel.It was merged into the Linux kernel mainline in kernel version 2.6.20, which was released on February 5, 2007.A wide variety of guest operating systems work with KVM, including many flavours and versions of Linux, BSD(Berkeley Software Distribution), Solaris, Windows, Haiku, ReactOS, Plan 9, and the AROS Research OS etc.

It also allocates separate virtualized computing resources for each virtual machine such as the processor, storage, memory, etc.

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.

(KVM)Virtualization terminology:-

VT(Virtualization Technology) enabled: If a hardware supports virtualization directly without any third-party software to simulate then that hardware is called as VT enabled processor. This is denoted by VTx in Intel processors and AMD-v For AMD processors. So if you want to install KVM on your machine your processor should support one of them.

Guest OS: Guest OS is the OS you are going to install on a Virtual machine which guest to the Host/base OS. You can install number of guest Operating systems on a host machine.

HOST OS: This is the OS where you are going to install your hypervisor software like KVM and virtual manager etc. This base OS so that you hypervisor start running as KVM is not an OS it should run on a OS to get things done.

Hyperviser: Hyperviser is a software which will help us in implementing virtualization. KVM, Vmware ESX and Xen are some examples of Hypervisors.

Virtual machine: Virtual machine is a virtual hardware allocated by Hypervisor for installing Guest OS on it so that it can run as separate machine.

libvirt: A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). This is a building block to KVM.

virsh(Virtualization Shell): Virsh is a shell for managing hypervisors and VM’s directly from Host OS terminal. We cover this virsh extensively in our coming posts.

Cloning: Cloning is a concept to replicate a VM state/data etc so that we no need to install a new OS. After cloning we can use the cloned machine as we use normal VM.

p2v: This type of converting a machine from one state to other. In this we can convert a physical machine to virtual machine to consolidate a hardware machine.

p2v: v2v: This is the concept of migrating virtual machine to other virtual machine at the time of maintenance etc.