Hypervisors, Virtual Appliances and Containers
Virtualisation lets many systems share hardware, which changes how they must be secured. This lesson explains Type 1 and Type 2 hypervisors and how to secure them, virtual appliances, and containers and their security.
Learning outcomes
After completing this lesson, you will be able to:
- Compare Type 1 and Type 2 hypervisors.
- Describe hypervisor security practices.
- Explain how virtual appliances are secured.
- Describe container security practices.
Hypervisors
A hypervisor, or virtual machine monitor, creates and runs virtual machines (VMs), each with its own operating system, on shared physical hardware, and isolates them from each other. There are two types, compared below.
The hypervisor is the most privileged software in a virtual environment: whoever controls it controls every guest. Securing it involves prompt patching (hypervisor vulnerabilities affect all guests), restricting the management interfaces (such as vCenter or Hyper-V management) to a dedicated management network, strong authentication with MFA and role-based access for administrators, disabling unneeded features such as shared folders, clipboard sharing and device passthrough between guests and host, separating VMs of different trust levels onto different hosts or clusters, and logging and monitoring administrative actions. Ransomware groups specifically target hypervisors because encrypting one host's datastore takes down every VM on it.
The following diagram compares an exposed virtualisation management console with a protected one.

Type 1 or type 2 hypervisor?
Virtual appliances
A virtual appliance is a pre-configured VM image that delivers a specific function, such as a firewall, load balancer, VPN gateway, IDS sensor, WAN optimiser or log collector. Virtual appliances deploy quickly, scale with the environment and can inspect east-west traffic between VMs that never reaches physical network devices.
They must be treated like any other system: obtained from trusted sources and verified (for example by checking signatures or hashes), deployed with default credentials changed and unnecessary services disabled, patched through the vendor's update process, monitored and included in the inventory and change management. An outdated virtual firewall appliance is as dangerous as a physical one.
Containers
A container packages an application with its libraries and dependencies and runs it as an isolated process on a shared host operating system kernel, using kernel features such as namespaces and control groups. Containers start in seconds and use far fewer resources than VMs, so they suit microservices and rapid deployment. Orchestrators such as Kubernetes schedule and manage large numbers of containers.
Because containers share the host kernel, their isolation is weaker than that of VMs: a kernel vulnerability or a misconfigured, privileged container can allow an attacker to reach the host and other containers. Container security practices include the following.
- Use minimal, trusted base images from verified sources, and scan images for vulnerabilities in the build pipeline and registry.
- Sign images and allow only signed images from approved registries to run.
- Run containers as non-root, without the privileged flag, with read-only file systems and only the capabilities they need.
- Keep secrets out of images; inject them at run time from a secrets manager.
- Apply resource limits to prevent one container exhausting the host.
- Restrict network traffic between containers with network policies, and secure the orchestrator's API and role-based access.
- Monitor container behaviour at run time and keep host kernels patched.
Hypervisor management exposure
A company's virtualisation management console is reachable from the general office network, and administrators log in with passwords only. Why is this especially dangerous?
The management console controls every VM. An attacker who phishes an administrator or compromises any office PC could reach it, then shut down, copy or encrypt all VMs, which is a common ransomware tactic. Restrict it to a dedicated management network reached through hardened jump hosts, require MFA and individual accounts with least privilege, patch it promptly and monitor its logs.
The privileged container
A developer runs a container with the privileged flag and as root so that a monitoring tool works. What risk does this create?
A privileged container has almost full access to the host. If the application in it is compromised, the attacker can likely escape to the host and reach every other container on it. The tool should be given only the specific capabilities it needs, run as non-root where possible, or be deployed as a properly secured host agent instead.
Why do containers have weaker isolation than virtual machines?
Show answer
Containers share the host operating system kernel, so a kernel flaw or privileged container can affect the host and other containers; VMs each run their own kernel on a hypervisor.
Exam Tips
Remember for the exam
- Type 1 hypervisors run on hardware and have a smaller attack surface than Type 2.
- Protect hypervisor management interfaces: management network, MFA, patching.
- Containers share the host kernel; do not run them privileged or as root.