Virtualization Concepts
Key Takeaways
- A hypervisor is software that creates and manages virtual machines — Type 1 (bare-metal) runs directly on hardware for production use, while Type 2 runs on top of a host OS for development and testing.
- Each virtual machine (VM) has its own virtual CPU, RAM, storage, and network adapter, and operates independently as if it were a separate physical computer.
- Virtual machines provide sandboxing (isolation for testing), legacy application support, cross-platform development, and efficient hardware utilization through consolidation.
- Resource requirements for virtualization include sufficient CPU cores, RAM (each VM needs dedicated allocation), storage (each VM needs its own virtual disk), and a CPU with hardware virtualization support (Intel VT-x or AMD-V).
- Containers (Docker, Kubernetes) are lighter than VMs — they share the host OS kernel and start in seconds, while VMs include their own OS and take minutes to boot.
Virtualization Concepts
What Is Virtualization?
Virtualization is the process of creating virtual (software-based) versions of physical resources — including computers, storage, networks, and operating systems. A single physical machine can run multiple virtual machines (VMs), each functioning as an independent computer with its own operating system and applications.
Hypervisors
A hypervisor is the software layer that creates and manages virtual machines. There are two types:
Type 1 Hypervisor (Bare-Metal)
| Feature | Detail |
|---|---|
| Installation | Directly on hardware (no host OS) |
| Performance | Near-native (minimal overhead) |
| Use Case | Enterprise servers, data centers, production |
| Examples | VMware ESXi, Microsoft Hyper-V (Server), Citrix XenServer, KVM |
| Management | Remote management console |
Type 2 Hypervisor (Hosted)
| Feature | Detail |
|---|---|
| Installation | On top of an existing host operating system |
| Performance | Lower (host OS adds overhead) |
| Use Case | Development, testing, education, home lab |
| Examples | VMware Workstation, Oracle VirtualBox, Parallels Desktop |
| Management | Application window on the host desktop |
Exam Tip: Type 1 hypervisors are more efficient because they communicate directly with hardware. Type 2 hypervisors must go through the host OS, adding latency.
Virtual Machine Components
Each VM is allocated virtual versions of physical hardware:
| Virtual Component | Description |
|---|---|
| vCPU | Virtual CPU cores allocated from the physical CPU |
| vRAM | RAM allocated from the host's physical RAM |
| Virtual Disk | A file on the host that acts as the VM's hard drive (.vmdk, .vhd, .vhdx, .qcow2) |
| Virtual NIC | Software network adapter connected to virtual switches |
| Virtual Optical Drive | Mounts ISO files as virtual CD/DVD |
| Virtual Display | Software-rendered display output |
Virtual Networking Modes
| Mode | Description | Internet Access | Host Communication | Other VMs |
|---|---|---|---|---|
| Bridged | VM gets its own IP on the physical network | Yes | Yes | Yes |
| NAT | VM shares the host's IP via NAT | Yes | Limited | No (isolated) |
| Host-Only | VM can only communicate with the host | No | Yes | Only same network |
| Internal | VMs communicate only with each other | No | No | Yes |
VM Resource Requirements
To run virtual machines effectively, the host needs:
| Resource | Minimum Requirement | Recommendation |
|---|---|---|
| CPU | Hardware virtualization (VT-x/AMD-V) enabled | Multi-core (4+) with VT-x/AMD-V |
| RAM | Host OS + VM RAM requirements | 16 GB+ (each VM needs 2–8 GB) |
| Storage | Host OS + VM disk files | SSD recommended; each VM uses 20–100 GB |
| Network | Standard NIC | Multiple NICs for bridged VM networking |
Critical BIOS Setting: Hardware virtualization (Intel VT-x or AMD-V) must be enabled in BIOS/UEFI for VMs to function. This is often disabled by default.
Containers vs. Virtual Machines
| Feature | Virtual Machines | Containers |
|---|---|---|
| Isolation | Full (separate OS kernel) | Process-level (shared kernel) |
| Size | Large (GB — includes full OS) | Small (MB — app + dependencies only) |
| Boot Time | Minutes | Seconds |
| Resource Usage | Higher (each VM runs its own OS) | Lower (shared host kernel) |
| Portability | Less portable | Highly portable (runs anywhere) |
| Use Case | Running different OSes, full isolation | Microservices, DevOps, scaling apps |
| Examples | VMware, Hyper-V, VirtualBox | Docker, Podman, Kubernetes (orchestration) |
Common Virtualization Use Cases
| Use Case | Description |
|---|---|
| Server Consolidation | Run multiple server workloads on fewer physical machines |
| Development/Testing | Create isolated environments for software testing |
| Legacy Applications | Run old software that requires outdated operating systems |
| Sandboxing | Isolate potentially dangerous software for safe analysis |
| Cross-Platform Testing | Test software on multiple OS versions from one machine |
| Disaster Recovery | VM snapshots and cloning for fast recovery |
| Training/Education | Create lab environments for learning without risk |
| Desktop Virtualization (VDI) | Centrally managed virtual desktops delivered to thin clients |
Which type of hypervisor runs directly on the hardware without a host operating system?
What BIOS/UEFI setting must be enabled for virtual machines to function?
What is the primary advantage of containers over traditional virtual machines?