Sideway
output.to from Sideway
Draft for Information Only

Content

Microsoft Windows 10 Nested Hyper-V
 Nested Virtualization
 Nested Hyper-V Requirements
 Virtualization
 Nested Virtualization Option
  Enable Nested Virtualization Option
  Disable Nested Virtualization Option
 Memory Option
 Networking Option
  MAC Address Spoofing
  Network Address Translation (NAT)
 Reference/Source

Microsoft Windows 10 Nested Hyper-V

Nested Virtualization

Nested virtualization is a feature of running a Hyper-V inside of a Hyper-V virtual machine (VM). The nested virtualization feature of a Hyper-V virtual machine enables running other testing configurations on the same virtural machine.

Nested Hyper-V Requirements

  1. The Hyper-V virtual machine configuration must be version 8.0 or greater.
  2. The Hyper-V host and guest must both be Windows Server 2016/Windows 10 Anniversary Update or later.
  3. Nested virtualization is currently only available for Intel processor with VT-x and EPT technology. last updated 18Dec2016
  4. 3rd Party Virtualization Apps that requires hardware virtualization extensions other than Hyper-V are also not supported Hyper-V virtual machine. last updated 18Dec2016
  5. vmemory size 4G or more with dynamic memory disabled
  6. vcpu 2 or more
  7. ExposevirtualizationExtensions feature enabled.

Virtualization

Modern processors provide features, e.g. Intel VT-x and AMD-V for making machine virtualization more easily. Hyper-V also relies on these processor virtual extension features to run virtual machines. By design, Hyper-V always prevents other software from using these processor capabilities once Hyper-V starts. This prevents guest virtual machines from running Hyper-V. However, nested virtualization feature makes these processor capabilities also available to guest virtual machines. In other words, the virtual extension features of phyical processor is also available to the virtual processor of guest OS through the optional nested virtualization feature.

Nested Virtualization Option

The nested virtualization feature is an optional feature of a Hyper-V virtual machine. The nested virtualization feature is controlled by the ExposeVirtualizationExtensions attribute of a Hyper-V virtual machine. The nested virtualization feature must be enabled before a virtual machine is ON state. In other words, the setting of nested virtualization feature of a virtual machine can only be done while the virtual machine is stopped in the OFF state.

Enable Nested Virtualization Option

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Disable Nested Virtualization Option

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $false

Memory Option

The nested virtualization feature itself does not affect the choice of virtual machine memory option. However, when Hyper-V is running inside a virtual machine, the dynamic memory and runtime memory resize options will be disabled because the virtual machine must be turned off to adjust its memory. In other words, the amount of memory will not fluctuate even if dynamic memory is enabled or any attempt to adjust the amount of memory while a virtual machine without dynamic memory enabled is running will fail.

Networking Option

The virtual networking for second-level virtual machines is different from first-level virtual machines. The two options are MAC address spoofing and NAT networking

MAC Address Spoofing

In order for network packets to be routed through two virtual switches, MAC address spoofing must be enabled on the first level of virtual switch. e.g the PowerShell command

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

Network Address Translation (NAT)

The second option relies on network address translation (NAT). This approach is best suited for cases where MAC address spoofing is not possible, like in a public cloud environment. First, a virtual NAT switch must be created in the host virtual machine (the "middle" VM). Note that the IP addresses are just an example, and will vary across environments:

New-VMSwitch -Name VmNAT -SwitchType Internal 
New-NetNat –Name LocalNAT –InternalIPInterfaceAddressPrefix “192.168.100.0/24”

Next, assign an IP address to the net adapter:

Get-NetAdapter "vEthernet (VmNat)" | New-NetIPAddress -IPAddress 192.168.100.1 -AddressFamily IPv4 -PrefixLength 24

Each nested virtual machine must have an IP address and gateway assigned to it. Note that the gateway IP must point to the NAT adapter from the previous step. You may also want to assign a DNS server:

Get-NetAdapter "Ethernet" | New-NetIPAddress -IPAddress 192.168.100.2 -DefaultGateway 192.168.100.1 -AddressFamily IPv4 -PrefixLength 24 Netsh interface ip add dnsserver “Ethernet” address=<my DNS server>

Reference/Source


©sideway

©sideway

ID: 180100035 Last Updated: 1/31/2018 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339new

Travel 7new

Reference 79

Computer

Hardware 251

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019