It doesn't feel like a hypervisor to me...

When I have talked to people about Hyper-V - I have often come across the sentiment that Hyper-V doesn't feel like a hypervisor based virtualization solution.  You install Windows, enable a role and then have virtual machines - how is this different from the Virtual Server type experience?

So let me step you through this:

  1. The first thing you do with your server is to install Windows Server 2008.  At this stage no virtualization is involved - and it is just plain old Windows.
  2. Once you have done this you enable the Hyper-V role and reboot the computer. Now things get interesting...
  3. Windows starts to boot on the computer, just like it always has, but one of the boot critical drivers (the drivers that get loaded first in the boot process) is now HvBoot.sys which launches the hypervisor - and practically insert it underneath the now booting copy of Windows.
  4. Windows continues to boot - relatively unaware of the fact that this has happened.
  5. Once Windows is up and running you can create virtual machines using the Hyper-V user interface. 
  6. These virtual machines run as partitions on the hypervisor - with the first partition being the operating system you appear to be running.

So what does this mean for the copy of Windows you initially installed on the physical computer?  Well, unlike the virtual machines that you create after installing Hyper-V, this installation of Windows continues to have direct access to the physical hardware and memory in the system.  However, the hypervisor is completely managing its access to CPU resource and system timers. 

For the most part we have worked hard to not have this be exposed in the parent partition - but there are two interesting places where it shows up.  The first is when it comes to accounting for CPU usage (as discussed in this post).  The second is when it comes to looking at CPU capabilities.  When the hypervisor launches it actually starts "lying" about the CPU capabilities to all the partitions (including the parent partition).  It does this so that no software in the guest operating systems try to use CPU functionality that the hypervisor now controls.  The most obvious capability that the hypervisor hides is support for hardware virtualization:

securable

If you look at this screenshot you will see that I am running a virtual machine on Hyper-V - and must, therefore, have hardware virtualization support in my system.  However a copy of securable in the parent partition is reporting that hardware virtualization is not available.  This is because the hypervisor has loaded and is changing the information being reported here.

Cheers,
Ben