What is a virtual machine?
A virtual machine is a computer made of software, running on a physical one. What a hypervisor does, why businesses use them, and what to look after.
A virtual machine (VM) is a computer made of software. It has its own operating system and its own applications and behaves like a separate machine, but it runs on a physical computer, usually alongside other virtual machines.
How it works: the hypervisor
The software that makes this possible is called a hypervisor. The US National Institute of Standards and Technology (NIST) describes it as the layer that controls the flow of instructions between each virtual machine and the physical hardware: the processor, the memory, the disks and the network cards.
The hypervisor divides those resources up and isolates the virtual machines, so that each one can reach only its own share. From the inside, each virtual machine appears to have its own hardware, like a regular computer. Its hard drive is typically a file on the physical machine that looks like a whole disk to the operating system inside.
Two terms come up often. The physical computer is the host. An operating system running in a virtual machine is a guest.
Two kinds of hypervisor
- Bare metal. The hypervisor runs directly on the hardware, with no ordinary operating system underneath. NIST notes that servers are most often virtualised this way.
- Hosted. The hypervisor runs as a program on top of an operating system such as Windows, Linux or macOS. Desktops are most often virtualised this way, for example to run a second operating system in a window.
Why businesses use them
- More from each server. NIST gives efficiency as one of the most common reasons: a virtualised server can put more of its processor and memory to work than a server running one operating system and one set of services.
- Different systems on one machine. Windows and Linux can share the same physical hardware.
- Old software kept running. An application that only works on an older operating system can run in a virtual machine while the computer around it stays current.
- Easier to move. A whole virtual machine can be packaged up, which makes it portable.
Virtual machines are also how cloud providers work. NIST describes hardware virtualisation as the technique used in the cloud to run many operating systems on a single physical server while keeping each one separate. A “cloud server” is usually a virtual machine in the provider’s data centre.
What to look after
A virtual machine needs the same care as a physical one. NIST’s guidance is that a security policy should apply in the same way whether a system runs on hardware or inside a hypervisor. In the cloud, AWS states that customers who run a virtual server are responsible for managing its operating system, including updates.
Virtualisation adds two things to watch:
- Several systems now sit on one physical computer. NIST warns that a security compromise there can have a larger impact.
- The hypervisor and its management console control every virtual machine on the host. NIST advises keeping the hypervisor updated and restricting access to the console to authorised administrators.
If your office server is ageing, Is it time to move your business servers to the cloud? covers the options. For virtual servers that are set up and managed for you, see cloud compute.
Sources
- SP 800-125: Guide to security for full virtualization technologies (National Institute of Standards and Technology) nvlpubs.nist.gov
- SP 800-190: Application container security guide, section 2 on hardware virtualisation (National Institute of Standards and Technology) nvlpubs.nist.gov
- Shared responsibility model (AWS) aws.amazon.com