Kernel Virtual Machine (KVM)- Explained.
KVM (Kernel-based Virtual Machine) is a fast growing open source full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module that provides the core virtualization infrastructure and a processor specific module. Using KVM hypervisor, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc. The kernel component of KVM hypervisor is included in mainline Linux. Since the hypervisor directly interacts with the hardware,it can be considered as a Level-1 hypervisor.
In this approach , a Linux Kernel is converted into a hypervisor. Once we install KVM on a Linux box a hardware file /dev/kvm is created which will act as interpreter between actual hardware and hypervisor. A normal linux process has two modes of execution,user mode and kernel mode. User mode is the default mode used by applications.When it needs any sort of involvement from the kernel like writing some data into hard disk, then the kernel mode comes in action . KVM employs a third mode,called “guest mode” which is created by “/dev/kvm” . All the processes in the guest OS will be running under guest mode. Devices in the device tree (/dev) are common to all user-space processes. But with /dev/kvm , each process that opens it sees a different map thereby provides isolation between the VMs.
KVM makes use of hardware virtualization features for cpu virtualization,and uses the standard Linux scheduler and memory management. Modified version of Qemu is used for I/O virtualization.