Hyper-V Architecture
Hyper-V is a Type-1 (bare-metal) hypervisor that runs directly on hardware, creating a thin hypervisor layer between the physical hardware and virtual machines. Understanding its architecture is essential for optimizing performance and troubleshooting.
Hypervisor Architecture
Core Components
Hyper-V uses a microkernel-based architecture where the hypervisor runs in Ring -1, below the operating system kernel. This provides superior isolation and security compared to Type-2 hypervisors.
Hypervisor Layer
Runs directly on hardware with minimal footprint.
- Hardware abstraction
- Partition management
- Memory management
- Interrupt routing
Parent Partition
The management OS (Windows Server) with privileged access.
- Device drivers
- Virtualization stack
- VM management services
- I/O operations
Child Partitions
Guest VMs with isolated execution environments.
- Isolated memory space
- Virtual processors
- Synthetic devices
- Integration services
VMBus
High-speed communication channel between partitions.
- Inter-partition communication
- Synthetic device access
- Low-latency messaging
- Direct memory access
Partition Architecture
| Component | Parent Partition | Child Partition |
|---|---|---|
| OS Type | Windows Server (Host OS) | Guest OS (Windows/Linux) |
| Hardware Access | Direct access via drivers | Virtualized via VMBus |
| Privileges | Full management rights | Isolated, no host access |
| Role | Manages VMs and I/O | Runs workloads |
Virtual Machine Generations
Generation 1 VMs
- Legacy BIOS-based boot
- IDE and SCSI virtual controllers
- Emulated devices (NIC, video)
- Maximum compatibility with older OS
- 32-bit and 64-bit guest support
Generation 2 VMs
- UEFI-based boot (no BIOS)
- SCSI boot support
- Synthetic devices only (better performance)
- Secure Boot and TPM 2.0
- PXE boot with synthetic NIC
- 64-bit Windows 8+ and modern Linux only
Integration Services
Integration Services are drivers and services that enable enhanced functionality between host and guest:
| Service | Purpose |
|---|---|
| Operating System Shutdown | Graceful shutdown from Hyper-V Manager |
| Time Synchronization | Sync guest time with host |
| Data Exchange (KVP) | Exchange registry key-value pairs |
| Heartbeat | Monitor VM health and responsiveness |
| Backup (VSS) | Application-consistent backups |
| Guest Services | File copy between host and guest |
Memory Architecture
Dynamic Memory
Automatically adjusts VM memory allocation based on demand.
- Minimum and maximum RAM settings
- Memory buffer configuration
- Memory weight priorities
- Hot-add memory support
NUMA Support
Non-Uniform Memory Access awareness for performance.
- Virtual NUMA topology
- NUMA node spanning
- Memory locality optimization
- Processor affinity
Second Level Paging
Hardware-assisted memory virtualization (Intel EPT/AMD RVI).
- Reduced memory overhead
- Better performance
- Simplified address translation
- Hardware acceleration
Smart Paging
Temporary paging file for VM startup with insufficient memory.
- Only used during startup
- Configurable location
- Prevents startup failures
- Automatic cleanup
Storage Architecture
Virtual Hard Disk Formats
- VHD: Legacy format, 2TB limit, broad compatibility
- VHDX: Modern format, 64TB limit, corruption resistance, 4K sector support
- VHDS: Shared VHDX for guest clustering
Disk Types
- Fixed: Pre-allocated space, best performance
- Dynamic: Grows on demand, saves space
- Differencing: Child disk with parent relationship
- Pass-through: Direct physical disk access
Network Architecture
Virtual Switches
- External: Connects to physical network
- Internal: Host and VMs only
- Private: VMs only, isolated
Advanced Networking
- SR-IOV for direct NIC access
- NIC Teaming (LBFO)
- Virtual NIC hardware acceleration
- VMQ (Virtual Machine Queue)