How to enable Nested virtualization on a Server 2016 Standard and Datacenter edition

Server Virtualization :

Windows Server 2016 introduces you to a concept of Nested virtualization . Now we all know what nested virtualization is and how it works but Server 2016 gives you the freedom and opportunity to test it real time . So just an overview about nested virtualization .

Nested Virtualization makes it possible for you to run Hyper-V as a guest VM running on a Hyper-V! What that means is you can actually run a Hyper-v role on a VM instead of a physical host . It exposes hardware virtualization extensions to a VM .

There are some requirements for this technology ”

  • Windows Server 2016 or Windows 10 .
  • Minimum 4 GB Ram for the host
  • Intel VT-x processors(as of now )
  • EPT support
  • Nested VM running Hyper-V must have dynamic memory disabled

You can download the Server 2016 from the following link :

Server 2016 Eval Version

To turn on nested virtualization, first, on the host, you must run the following Windows PowerShell command against a VM that you have created but have not yet turned on.

Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true

If you want to provide connectivity options for the guest VMs that will reside within your nested Hyper-V machine, you have two choices. The first option is to turn on MAC spoofing for the guest VM.This will allow its guest VMs to send traffic over the network. To turn on MAC spoofing on the host Hyper-V switch, use the following command:

Get-VMNetworkAdapter -VMName <VMName> | Set-VMNetworkAdapter -MacAddressSpoofing On

Your second option is NAT. You need to turn on NAT on the nested Hyper-V VM by using the following commands:

new-vmswitch -name VmNAT -SwitchType Internal
New-NetNat –Name LocalNAT –InternalIPInterfaceAddressPrefix “192.168.100.0/24”

When this is done, you need to assign an IP address to the new internal adapter. This essentially will be the gateway address for the VMs running under the nested Hyper-V. Here’s the Windows PowerShell command to do this:

get-netadapter “vEthernet (VmNat)” | New-NetIPAddress -IPAddress 192.168.100.1 -AddressFamily IPv4-PrefixLength 24

Each nested guest VM needs to have an IP address set and its gateway set as follows:

get-netadapter “Ethernet” | New-NetIPAddress -IPAddress 192.168.100.2 -DefaultGateway 192.168.100.1 -AddressFamily IPv4 -PrefixLength 24

 

More info See the following link

User Guide Nesting

Advertisement

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.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: