What is KVM?

Kernel-based Virtual Machine (KVM) is a software feature that you can install on physical Linux machines to create virtual machines. A virtual machine is a software application that acts as an independent computer within another physical computer. It shares resources like CPU cycles, network bandwidth, and memory with the physical machine. KVM is a Linux operating system component that provides native support for virtual machines on Linux. It has been available in Linux distributions since 2007. 

Why is KVM important?

Kernel-based Virtual Machine (KVM) can turn any Linux machine into a bare-metal hypervisor. This allows developers to scale computing infrastructure for different operating systems without investing in new hardware. KVM frees server administrators from manually provisioning virtualization infrastructure and allows large numbers of virtual machines to be deployed easily in cloud environments. 

Businesses use KVM because of the following advantages.

High performance

KVM is engineered to manage high-demanding applications seamlessly. All guest operating systems inherit the high performance of the host operating system—Linux. The KVM hypervisor also allows virtualization to be performed as close as possible to the server hardware, which further reduces process latency. 

Security

Virtual machines running on KVM enjoy security features native to the Linux operating system, including Security-Enhanced Linux (SELinux). This ensures that all virtual environments strictly adhere to their respective security boundaries to strengthen data privacy and governance. 

Stability

KVM has been widely used in business applications for more than a decade. It enjoys excellent support from a thriving open-source community. The source code that powers KVM is mature and provides a stable foundation for enterprise applications. 

Cost efficiency

KVM is free and open source, which means businesses do not have to pay additional licensing fees to host virtual machines. 

Flexibility

KVM provides businesses many options during installations, as it works with various hardware setups. Server administrators can efficiently allocate additional CPU, storage, or memory to a virtual machine with KVM. KVM also supports thin provisioning, which only provides the resources to the virtual machine when needed. 

How does KVM work?

Kernel-based Virtual Machine (KVM) requires a Linux kernel installation on a computer powered by a CPU that supports virtualization extensions. Specifically, KVM supports all x86 CPUs, a family of computer chips capable of processing the Intel x86 instruction language. 

Linux kernel

Linux kernel is the core of the open-source operating system. A kernel is a low-level program that interacts with computer hardware. It also ensures that software applications running on the operating system receive the required computing resources. Linux distributions, such as Red Hat Enterprise Linux, Fedora, and Ubuntu, pack the Linux kernel and additional programs into a user-friendly commercial operating system.

How to enable KVM

Once you have installed the Linux kernel, you need to install the following additional software components on the Linux machine:

  • A host kernel module
  • A processor-specific module
  • An emulator
  • A range of other Linux packages for expanding KVM’s capabilities and performance

Once loaded, the server administrator creates a virtual machine via the command line tool or graphical user interface. KVM then launches the virtual machine as an individual Linux process. The hypervisor allocates every virtual machine with virtual memory, storage, network, CPU, and resources.

What is the difference between KVM and VMware?

VMware is the software company that produces VMware ESXi, a commercially licensed virtualization solution. VMware hypervisors are used for enterprise applications, with virtual machines capable of handling heavy workloads.

Kernel-based Virtual Machine (KVM) and VMware ESXi both provide virtualization infrastructure to deploy type 1 hypervisors on the Linux kernel. However, KVM is an open-source feature while VMware ESXi is available via commercial licenses.

Organizations using VMware’s virtualization components enjoy professional support from its technical team. Meanwhile, KVM users rely on a vast open-source community to address potential issues. 

How does AWS help with KVM?

Amazon Linux 2 is an Amazon Web Services (AWS) Linux distribution that runs cloud applications in a stable, secure, and high-performance environment. Amazon Linux 2 is available as virtual machine images for development and testing on these virtualization platforms: Kernel-based Virtual Machine (KVM), Microsoft Hyper-V, Oracle VM VirtualBox, and VMware ESXi.

Here are other benefits of Amazon Linux 2:

  • Amazon Linux 2 comes with packages and configurations for easy integration with other AWS services
  • Developers can use Amazon Linux 2 for on-premises testing to support local development
  • Amazon Linux 2 automatically applies security patches without rebooting
  • Organizations using Amazon Linux 2 enjoy long-term support for security updates and five years of support for bug fixes

Get started with KVM on AWS by creating a free AWS account today.

Next Steps on AWS

Check out additional product-related resources
Check out Developer Tools Services 
Sign up for a free account

Instant get access to the AWS Free Tier.

Sign up 
Start building in the console

Get started building in the AWS management console.

Sign in