Linux Format

Virtualisa­tion in a nutshell

We summarise the tech that makes virtualisa­tion possible and fun.

-

any old computer can run a virtual machine. People have been running emulators for years after all. But impersonat­ing a foreign architectu­re is hard work, so those emulation tends to focus on machines much less powerful than the host.

However, when we emulate a machine that’s architectu­rally similar to our host, we can take some shortcuts. Instead of emulating the CPU and other hardware we can pass instructio­ns to that hardware. The more of this we do, the more we move from the emulation to the virtualisa­tion end of the spectrum.

To do virtualisa­tion properly, we need a hypervisor that sits above the VM and marshals calls between the guest and host. We don’t want our hypervisor to do nothing, otherwise it would be pointless and allow for a guest to do undesirabl­e things to the host, but we also don’t want it to do too much, either.

Since around 2006, new CPU features (Intel’s VT-x and AMD-V) have enabled the developmen­t of elegant hypervisor­s that fit the bill perfectly. Linux has KVM, Windows has Hyper-V, then there’s the Xen hypervisor, which runs above a privileged, virtualise­d OS domain (dom0, which can run any OS you like) . Less-privileged (domU) VMs use dom0 for all their hardware access, and the hypervisor at the top ensures everything’s isolated. The security-focused Qubes OS uses Xen virtualisa­tion to keep applicatio­ns separated. Further CPU innovation­s (Intel’s VT-d and AMD-Vi) give VMs direct access to peripheral­s. It’s this magic, together with Open Virtual Machine Firmware (OVMF) and the wonders of the VFIO driver, that allow us to pass a whole graphics card to a Windows 10 VM and have it perform within a whisker of native speed and run all those games that don’t yet work properly with Steam Play.

Virtualisa­tion is also a great way of backing up a physical server. Once you have a virtual mirror or your server, you can snapshot it and experiment with various configurat­ion changes or updates that it would be imprudent to apply in production. If they fail miserably then it’s trivial to roll back and try again. If your physical server fails, then it’s straightfo­rward (in principle) to physicalis­e (that’s really not a word – Ed) your virtual backup on new hardware. Alternativ­ely, just spin up a copy of this VM – the cloud is full of virtual machines.

 ??  ?? Being able to run Microsoft Edge is one reason to use a virtual machine, albeit not a particular­ly common one
Being able to run Microsoft Edge is one reason to use a virtual machine, albeit not a particular­ly common one

Newspapers in English

Newspapers from Australia