How does OpenStack use KVM

KVM explained

A kernel-based virtual machine (KVM) is an open source virtualization technology that works in Linux® is built in. In particular, you can use KVM to turn Linux into a hypervisor that allows a host machine to run multiple isolated virtual environments called guests or virtual machines (VM).

KVM is built into Linux. If you have Linux 2.6.20 or later installed, then you also have KVM. KVM was first announced in 2006 and incorporated into the main Linux kernel a year later. Since KVM is part of the existing Linux code, it immediately benefits from every new function, fix or improvement for Linux, without any additional technical effort.


How does KVM work?

KVM converts Linux into a type 1 hypervisor (bare metal). All hypervisors require the same components at the operating system level - such as a memory manager, process planner, input / output stack (I / O), device drivers, security manager, network stack and more - in order to be able to run VM. KVM has all of these components because it is built into the Linux kernel. Each VM is implemented as a regular Linux process scheduled by the standard Linux scheduler, with dedicated virtual hardware such as a network card, graphics card, CPU (s), memory and hard drives.


Implement KVM

In short, you need to be running a version of Linux that was released after 2007; it must be installed on x86 hardware that supports virtualization functionality. When these two requirements are met, all you need to do is load two existing modules (a host kernel module and a processor-specific module); In addition, there is an emulator and all drivers that support you when operating additional systems.


Migration to a KVM-based virtual infrastructure

When setting up a virtual infrastructure on a platform, companies are often contractually bound to one provider, which can restrict their access to the source code. This means that your IT developments are more workarounds than innovations and that the next contract could completely discourage you from investing in clouds, containers and automation. Migrating to a KVM-based virtual infrastructure means you can examine, change, and improve the source code behind your hypervisor. To do this, you avoid a license agreement because the source code does not have to be protected. Because it belongs entirely to you.


KVM functions

KVM is built into Linux. Linux is part of KVM. Everything that Linux offers is also offered by KVM. But there are special features that make KVM the hypervisor of choice for companies.

KVM uses a combination of Linux with Advanced Security (SELinux) and Secure Virtualization (sVirt) for improved VM security and isolation. SELinux defines the security limits around VM. sVirt extends the capabilities of SELinux. sVirt enables Mandatory Access Control (MAC) to be used for guest VMs and prevents manual identification errors.

KVM can use any storage supported by Linux, including local hard drives and network-attached storage (NAS). Multipath I / O can be used to improve storage and provide redundancy. KVM also supports shared file systems; VM images can therefore be shared by different hosts. Disk images support thin provisioning and allocate storage on demand rather than in advance.

KVM can use various certified hardware platforms supported by Linux. Since hardware providers regularly contribute to kernel development, the latest hardware functions are often incorporated into the Linux kernel very quickly.

KVM takes over the memory management functions of Linux, including non-uniform memory access (NUMA) and kernel same-page merging. The memory of a VM can be swapped, increased by large volumes for better performance and shared or supported by a hard disk file.

KVM supports live migration. This is the ability to move a running VM between physical hosts without disrupting service. The VM remains in operation, network connections remain active and the applications continue to run while the VM is being moved. KVM also backs up the current state of a VM so that it can be saved and continued later.

KVM takes over the power of Linux and scales to adapt to load requirements as the number of guest machines and requests increases. KVM can virtualize large application workloads. In addition, KVM forms the basis for many corporate virtualization setups, for example for data centers and private clouds (via OpenStack®).

In the KVM model, a VM is a Linux process that is planned and managed by the kernel. The Linux scheduler enables fine control of the resources assigned to a Linux process and guarantees the quality of a service for a specific process. In KVM this includes the Completely Fair Scheduler (CFS), control groups, network namespaces and real-time extensions.

The Linux kernel contains real-time extensions that allow VM-based apps to run with lower latency and better prioritization (compared to bare metal). The kernel also divides processes that require long computing times into smaller components, which are then planned and processed accordingly.


It is possible to manually manage a handful of VMs that are running on a single workstation without a management tool. Large companies use virtualization management software that interfaces with virtual environments and the underlying physical hardware to simplify resource management, improve data analysis, and optimize operations. Red Hat Virtualization was created by Red Hat for exactly this purpose.


We believe in KVM so much that it is the only hypervisor we use for all of our virtualization products. On top of that, we are continuously improving the kernel code with contributions from the KVM community. Since KVM is part of Linux, and therefore part of Red Hat Enterprise Linux, what do you need Red Hat Virtualization for?

Well, Red Hat has two versions of KVM. The one version of KVM that is shipped integrated with Red Hat Enterprise Linux has full hypervisor functionality with basic management capabilities. This allows customers to operate up to four isolated virtual machines on a single host. Red Hat Virtualization includes an enhanced version of KVM that enables enterprise management on an unlimited number of guest machines. This is ideal for use in data center virtualization, in technical workstations, private clouds and in development or production.

More information on virtualization