Tuesday, May 24, 2016

Enable Nested Virtualization in Hyper-V 2016 TP5

This is a short post on how to enable long awaited feature, Nested Virtualization in Hyper-V that is available in Windows 2016 Technical Preview 5 (TP5), which the competition VMware had for few years now.


Nested Virtualization is a feature that would allow us to enable Hyper-V inside the VM. This has many interesting use cases mainly labs and training. and even run other Hypervisors like VMware on top of Hyper-V.


To try this feature download latest Windows Server 2016 TP5 ISO from here


Install TP5 and enable Hyper-V role.


Create a new VM and install 2016 TP5 on the VM.


Now if you try to enable Hyper-V role, you would be presented with below error.




This is because Virtualization Extensions of Processor are not exposed to VM and so VM thinks Processor does not have Virtualization Capabilities.


First turn off the VM and run below command in PowerShell admin mode. Replace <VM’s Name> with name of VM in which you want to enable Hyper-V


Set-VMProcessor –VMName <VM's Name> -ExposeVirtualizationExtensions $true




Once the above PowerShell command finishes successfully you can start the VM and enable Hyper-V.


If you run the command without shutting down the VM you would see a error as below




If you like to check if Virtualization Extensions are exposed to the VM, you can run the below command.


ExposeVirtualizationExtensions will be True if enabled and False if not


Get-VMProcessor -VMName <VM's name> | FL *




Below is the graphical representation of Nested Virtualization.



Image Source – msdn.microsoft.com







Download Windows Server 2016 TP5 ISO (You would need Microsoft Live ID to download) - https://www.microsoft.com/en-in/evalcenter/evaluate-windows-server-technical-preview