Skip to main content

The Core of VMs on Linux

In the world of Enterprise Linux Virtualization, KVM is what you might call a keystone. It brings the power of the Linux kernel to bear for virtualization software, commonly referred to as “engines”, like LibVirt tools. That’s a lot of acronyms in one sentence, and QEMU system emulation software is yet one more, so let’s discuss why these three components form one complete and powerful Virtual Machine provisioning solution, with an initial focus on KVM for the sake of brevity.

Memory Economy with Kernel Samepage Merging

When hosting a number of VMs, sound memory management means happy guests. The only thing that makes guests happier than keeping your promises is overdelivering on them, and that’s where Kernel Samepage Merging (KSM) makes a difference. By allowing private memory pages to be de-duplicated – similar to lossless archival data storage – KSM packs more work into a smaller space, adding an economic edge when managing hardware infrastructure usage. KSM also helps to reduce cache misses by reducing the need for caching in the first place.

Virtual Hardware Benefits

Giving the host system enhanced capabilities to manage its hardware for virtualization is just the beginning, of course. What we came for is the hardware itself, after all.

PCI Hotplug

On operating systems that support it, PCI hotplug compatible devices like some network interface cards (including VirtIO NICs) can be virtually “plugged in” to a guest virtual machine and utilized without the need to reboot. Removing the need to interrupt a VM in production to add new capability means less demand on production and more flexibility when attaching new devices for software’s use.

USB Passthrough

USB passthrough lowers latency for USB connections and significantly reduces resource overhead for USB devices when speed is required for important production peripherals. Unconstrained by emulation overhead, USB devices using KVM’s passthrough capabilities means a faster time to completion for key devices in organizations’ operations.

VMchannel

A stable, hotpluggable, low-overhead kernel interface between host and guest operating systems, VMchannel makes possible all kinds of procedures. From locking the desktop when a virtual display is disconnected, to passing copy/paste clipboard information around and beyond, one can decide what lightweight communication can happen between the guest and the host, if any at all.

Network Boot and Storage Options

KVM supports both PXE and iSCSI boot for nimble provisioning and Disaster Recovery workflows, allowing your guest OS to communicate with host network resources and simplifying the process of connecting your VMs with the same network drives and recovery resources that existing devices use. Without the need for their own dedicated counterpart, the complexity of recovery procedures for VMs can be greatly reduced to make them more easily fit into your existing data retrieval, system provisioning, and disaster recovery procedures

VHost Networking

The Enterprise Linux solution for speeding up your VM’s network compared to other emulated network interfaces gives those looking for more throughput for their networked VM workloads a compelling option. Leveraging the fact that the guest and the host can share memory, KVM allows device drivers like VirtIO to standardize communication between virtual hardware and the Kernel. Combined with VHost networking’s file descriptor usage to reduce time the vCPU and host CPU spend context switching, VM workloads can gain network communication efficiency without adding hardware overhead. On the Anvil!, this is the default network device type for new VMs.

Memory Ballooning

Made possible via similar advantages of KVM used for Kernel Memory Sharing, Memory Ballooning improves uptime by allowing a guest to provide free memory back to the hypervisor when it is under memory pressure, and request it again when the hypervisor deems it free again. When both the guest and the host have more tools to resolve resource constraints, dealing with unexpected resource utilization spikes protects against bottlenecks that would otherwise result in a halt or a crash.

Transparent HugePages

A tool for improving Guest VM performance, Transparent HugePages technology works well with KSM, determining an optimal size for each page depending on optimization algorithms that consider how virtual memory can be optimally mapped to physical memory to improve performance.

Live Migration and Recovery

Perhaps the most singularly compelling feature of KVM is its ability to support the transmission of in-memory data between hosts on the same network, as this offers significant benefits. Want to run your VM somewhere else to perform short-term or proactive maintenance? Live migration means your VM will pick up where it left off upon arrival on the other host, without skipping a beat and with minimal latency. What’s more, when an error that threatens operational continuity is detected by the cluster, production processes on VMs need not be surrendered to a new OS startup to restore availability. They can benefit instead from being transmitted over the network – a dedicated and fully redundant network in the Anvil!’s case – to a healthy host where it can resume operating nominally. This goes beyond maintaining availability to maintaining software process continuity.

A Rich Software Ecosystem

SELinux

Modern Enterprise Linux solutions like the Anvil! include this well known Kernel Security Module alongside KVM, streamlining access control administration between the host and the hypervisor’s system resources.

LibVirt

A powerful virtualization framework, LibVirt is software that provides the means to coordinate and manage the emulated hardware for the guest and the virtualized hardware provided by the hypervisor. With features like the comfort of faster migrations that optimize both VM and storage data transmission speeds, the support flexibility of command line tools, and the convenience of handling KVM and QEMU with a single solution, LibVirt fastens the constituent pieces of VM software into a cohesive and powerful whole on the Anvil!.

QEMU

Known for its ability to emulate a wide variety of computing platforms, in Enterprise Linux virtualization it shines as the means to give your guest operating systems the tools they need – human interface devices, USB devices, sound cards, and more emulated hardware to support important software workloads inside VMs.

A Tentpole in the Anvil!’s Technology Stack

Though the subject is just one part of Enterprise Linux Virtualization and High Availability technology, there’s quite a lot to be said for KVM’s role at the core. Bewildering acronyms have been around in this industry long enough to have become tongue-in-cheek, perhaps, but more than just the Linux virtualization community’s very own, KVM paired with QEMU and LibVirt create a powerful virtualization technology stack, and the Anvil! is all too capable of putting it to effective use.