By Doug Szumski (Senior Technical Lead at StackHPC) and Ross Martyn (Cloud Engineering Manager at G-Research)
If there was an award for the most understated homepage, the distinguished French software engineer, Fabrice Bellard, would surely win it.
Somewhere in his list of projects, between a PC emulator in Javascript and the renowned FFMPEG is an entry: “QEMU is a generic machine emulator and virtualizer” .
Despite that inauspicious description, it’s no exaggeration to say that QEMU, used in conjunction with KVM, is a staple of modern cloud computing. Together with a layer of abstraction provided by Libvirt, QEMU/KVM is at the core of the most popular hypervisor driver in OpenStack, helping to under-pin millions of virtualised cores around the globe.[1]
Virtualised vs bare-metal
So why choose virtualised compute over bare-metal? This may seem an odd question for a high-performance research environment but it turns out that it’s not a binary choice, especially given the degree of virtualisation can be finely tuned, all the way from a fully software emulated machine, to a high-performance behemoth, using a full gamut of hardware acceleration.
Virtual machines are also popular with users. They can reduce cost through efficient utilisation of hardware. They don’t have long self-test routines and at the click of a button you can boot any operating system you like from a high-performance network filesystem. It is little wonder that if you provide the option for virtualised compute, your hypervisors will become a hive of activity.
But what about maintenance?
It is one thing to ask a user to upgrade their fleet but how do you refresh the operating system or firmware of the hypervisors underneath? What happens if you want to power down a rack for maintenance, move it away from a roof leak or the security team has found a new CVE? Your users will demand that you cannot pull the rug from under them.
A key part of the solution to maintaining secure cloud infrastructure is migration. Simply make an exact replica of a few billion virtual transistors on another hypervisor, copy across the contents of the memory and local storage and a GARP or two later, a VM could be switched to a host on the other side of the world.
Almost unbelievably this largely works, and although it can be complicated by hardware acceleration, with a bit of care, even things like virtual GPUs can be moved.[2]