Nested Hyper-V Networking
February 19th, 2017 by Charlie Russel and tagged Hyper-V, MAC Address Spoofing, Nested Hyper-V, Network Virtualization, Networking, PowerShell
As I was trying to configure a new lab setup that takes advantage of nested Hyper-V so that I can build a lab to do Hyper-V host clustering, I ran into a problem with networking. Everything looked good on the “host1” virtual machine, but the domain controller I created for TreyResearch.net that runs as a nested VM on host1 couldn’t connect to anything outside of host1. Which would end up being a pain fairly quickly. But after a good bit of poking around, I found the solution – either enable MAC Address Spoofing on host1, or configure a NAT switch on host1. For most of us, the MAC Address Spoofing is the simplest solution and works just fine. But if you’re in a public cloud scenario, you’ll likely have to go the NAT route.
To enable Nested Hyper-V, shutdown host1 and then run the following command on the top level host:
Set-VMProcessor -VMName host1 -ExposeVirtualizationExtensions $True
Start host1 and install the Hyper-V role with:
Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature -IncludeManagementTools
Once the reboots finish on host1, enable MAC Address Spoofing on the network adapter(s) of host1:
Get-VMNetworkAdapter -VMName host1 | Set-VMNetworkAdapter -MacAddressSpoofing On
And you’re done.
Posted in Building Labs, Hyper-V, Networking, PowerShell, Windows 10, Windows Server 2016 | Comments Off on Nested Hyper-V Networking