Virtualization and Cloud Computing (chapter 21

Key Terminology & Concepts

  • Virtual Machine (VM): Software-based simulation of a physical computer running a complete guest operating system using physical hardware resources via a hypervisor.

  • Virtualization vs. Emulation:

    • Virtualization: Uses a hypervisor and CPU hardware extensions (Intel VT-x / AMD-V) to run guest OSs directly on host hardware at near-native speed.

    • Emulation: Translates hardware/firmware instructions completely in software without hypervisor support (e.g., running ARM code on an x86 CPU or web-based router/BIOS interfaces). Slower than virtualization.

  • Virtual Desktop Infrastructure (VDI): Server-based technology that hosts and manages virtual desktops centrally, streaming screen output to remote clients via a browser or dedicated app.

Hypervisor Types Comparison

Attribute

Type 1 (Bare-Metal / Native)

Type 2 (Hosted)

Execution Layer

Runs directly on physical hardware (no underlying host OS)

Runs as an application inside a host OS

Performance & Efficiency

Higher performance, low overhead

Lower performance, additional OS overhead

Target Environment

Enterprise servers and data centers

Workstations, testbeds, client desktops

Examples

VMware ESXi, MS Hyper-V (Server), KVM

Oracle VirtualBox, VMware Workstation, Hyper-V (Windows Pro/Ent)

Exam Tip: Hyper-V requires Windows Pro or Enterprise (64-bit), BIOS/UEFI virtualization support enabled, and Second Level Address Translation (SLAT). It is not available on Windows Home editions.

Hardware Resource Allocation & Formats

  • CPU: Allocate virtual cores/threads to guests, but never allocate >50% of the host's physical CPU resources to avoid CPU starvation and context switching contention between host and guest.

  • RAM & Storage: Allocate static or dynamic (thin-provisioned) memory and drive space.

  • Virtual Hard Disk Formats:

    • .vhdx → Microsoft Hyper-V

    • .vmdk → VMware Workstation / ESXi

    • .vdi → Oracle VirtualBox (can also read/write .vmdk for compatibility)

Virtual Networking Modes

  • Bridged: Guest NIC attaches directly to the physical network. Receives its own unique IP address on the physical subnet.

    • Security Warning: Exposes the VM directly to external network traffic.

  • NAT (Network Address Translation): Guest sits behind a virtual router using a private IP address space, sharing the host's physical IP address for external connections. Default and recommended for standard internet access.

  • Host-Only: Creates an isolated private virtual network strictly between the host and host-managed guest VMs. No external network traffic permitted.

  • No Networking (Disabled): Disables the virtual network interface completely. Used for highly sensitive data processing or virus isolation.

Virtualization Risks & Security Best Practices

1.Prevent VM Escape:High Severity Threat.

VM Escape: An exploit where malware inside a guest VM breaks out of isolation to compromise the host OS.

Mitigation: Keep the hypervisor patched immediately upon release of CVE security updates.

2.Control VM Sprawl:Administrative Overhead.

VM Sprawl: Uncontrolled growth of unmanaged or forgotten VMs across an organization.

Mitigation: Implement formal lifecycle management policies, automated reporting, and asset tracking tools.

3.Harden Guest & Host Configurations:System Hardening.

  • Disable unused virtual hardware (USB ports, optical drives, secondary NICs).

  • Set virtual BIOS/UEFI boot order to boot from the virtual hard drive first.

  • Restrict network share permissions between host and guest.

Containers vs. Sandboxes

+------------------------------------+   +------------------------------------+
|            Virtual Machine         |   |               Container            |
| +--------------------------------+ |   | +--------------------------------+ |
| |        App A & Dependencies    | |   | |       App A & Dependencies     | |
| +--------------------------------+ |   | +--------------------------------+ |
| |        Complete Guest OS       | |   | |    Shared OS Kernel / Engine   | |
| +--------------------------------+ |   | +--------------------------------+ |
| |       Virtual Hardware (RAM/CPU)| |   | |       Host OS & Hardware       | |
| +--------------------------------+ |   | +--------------------------------+ |
+------------------------------------+   +------------------------------------+
  • OS-Level Virtualization (Containers): Isolates applications along with their dependencies while sharing the host OS kernel (e.g., Docker, Podman, LXC). Containers launch instantly and consume far fewer hardware resources than full VMs.

  • Sandboxes: Isolated testing environments separated from production systems to safely test unverified code, untrusted programs, or malware (e.g., Windows Sandbox). Reverts back to a pristine state after each session.