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.

 

image

 

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

 

image

 

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

 

image

 

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 *

 

image

 

Below is the graphical representation of Nested Virtualization.

 

image

Image Source – msdn.microsoft.com

 

Reference-

https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/user_guide/nesting

https://blogs.technet.microsoft.com/virtualization/2015/10/13/windows-insider-preview-nested-virtualization/

http://www.altaro.com/hyper-v/nested-virtualization-hyper-v-windows-server-2016/

 

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

No comments:

Post a Comment

Share what you feel