Datacenter

Working in a Datacenter – Nested Hyper-V or Running Hyper-V in Hyper-V

image

There are many reason where it make sense to run Hyper-V in Hyper-V, one of them being to enable Credential Guard (VSM) in Windows Server 2016 TP 4 and later. For training, demos, test. R&D it is great. For Windows Server 2016 TP4 it needs to be enable and configured to work and that means PowerShell. Currently there are also some limitations.

On the Host:

Device Guard Disable
Credential Guard Disable
Hyper-V Enabled
Hardware Intel VT-x
Windows Version Build 10565 or greater

 

In the VM:

Dynamic Memory No
Change memory while VM is running No
Using any kind of Checkpoint No
Live Migration No
Save/Resume No

 

You can read the fine print here: https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/user_guide/nesting

The PowerShell Function/Script:

This script will enable Nested Hyper-V an a VM
Invoke-WebRequest "https://raw.githubusercontent.com/DeploymentBunny/Files/master/Tools/Enable-NestedHyperV/EnableNestedHyperV.ps1" -OutFile ~/EnableNestedHyperV.ps1
Import-Module ~/EnableNestedHyperV.ps1
Enable-NestedHyperV -VMname TEST100
This Script (Provided be Microsoft) will verify configuration
Invoke-WebRequest "https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/hyperv-tools/Nested/Get-NestedVirtStatus.ps1" -OutFile ~/Get-NestedVirtStatus.ps1
~/Get-NestedVirtStatus.ps1

/mike

1 reply »

  1. Reblogged this on configMgr and commented:
    Testing Nested Hyper-V? Mikael’s adds simplicity with a script for enabling the proper settings in a VM running in Hyper-V.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.