-
Nested virtualization
Nested virtualization makes it possible for you to run Hyper-V as a guest VM running on Hyper-V! It
exposes hardware virtualization extensions to a VM. There are some requirements for running this
technology:
Windows Server 2016 or Windows 10
Minimum 4 GB RAM for the Host
Intel VT-x processors (as of this writing)
EPT Support
Nested VM running Hyper-V must have dynamic memory disabled
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| 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
Source of Information : Microsoft Introduction Windows Server 2016
Subscribe to:
Post Comments (Atom)
0 comments: