This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.
Prerequesites
- Azure Stack HCI Single Node
Creating an internal virtual switch
# Creating an interal virtual switch
New-VMSwitch -SwitchName NAT_vSwitch -SwitchType Internal -Verbose
# Determining ifIndex
Get-NetAdapter
# Setting up the NAT-Gateway
New-NetIPAddress -IPAddress 172.31.1.1 -PrefixLength 24 -InterfaceIndex 20 -Verbose
# Setting up the NAT-Network
New-NetNat -Name NATNetwork -InternalIPInterfaceAddressPrefix 172.31.1.0/24 -Verbose
# Connecting VMs
Get-VM | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName NAT_vSwitch
Expected Result:
Finally, an IP from the NAT network has to be assigned to the connected VMs and the default gateway address has to be set to the NAT gateway address.
The subnet mask is to be defined with 255.255.255.0 and as DNS you can take 8.8.8.8 .
You are now connected to the Internet.
Expected Result: