Vir­tu­al­iza­tion has been an integral part of the corporate world and pro­fes­sion­al server op­er­a­tions for a long time. Multiple virtual guest systems can be operated on a single physical computer. This has some important ad­van­tages:

  • Systems can be neatly separated by task without requiring ad­di­tion­al hardware (e.g. mail servers, file servers, and ap­pli­ca­tion servers).
  • A guest system can be backed up (also referred to as “frozen”) and recovered at the push of a button.
  • It is possible to migrate to new hardware very quickly.
  • The guest systems can be scaled as needed which allows for flexible reactions to peak loads.
  • A single hardware platform is provided for all guest systems. Driver conflicts are elim­i­nat­ed at the outset.

While the open-source operating system Linux can seem rather exotic for desktop computers and private users, it has long been con­sid­ered main­stream for servers. It, therefore, plays an important role as a platform for vir­tu­al­iza­tion.

$1 Domain Names – Grab your favorite one
  • Simple reg­is­tra­tion
  • Premium TLDs at great prices
  • 24/7 personal con­sul­tant included
  • Free privacy pro­tec­tion for eligible domains

What is KVM?

The Kernel-based Virtual Machine (KVM) launched by the company Qumranet in 2006 was of­fi­cial­ly adopted in the Linux kernel 2.6.20 in early 2007. In the following year, Qumranet was bought by the Linux dis­trib­u­tor RedHat. To further develop the tech­nol­o­gy, RedHat founded the Open Vir­tu­al­iza­tion Alliance (OVA) with IBM. This alliance included companies such as SUSE, Intel, and HP.

KVM is closely linked with the emulation software QEMU. QEMU mostly provides functions for vir­tu­al­iz­ing the hardware, while Linux KVM manages the al­lo­ca­tion of resources from the host system. This is why the term KVM/QEMU is often used. Since KVM is integral to Linux, this vir­tu­al­iza­tion solution cannot be used on Windows computers. However, Windows is supported as a guest system along with most Unix-like operating systems, such as Linux, Solaris, and BSD. While KVM is standard in most Linux dis­tri­b­u­tions, it still needs to be enabled.

KVM Linux functions in detail

To un­der­stand the Kernel-based Virtual Machine’s functions, you must first un­der­stand the basics of vir­tu­al­iza­tion. Vir­tu­al­iza­tion means that one or more full operating systems (guest systems) can be run on a single host computer. The hardware provided for the guest systems is either emulated by software or con­trolled by a hy­per­vi­sor and allocated to real hardware resources. The hy­per­vi­sor is a man­age­ment or trans­la­tion layer between the real and virtual hardware. Depending on the type of vir­tu­al­iza­tion, it may be necessary to translate all the re­quire­ments of the real hardware or just the al­lo­ca­tion of the required actions (e.g. a cal­cu­la­tion in the processor).

Here are the different types of vir­tu­al­iza­tion:

  • Full vir­tu­al­iza­tion: The hardware is com­plete­ly emulated on the software side. Therefore, no in­ter­ac­tion with the real hardware is necessary, which also makes cor­re­spond­ing drivers un­nec­es­sary. This type is com­par­a­tive­ly slow.
  • Para-vir­tu­al­iza­tion: The guest system interacts directly with the hy­per­vi­sor and requires specially designed drivers.
  • Hardware-assisted para-vir­tu­al­iza­tion: The hardware support is already in­te­grat­ed in the processor. This increases ef­fi­cien­cy and reduces the amount of cus­tomiza­tion required for guest systems. Modern proces­sors made by Intel (Intel-VT-x) and AMD (AMD-V) have this func­tion­al­i­ty. Under certain cir­cum­stances, this may need to be activated in the BIOS/UEFI.

In addition, there are two different types of hy­per­vi­sors:

  • Type 1 (bare metal): This hy­per­vi­sor runs directly on the hardware being used without being embedded in an operating system.
  • Type 2 (hosted): This hy­per­vi­sor is embedded in the host operating system and is enabled from there.

Linux KVM is a type 2 hy­per­vi­sor and uses hardware-assisted para-vir­tu­al­iza­tion. However, it is unique in that it is directly in­te­grat­ed into the kernel.

Note

The “kernel” is the core of the operating system. The operating system’s basic functions are in­te­grat­ed into it, such as accessing the hardware and al­lo­cat­ing computing time to proces­sors in a multi-tasking system. Access to the kernel is highly secured, and the re­quire­ments placed on it are handled by proces­sors with maximum priv­i­leges.

Due to its in­te­gra­tion in the kernel, it has been debated whether the system might have elements of a type 1 hy­per­vi­sor.

What are the com­po­nents of the Kernel-based Virtual Machine?

The complete KVM package consists of multiple com­po­nents:

  • Kernel extension: Contains the actual kernel.ko extension. This is the trans­la­tion layer between the real and virtual hardware. It also includes the modules kvm-amd and kvm-intel which are adapted to the proces­sors.
  • Libvirt: The ap­pli­ca­tion pro­gram­ming interface (API) for in­ter­fac­ing with the virtual machines. It is used to control and manage them. Libvirt also includes tools such as the command “virsh” and the Virtual Machine Manager graphical interface.
  • QEMU: This is basically an in­de­pen­dent program for emulating computers and managing virtual machines. Linux KVM uses this func­tion­al­i­ty to emulate hardware and improves its speed through para-vir­tu­al­iza­tion. In many dis­tri­b­u­tions, both com­po­nents are offered in a single in­stal­la­tion package.
  • KVMTool: A leaner al­ter­na­tive to QEMU which QEMU has not yet been able to replace.
  • VirtIO drivers: Special drivers for guest systems that are designed for the hy­per­vi­sor and enable para-vir­tu­al­iza­tion.

Ap­pli­ca­tions of KVM

The Kernel-based Virtual Machine is fre­quent­ly used for running pro­fes­sion­al server systems in par­tic­u­lar. The Linux KVM is accorded even more im­por­tance due to its in­te­gra­tion as a hy­per­vi­sor in the popular cloud software solution OpenStack.

Ad­van­tages and dis­ad­van­tages of KVM

As we wrap this up, let us take a look at some of the ad­van­tages and dis­ad­van­tages of this vir­tu­al­iza­tion solution:

Ad­van­tages:

  • Mature es­tab­lished system
  • Already included in most Linux dis­tri­b­u­tions
  • Free of charge and open source
  • The only genuine Kernel-based Virtual Machine which ensures per­for­mance and stability
  • Developed by reputable companies
  • Automated ad­min­is­tra­tion possible through libvirt

Dis­ad­van­tages:

  • Only available for Linux systems
  • Powerful hardware required for the host computer
  • Requires a learning period to be able to use it
  • Cen­tral­iza­tion of the hardware increases the risk in the event of a system failure (i.e. a single point of failure, but this risk can be reduced with a smart backup strategy)

Al­ter­na­tives to Linux KVM

When it comes to freely available software with similar func­tion­al­i­ty, one al­ter­na­tive is XEN – a vir­tu­al­iza­tion solution closely linked to Linux but not in­te­grat­ed in the kernel.

The es­tab­lished com­mer­cial provider VMware offers al­ter­na­tives to para-vir­tu­al­iza­tion with its ESXi servers and full vir­tu­al­iza­tion with its work­sta­tion. The VMware player is available for private use free of charge.

Vir­tu­al­Box is another free al­ter­na­tive to full vir­tu­al­iza­tion which is available as the basis for all common operating systems.

Hyper-V is the Microsoft Windows vir­tu­al­iza­tion solution for para-vir­tu­al­iza­tion, which has similar func­tion­al­i­ty to Linux KVM. It has a dedicated Windows Hyper-V server and embedded func­tion­al­i­ty in server operating systems. Hyper-V is included in both Windows 10 Pro­fes­sion­al and En­ter­prise.

Cloud Backup powered by Acronis
Mitigate downtime with total workload pro­tec­tion
  • Automatic backup & easy recovery
  • Intuitive sched­ul­ing and man­age­ment
  • AI-based threat pro­tec­tion

Con­clu­sion

Flex­i­bil­i­ty and scal­a­bil­i­ty are two almost un­beat­able arguments for the use of vir­tu­al­iza­tion. Guest operating systems can be kept lean and used for specific ap­pli­ca­tion purposes. If the systems are regularly backed up to storage media in separate locations, the risk as­so­ci­at­ed with system failure is neg­li­gi­ble.

If you use Linux for your server, you should at least consider using KVM. The fact that it is in­te­grat­ed in the kernel and was developed by reputable pub­lish­ers are good arguments in favor of it.

Go to Main Menu