A virtual machine (VM) is a software program that emulates — faithfully imitates — a complete physical computer, including its processor, memory, storage, and input/output devices. One physical host machine can run several virtual machines simultaneously, each with its own operating system and applications, all isolated from one another.
What is the difference between a physical machine and a virtual machine?
A physical machine is real hardware: the CPU, RAM, motherboard, and drives you can touch. A virtual machine is a software layer that makes itself look, to the programs running on it, exactly like a physical computer — even though it is just a file on the host machine's storage.
Think of it like a theatrical stage set. The scenery looks like a real room, but behind the painted walls there is a theatre. Programs running inside a VM genuinely cannot tell they are not on bare hardware — the VM handles every request just as the real hardware would. This illusion is what makes virtual machines so powerful.
What is a hypervisor?
A hypervisor (also called a virtual machine manager, or VMM) is the software that creates, runs, and manages virtual machines. It sits between the physical hardware and the virtual machines, allocating CPU time, memory, and storage to each VM on demand.
There are two types of hypervisor:
| Type | Description | Where it runs | Examples |
|---|---|---|---|
| Type 1 (bare-metal) | Runs directly on the hardware, with no host OS | Directly on the CPU and RAM | VMware ESXi, Microsoft Hyper-V |
| Type 2 (hosted) | Runs as an application on top of an existing OS | On top of Windows, macOS, or Linux | VirtualBox, VMware Workstation |
At GCSE you are expected to know what a hypervisor does, but you do not need to recall specific product names — understanding the concept is what matters.
What are the main uses of virtual machines?
- Running multiple operating systems on one machine — a developer on a Windows laptop can run a Linux VM inside it to test Linux software without buying separate hardware.
- Software testing and development — each VM is isolated; malware or a crashed program inside one VM cannot affect others, making VMs ideal for testing potentially dangerous code.
- Cloud computing — cloud providers (such as AWS, Microsoft Azure, and Google Cloud) rent virtual machines to customers, running hundreds of VMs on large server farms. The customer pays only for the VM time used.
- Running legacy software — old applications written for outdated operating systems can run inside a VM of that OS, even on modern hardware.
- Education and sandboxing — schools and security researchers use VMs to experiment safely, knowing they can delete or reset the VM without affecting the host.
What are the advantages and disadvantages of virtual machines?
| Advantages | Disadvantages |
|---|---|
| Multiple OSes on one physical machine, reducing hardware costs | VMs run slower than native hardware because the hypervisor adds overhead |
| Isolation — a crash or virus in one VM cannot harm the host or other VMs | Each VM requires its own memory and storage allocation, limiting how many can run simultaneously |
| Easy to create, clone, snapshot, and restore | Setting up and configuring VMs requires technical knowledge |
| Ideal for testing new software safely | Full emulation consumes more CPU and RAM than a native installation |
| Enables cloud computing and efficient server use |
How do virtual machines relate to the operating system?
Each virtual machine runs its own guest operating system independently of the host OS. The host OS (and hypervisor) sees the VM as an ordinary process; the guest OS inside the VM behaves as if it owns the entire machine.
This separation is a key security benefit. If the guest OS is infected with malware, the host OS remains unaffected — the infection is contained within the VM's virtual hard disk. Deleting or reverting the VM snapshot removes the infection entirely.
Frequently asked questions
What is a virtual machine in simple terms for GCSE?
A virtual machine is software that pretends to be a complete computer. It runs inside another computer (the host), and can have its own operating system, files, and applications just like a real PC. The host machine's physical hardware is shared between the host OS and any VMs running at the same time. At GCSE you need to know what a VM is, what a hypervisor does, and the main advantages and disadvantages.
Why do cloud providers use virtual machines?
Cloud providers like Amazon Web Services and Microsoft Azure run enormous data centres full of physical servers. They use hypervisors to divide each physical server into many virtual machines, which they then rent to different customers. A single physical server might host dozens of customer VMs simultaneously. This makes the business economically viable — hardware is shared efficiently, and customers pay only for the compute time and storage they actually use.
Is a virtual machine the same as an emulator?
They are closely related but not identical. A virtual machine typically runs software written for the same type of processor as the host — it virtualises the environment but does not translate instructions. An emulator goes further: it translates instructions from one CPU architecture into another. For example, an emulator on a modern x86 PC can run games written for a 1990s game console with a completely different CPU. Emulators have more overhead than VMs but are needed when the target architecture differs from the host.
Do virtual machines appear in GCSE exam papers?
Yes. Both AQA and OCR name virtual machines as a topic within their systems software sections. Typical questions ask students to define a virtual machine, explain the role of a hypervisor, or describe one advantage and one disadvantage of using VMs. Being able to explain the concept clearly in 2–3 sentences is usually sufficient for the marks available.
For Socratic GCSE Computer Science tutoring on systems software, operating systems, and computer architecture, visit aitutors.me.