A KVM server is a virtual server that runs on the Kernel-based Virtual Machine. The Linux kernel itself acts as the hypervisor and gives each instance its own resources, separated by hardware. You get your own kernel, isolation from other customers and a free choice of operating system. It should not be confused with the KVM switch used for remote management in the data center.
Key facts
- KVM stands for
- Kernel-based Virtual Machine
- Type
- Type 1 hypervisor, in the Linux kernel
- Requirement
- CPU extension Intel VT-x or AMD-V
- Isolation
- Own kernel per virtual machine
- Performance
- VirtIO drivers for network and storage
- At Realtoxmedia
- All VPS products run on KVM
How does KVM virtualization work technically?
KVM has been part of the Linux kernel since 2007. Once the kernel module is loaded, the host's operating system acts as the hypervisor. Each virtual machine runs as a normal process whose CPU instructions the hardware executes directly. This relies on the processor's virtualization extensions, Intel VT-x or AMD-V. QEMU emulates the chipset, graphics and input devices, and the machines are usually managed with libvirt or a panel such as Proxmox. Because guest systems run natively instead of being translated instruction by instruction, the performance loss compared with physical hardware is in the low single-digit percentage range.
Why is KVM considered a type 1 hypervisor?
Hypervisors are usually divided into two classes. Type 1, also called a bare-metal hypervisor, runs directly on the hardware. Type 2 runs as an application inside a normal operating system, such as VirtualBox on a desktop PC. KVM does not fit this scheme exactly: it needs a Linux kernel, but is itself part of it and accesses the hardware without an intermediate layer. In practice it behaves like a type 1 hypervisor and performs on a par with VMware ESXi or Hyper-V. So there is very little additional software between your virtual machine and the physical CPU.
KVM or containers: what is the difference?
Container technologies such as OpenVZ, LXC or Docker share the host's kernel. That saves resources and starts quickly, but ties all instances to the same kernel and its configuration. If a module is missing there, it is missing for you too. KVM instead virtualizes the whole machine, including firmware, chipset and devices. In normal operation the guest system does not notice that it is virtualized. Containers are cheaper for the provider; full virtualization gives you more freedom. Day to day, this shows up as follows:
- Your own kernel: you load your own modules, for example for WireGuard or ZFS.
- Free choice of operating system: any Linux distribution, BSD variants or Windows Server.
- Separate memory: RAM is assigned, not taken from a shared pool.
- Your own network stack with firewall rules at kernel level.
- Nested virtualization: Docker, Proxmox or Kubernetes run inside the guest.
- No kernel limits that depend on other customers on the same host.
The overhead is somewhat higher in return. Containers start faster and need less memory.
What do VirtIO drivers do?
A fully emulated device costs compute time. The guest system talks to a simulated network card whose signals the host then has to translate. VirtIO skips this step. These are paravirtualized drivers: the guest knows it is virtualized and passes data directly to the hypervisor through a shared ring buffer. They are used mainly for storage (virtio-blk, virtio-scsi), networking (virtio-net) and random numbers. On Linux the drivers are included in the kernel; on Windows Server they have to be loaded during installation. Compared with pure emulation the difference is large, especially with NVMe storage and fast network connectivity.
KVM has a second meaning
In the data center, the same abbreviation also stands for keyboard, video, mouse. A KVM switch is a device for operating several physical servers with one keyboard, screen and mouse. It works independently of the operating system, so also in the BIOS or on a hung system. In larger environments, KVM matrix switches connect many workstations to many servers. For rented servers this technology hardly matters any more, as IPMI or a BMC handles remote management over the network. If an offer is about virtualization, the Kernel-based Virtual Machine is meant.
How do you recognize a genuine KVM server in an offer?
Not every offer with root access is based on full virtualization. Some providers sell containers under the same name. You only notice when a kernel module will not load, a VPN tunnel gets no interface or you cannot boot your own ISO image. A look at the technical specifications or a question to support is usually enough. Check in advance:
- Is KVM or QEMU/KVM explicitly named in the technical specifications?
- May you upload your own ISO images and boot from them?
- Can you install and boot your own kernel?
- Is the promised memory reserved, or only a maximum figure?
- Is there a VNC or noVNC console for access without SSH?
KVM is full virtualization in the Linux kernel. Each machine has its own kernel, is separated from other customers and, thanks to hardware support and VirtIO, runs almost as fast as on physical hardware. All VPS products from Realtoxmedia run on KVM. The remote management technology of the same name for keyboard, screen and mouse is unrelated.