

This approach is best suited for cases where MAC address spoofing is not possible, like in a public cloud environment.įirst, a virtual NAT switch must be created in the host virtual machine (the "middle" VM). The second option relies on network address translation (NAT). Get-VMNetworkAdapter -VMName | Set-VMNetworkAdapter -MacAddressSpoofing On

This is completed with the following PowerShell command. In order for network packets to be routed through two virtual switches, MAC address spoofing must be enabled on the first (L1) level of virtual switch. There are two options for networking with nested virtual machines: The incompatibility only occurs while Hyper-V is running in the VM. Note that simply enabling nested virtualization will have no effect on dynamic memory or runtime memory resize. For virtual machines without dynamic memory enabled, any attempt to adjust the amount of memory while it's on will fail.

This means that even if dynamic memory is enabled, the amount of memory will not fluctuate.

When Hyper-V is running inside a virtual machine, the virtual machine must be turned off to adjust its memory. You can disable nested virtualization for a stopped virtual machine using the following PowerShell command: Set-VMProcessor -VMName -ExposeVirtualizationExtensions $false For more information on installing Hyper-V see, Install Hyper-V.
