Friday, January 29, 2016

Nested Virtualization in Hyper V - Windows 2016

Good day All,

Welcome back!!!

Nested Virtualization on Esxi\VMware workstation was possible with some tweaking that really helped test some scenarios.With new Version of Hyperv in Window 10\Windows 2016 this is possible out of the box just by running a power shell script.

So what is it? well lets say you have Hyper V on a physical Sever, you create a VM and then you want to have Hyper v installed on the VM, before Windows 10\Windows 2016 is not possible, please see the below error you will get if you enable Hyper V





Microsoft Technet site has excellent article on how to enable Nested feature on a VM with Powershell scripts out there.The beauty is that you run the powershell script and it will do the magic for you instead of earlier there was 2 scripts you will need to download and run the script manually.

Before you start the steps make sure the Host you want to have Nested feature enable has the feature to access internet if not you will have to manually do it.

Please note that this can be possible only on Windows 10 or Windows 2016 Technical preview version with build 10565 and above and there are certain checks you need to verify before this is possible, check the below article which talks about everything.

http://blogs.technet.com/b/virtualization/archive/2015/10/13/windows-insider-preview-nested-virtualization.aspx

1. Open powershell window as Administrative Mode.
2. Set-executionpolicy unrestricted - this will all all scripts to run so just be catious
3. run the below command
Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/hyperv-tools/Nested/Enable-NestedVm.ps1 -OutFile ~/Enable-NestedVm.ps1 hit enter
4. ~/Enable-NestedVm.ps1 -VmName (Name of the VM which needs Nested Feature)

In my example below you will see that i am enabling this feature on a VM called "NestedHyperv"



MAC spooking is not enabled you guest VM will not have any network so say Yes.







Dynamic Memory should be disable before you run the script, if not it disables it for you.









Now if I got try enable Hyper V, booms it works..





Well that was easy .. now we really can test all the features of Hyper v if you have enough memory to play with it in a LAB.

If anyone curious to find out how did i test, i have a Window 10 Professional laptop with latest build version




Hope these steps help some one!!! till next one all have a good day!!!

No comments:

Post a Comment