Azure VM Nested Hyper-V VM Network Configuration
I'm trying to figure out how to share the internet connection from my HOST
Azure VM to the VM's withing Hyper-V inside the HOST
VM.
I've added two network interfaces to the HOST
Azure VM each with static IP's configured.
Upon creating my Virtual Switch on Hyper-V i've associated the secondary NIC on the HOST
machine and the internet connection is not passing through. I do have "Allow management operating system to share this network adapter" checked.
My intent is to create a Domain Controller with DHCP as a Hyper-V VM within my host machine and create subsequent Hyper-V VM's on the HOST
machine for purposes of exchange, SQL, etc... But I need to get my primary Active Directory VM up and running and can't seem to figure out how to pass the internet connection from the HOST
onto my first Hyper-V VM.
Any help, ideas, input appreciated.
Some context for this question:
I'm investigating setting up a Hyper-V network for Microsoft Exchange. My plan is to create 1 Azure VM and install Hyper-V and multiple VM's inside for Active Directory, Exchange, DNS, DCHP to setup a public facing exchange server.
To share Network from Hyper-V host to VMs do:
Install Routing and Remote Access (RRAS) onto Hyper-V host.
Make custom RRAS config, enabling only NAT and LAN Routing.
Create Internal Hyper-V Switch. Configure its IPv4 settings filling IPv4 and Network Mask, and some DNS servers (8.8.8.8, 8.8.4.4). It will be used as Network Gateway for nested VMs.
Setup NAT onto the network interface that has an access to the Internet (External facing one).
- Connect to VM and assign IPv4, Mask and Network Gateway (which is the Hyper-V vSwitch).
- Flush DNS running
ipconfig /flushdns
command on both Hyper-V and VM hosts. -
ping google.com
from VM.
How NAT works: https://www.petri.com/create-nat-rules-hyper-v-nat-virtual-switch