Hyper-V architecture
Knowing how Hyper-V works and how its architecture is constructed will make it easier to understand its concepts and operations. The following sections will explore the most important components in Hyper-V.
Windows before Hyper-V
Before we dive in the Hyper-V architecture details, it will be easy to understand what happens after Hyper-V is installed, by looking at Windows without Hyper-V, as shown in the following diagram:
In a normal Windows installation, the instructions access is divided by four privileged levels in the processor called Rings. The most privileged level is Ring 0, with direct access to the hardware and where the Windows Kernel sits. Ring 3 is responsible for hosting the user level, where most common applications run and with the least privileged access.
Windows after Hyper-V
When Hyper-V is installed, it needs a higher privilege than Ring 0. Also, it must have dedicated access to the hardware. This is possible due to the capabilities of the new processor created by Intel and AMD, called Intel-VT and AMD-V respectively, that allows the creation of a fifth ring called Ring -1. Hyper-V uses this ring to add its Hypervisor, having a higher privilege and running under Ring 0, controlling all the access to the physical components, as shown in the following diagram:
The OS architecture suffers several changes after Hyper-V installation. Right after the first boot, the Operating System boot loader file (winload.exe
) checks the processor that is being used and loads the Hypervisor image on Ring -1 (using the files Hvix64.exe
for Intel processors and Hvax64.exe
for AMD processors). Then, Windows Server is initiated running on top of the Hypervisor and every virtual machine that runs beside it.
After Hyper-V installation, Windows Server has the same privilege level as a virtual machine and is responsible for managing VMs using several components.