3.8.1. Host vs. Guest and Virtual Networking
💡 First Principle: The hypervisor creates virtual hardware that VMs believe is real. Understanding the distinction between the host (the physical machine running the hypervisor) and guests (the VMs) is fundamental to understanding resource contention, failure blast radius, and network behavior.
Host vs. Guest
| Host | Guest (VM) | |
|---|---|---|
| Definition | Physical server running the hypervisor | Virtual machine running an OS |
| Failure impact | Host failure = all guests offline | Guest failure = only that VM affected |
| Resource access | Has direct hardware access | Accesses virtualized hardware |
| Management | Managed via hypervisor console | Managed via guest OS |
Hypervisor Types
- Type 1 (Bare metal): Hypervisor runs directly on hardware, no host OS. Examples: VMware ESXi, Microsoft Hyper-V (as a role), XenServer. Better performance, more common in production.
- Type 2 (Hosted): Hypervisor runs as an application on a host OS. Examples: VMware Workstation, VirtualBox. More convenient for development/testing; not suitable for production.
Virtual Networking
VMs don't connect to physical network switches directly—they connect through virtual switches (vSwitches) on the hypervisor:
| Virtual Network Mode | How It Works | VM Access |
|---|---|---|
| Bridged (Direct access) | VM's vNIC connected directly to physical network via vSwitch | Full network access; VM appears as a separate device on the physical network |
| NAT | Hypervisor acts as a NAT router; VMs share the host's IP | Outbound internet access; inbound requires port forwarding |
| Host-only | VMs communicate only with host; isolated from external network | Isolated testing, development environments |
vNICs (Virtual NICs): Software-emulated network adapters presented to VMs. Each VM can have multiple vNICs on different virtual networks.
⚠️ Exam Trap: In bridged mode, the VM appears on the physical network as a separate device with its own IP and MAC address. In NAT mode, the VM shares the host's IP address—all VM traffic appears to originate from the host. This distinction matters for firewall rules, DHCP leases, and network monitoring.
Reflection Question: A VM needs to host a web server accessible by external clients. Should the VM's NIC be configured in bridged mode or NAT mode? What additional configuration is needed for NAT mode?