What Is KVM (Kernel-based Virtual Machine) In Linux?

Virtualization is a hot area in Computing. There is a different type of virtualization solutions and techniques used in a different environment and operating systems. KVM or Kernel-based Virtual Machine is a virtualization technology used in Linux kernel and distributions. Linux KVM can be only used in Linux kernel and distribution because of its design architecture.

Hardware Support for KVM

KVM technology can be only used with hardware support which is provided by the CPU. Intel and AMD CPUs provide this hardware support with the name of

How Does KVM Work?

KVM is a Linux kernel module and in order to work with KVM, the module should be installed and loaded into the Linux kernel. The module is named as kvm generically but for Intel processors, it is named as kvm_intel and AMD processors kvm_amd. Linux kernel will isolate the created Virtual Machine memory and CPU into a process like a separate system.

KVM Features

KVM virtualization provides the following features during the virtualization process.

`Security`: KVM uses a combination of SELinux and sVirt in order to secure and isolate VMs.

`Storage`: KVM can use local or NAS related storage technologies with different file systems. VM disk is stored single or multiple files with snapshot, backups.

KVM Qemu

KVM is the Linux kernel part of the virtualization. In the user space, the tool named Qemu is used. Qemu provides the VM devices emulation and kernel communication. Qemu is started as VM emulator and merged with KVM to provide full virtualization. We can install KVM Qemu with the following command.

$ sudo apt install qemu-kvm

KVM Qemu

KVM Tool Libvirt

Libvirt is a library used to make KVM virtualization in more enterprise manner. Libvirt provides services in order to connect, manage virtualization services and create, delete, start and stop VMs. We can install the libvirt with the package name libvirt-daemon which is a service.

$ sudo apt install libvirt-daemon

KVM GUI Tools

KVM VMs can be managed with different GUI tools. But virt-manager is the popular tools which can be used locally on the system. We can install Virt Manager like below.