All subjects · Computer Science · WCP03 Advanced Principles of Computer Science

Virtualisation: virtual machines and containers

Edexcel IAL Computer Science · WCP03 Advanced Principles of Computer Science

Virtualisation lets one physical computer behave like many. It is the technology behind cloud servers, safe testing environments and modern software deployment.

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

Virtual machines

A virtual machine (VM) is a software emulation of a complete computer. A hypervisor sits on the physical hardware (or on a host OS) and shares out CPU, memory, storage and network between VMs.

Layer (top to bottom)Virtual machinesContainers
ApplicationsApp A, App BApp A, App B
LibrariesInside each VMInside each container
Guest OSOne full OS per VMNone (shared host kernel)
Virtualisation layerHypervisorContainer engine
HostHardware (and host OS for some hypervisors)Host OS on hardware

Containers

Containerisation packages an application with its libraries and settings into a container that runs on a container engine. Containers share the host operating system's kernel rather than each having a full OS.

Why virtualisation is needed

Benefits: better use of hardware (one server runs many workloads, saving cost, space and energy); sandboxed testing of software or malware; run software for other operating systems; quick backup, cloning and moving of whole machines; scale up quickly in the cloud.

Drawbacks: some performance overhead; one hardware failure takes down every VM on it; the hypervisor is a single point of attack; licensing and management can be complex.

Worked example

A software company must test its app on three operating systems and also run 200 small web services. Which virtualisation approach suits each?

  1. Testing on three operating systems needs three different full OSs: use virtual machines.
  2. 200 small web services on the same OS need to be lightweight and start quickly: use containers sharing the host kernel.

Answer: VMs for different operating systems; containers for many lightweight services.

Key idea: VM: hypervisor emulates whole computers, each with its own guest OS; strong isolation, heavy. Container: app plus libraries sharing the host kernel; light and fast, weaker isolation.

Check yourself

  1. What is a virtual machine?
    • A physical server in a data centre
    • A program that translates high-level code
    • A backup copy of a hard disk
    • A software emulation of a complete computer, running its own operating system on shared hardware
    Show answer

    A software emulation of a complete computer, running its own operating system on shared hardware. A VM behaves like a separate computer but is software on a host.

  2. What does a hypervisor do?
    • Translates domain names into IP addresses
    • Creates and runs virtual machines and shares physical resources between them
    • Compresses files for storage
    • Detects transmission errors
    Show answer

    Creates and runs virtual machines and shares physical resources between them. The hypervisor allocates CPU, memory and I/O to each VM.

  3. How does a container differ from a virtual machine?
    • A container always needs more memory than a VM
    • A container includes a complete guest operating system
    • A container can only run on physical hardware without an OS
    • A container shares the host operating system's kernel instead of running its own full OS
    Show answer

    A container shares the host operating system's kernel instead of running its own full OS. Sharing the kernel makes containers light and quick to start.

  4. Why are virtual machines useful for testing suspicious software?
    • The software runs in an isolated sandbox, so the host and other systems are protected
    • VMs run software faster than real hardware
    • VMs cannot connect to networks
    • Viruses cannot run on virtual machines
    Show answer

    The software runs in an isolated sandbox, so the host and other systems are protected. Isolation lets you observe it safely and delete the VM afterwards.

  5. Which is an advantage of containers over virtual machines?
    • They give stronger isolation
    • They can run a different OS kernel from the host
    • They start in seconds and many more fit on one server
    • They need a separate licence for each guest OS
    Show answer

    They start in seconds and many more fit on one server. No full OS to boot or store.

  6. Which is a drawback of running many virtual machines on one physical server?
    • A hardware failure on that server stops every VM on it
    • The VMs cannot share the CPU
    • Each VM needs its own physical network cable
    • VMs cannot be backed up
    Show answer

    A hardware failure on that server stops every VM on it. All eggs in one basket unless VMs are replicated elsewhere.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.