Skip to content

Instantly share code, notes, and snippets.

@spjeff
Created August 9, 2020 21:31
Show Gist options
  • Save spjeff/6fc30ab43eeef15f90745f3f0fd2cd65 to your computer and use it in GitHub Desktop.
Save spjeff/6fc30ab43eeef15f90745f3f0fd2cd65 to your computer and use it in GitHub Desktop.
# from https://www.vembu.com/blog/running-hyper-v-in-azure-nested-virtualization/
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
New VMSwitch -Name "InternalNATSwitch" -SwitchType Internal
Get-NetAdapter
New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceIndex 14
New-NetNat -Name "InternalNAT" -InternalIPInterfaceAddressPrefix 192.168.00/24
Test-NetConnection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment