All posts

Blog

What Is KVM Virtualization? How VPS Hosting Really Works

Illustrated cover for the Servers & VPS guide "What Is KVM Virtualization? How VPS Hosting Really Works"

A VPS feels like your own private server. You get root access, choose your operating system and install whatever software you like. Yet your VPS is almost certainly sharing a physical machine with other customers. The technology that makes this possible is virtualization, and on most modern VPS plans it's a specific kind called KVM.

This guide explains what virtualization is, how KVM works, how it compares to other approaches and what to look for when you choose a VPS.

What is virtualization?

Virtualization is a way of using software to create multiple virtual machines (VMs) on one physical computer. Each VM behaves like a complete computer with its own:

  • Virtual CPU cores (vCPUs)
  • Allocated RAM
  • Virtual disk
  • Network interface and IP address
  • Operating system

The VMs are isolated from each other. If one crashes, gets overloaded or is misconfigured, the others keep running normally.

Before virtualization was widespread, a business that wanted a separate server for each application had to buy separate hardware, much of which sat mostly idle. Virtualization lets one powerful machine be divided efficiently, which is a big reason VPS hosting is affordable.

The hypervisor: the piece that makes it work

The software that creates and manages virtual machines is called a hypervisor. It sits between the physical hardware and the VMs and decides how CPU time, memory, storage and network access are shared out.

There are two broad types:

  • Type 1 (bare-metal): Runs directly on the hardware. Examples include VMware ESXi, Microsoft Hyper-V and Xen.
  • Type 2 (hosted): Runs as an application on top of a normal operating system. Examples include VirtualBox and VMware Workstation, which you might use on a laptop.

KVM is a little different, which brings us to the main topic.

What is KVM?

KVM (Kernel-based Virtual Machine) is a virtualization technology built into the Linux kernel. It has been part of mainline Linux since 2007. When KVM is enabled, the Linux kernel itself becomes a hypervisor, which is why KVM is usually classed as a Type 1 hypervisor even though it runs as part of an operating system.

KVM relies on hardware virtualization features in modern processors: Intel VT-x and AMD-V. These let virtual machines run most instructions directly on the CPU at close to native speed, rather than having every instruction translated by software.

KVM normally works together with other tools:

  • QEMU emulates the virtual hardware each VM sees, such as disks and network cards.
  • VirtIO drivers give VMs efficient, paravirtualized access to disks and networking.
  • libvirt and management platforms provide tools to create, start, stop and monitor VMs.

Many hosting control panels for VPS providers, as well as open-source platforms like Proxmox VE and OpenStack, use KVM under the hood.

Full virtualization vs container-based virtualization

Not every "VPS" is built the same way. The two main approaches are:

Full virtualization (KVM, VMware, Xen HVM, Hyper-V)

Each VM runs its own kernel and full operating system. From the inside, it looks and behaves like a real dedicated machine.

  • Run almost any OS: different Linux distributions, BSD, even Windows
  • Load your own kernel modules and tune kernel settings
  • Use custom firewalls, VPN software and Docker without restrictions
  • Strong isolation between customers

OS-level virtualization (OpenVZ, LXC/LXD, Virtuozzo containers)

Containers share the host's kernel. Each one gets its own isolated file system, processes and network, but they all run on the same underlying kernel.

  • Very lightweight and efficient
  • Limited to Linux, often to kernels the host supports
  • Restrictions on kernel modules and some low-level features
  • Some older setups made it easier for providers to oversell memory

Containers are excellent technology in the right context, and they power tools like Docker. For a general-purpose VPS where you want full control, KVM is usually the more flexible choice.

Why KVM is so popular for VPS hosting

  1. True isolation: Your VM has its own kernel and resources, so other customers' workloads have less effect on yours.
  2. Dedicated resource allocation: RAM assigned to your VM is reserved for it in a typical KVM setup, and disk space is defined at the VM level.
  3. OS freedom: Install from a wide range of operating system images or, on many providers, upload your own ISO.
  4. Compatibility: Software that needs kernel-level access, such as WireGuard on older kernels, some security tools, or nested containers, generally works.
  5. Open source: KVM is part of Linux, actively developed and widely used in production by hosting companies and large cloud providers.
  6. Near-native performance: Hardware-assisted virtualization keeps overhead low for most workloads.

How resources are shared on a KVM server

Even with KVM, you're sharing a physical machine, so it helps to understand what's guaranteed:

  • vCPUs: Usually map to threads on the physical CPU. Some plans share CPU time among VMs, while others pin or dedicate cores. Plans described as "dedicated CPU" or VDS generally give you cores that aren't shared. See VPS vs VDS for more on this.
  • RAM: Allocated to your VM. Your provider's policies determine how much headroom the physical host keeps.
  • Storage: A virtual disk, often on fast SSD or NVMe arrays, sometimes with RAID behind it.
  • Network: A virtual network interface with its own IP addresses and a port speed or bandwidth allowance.

If performance consistency matters, ask your provider how CPU is allocated and whether storage is local or network-attached.

How to check if your VPS uses KVM

Log in over SSH and try:

systemd-detect-virt

On a KVM machine, this usually prints kvm. You can also run:

lscpu | grep -i hypervisor

If you see openvz or lxc from systemd-detect-virt, you're on container-based virtualization instead.

Choosing a KVM VPS: what to look for

  • Resources that match your workload: Enough RAM for your apps and database, and enough CPU for peak traffic.
  • Storage type: NVMe or SSD makes a big difference for databases and busy sites.
  • Managed or unmanaged: Decide whether you want to handle updates and security yourself. Our guide on managed vs unmanaged servers can help.
  • Snapshots and backups: Easy rollback saves a lot of stress.
  • Console access: A web-based VNC or serial console lets you fix a broken network config without SSH.
  • Location: Pick a data center close to your users.

If you're comparing plans, Host Whimsy's VPS options are a good place to see how these specs fit together in practice.

Wrapping up

Virtualization lets one physical server act like many independent ones, and the hypervisor is the software that makes it happen. KVM, built into the Linux kernel and powered by CPU hardware features, gives each VPS its own kernel, reserved resources and the freedom to run almost any operating system. When you're shopping for a VPS, knowing whether it's KVM or container-based tells you a lot about how much control and isolation you'll actually get.