Virtualised architectures
What is virtualisation?
Virtualisation uses software to create a virtual version of a computer or computing resource. One physical computer can run several separate virtual machines (VMs), each behaving like an independent computer.
Each VM can have its own:
Operating system
Virtual CPU, memory and storage
Applications and files
Network settings
The physical computer is the host. A VM running on it is a guest.
The hypervisor
A hypervisor creates and manages virtual machines. It allocates physical resources—such as processor time, RAM, storage and network access—to the guest systems.
There are two common types:
Type 1 (bare-metal): runs directly on the physical hardware. Often used in servers and data centres.
Type 2 (hosted): runs as an application inside a host operating system. Often used for learning, testing and running a second OS on a personal computer.
How the layers fit together
A simple hosted setup looks like this:
Physical hardware → host operating system → hypervisor software → guest operating system → guest applications
In a Type 1 setup, the hypervisor runs directly on the hardware:
Physical hardware → hypervisor → guest operating systems → guest applications
What happens when a VM runs?
The user starts a VM.
The hypervisor provides it with virtual hardware, such as a virtual CPU and disk.
The guest operating system starts as if it were running on a physical machine.
When the guest needs a resource, the hypervisor manages access to the underlying hardware.
The hypervisor keeps each VM’s allocated resources and activity separate from other VMs.
A virtual CPU is not usually a separate physical processor. The hypervisor schedules the guest’s work on the host’s physical CPU.
Benefits
Consolidation: several servers can run on fewer physical machines.
Isolation: a problem in one VM can often be contained within that VM.
Testing: different operating systems or configurations can be tried without changing the main system.
Snapshots: a VM’s state can be saved and restored, which is useful before risky changes.
Portability: a VM can often be copied or moved to compatible host hardware.
Efficient use of resources: CPU, memory and storage can be shared among guests.
Risks and limitations
Resource contention: VMs compete for physical CPU, RAM, storage and network capacity.
Hypervisor compromise: an attacker who compromises the hypervisor may affect multiple guest systems.
Configuration mistakes: incorrectly configured networking, storage or permissions can expose systems.
VM escape: a vulnerability might allow malicious code in a guest to affect the host or another VM.
Performance overhead: virtualisation may add some overhead compared with running directly on hardware.
Shared failure: if the physical host fails, its VMs may all become unavailable.
Virtual machines provide separation, but they still depend on the security and availability of the physical host and hypervisor.
Virtual machines and containers
A virtual machine includes a guest operating system. A container shares the host operating system’s kernel while isolating an application and its environment.
Virtual machine | Container |
|---|---|
Has its own guest OS | Shares the host kernel |
Usually uses more resources | Usually uses fewer resources |
Can run a different OS kernel from the host, subject to platform support | Generally needs a compatible host kernel |
Useful for OS testing and stronger system separation | Useful for packaging and deploying applications |
Example: client and server practical
For a client/server exercise, you might create:
One VM acting as a server
Another VM acting as a client
A virtual network connecting them
The client sends a request across the network. The server receives it and returns a response. This lets you practise network and OS services without needing separate physical computers.
Key terms to remember
Host · guest · virtual machine · hypervisor · Type 1 · Type 2 · isolation · resource allocation · virtual network · snapshot
Check your understanding
What is the difference between a host and a guest?
What does a hypervisor manage?
How do Type 1 and Type 2 hypervisors differ?
Why can a VM still be affected if its physical host fails?
How does a container differ from a virtual machine?
Answers:
The host is the physical computer; a guest is a virtual machine running on it.
It creates and manages VMs and allocates physical resources to them.
Type 1 runs directly on hardware; Type 2 runs within a host operating system.
The VM depends on the host’s hardware and hypervisor.
A VM has a guest OS; a container shares the host OS kernel.