Hyper-V NVGRE Gateways are used to allow Virtual Networks in Hyper-V to connect to the internet or establish a VPN connection to the tenant’s on premise environment. An NVGRE Gateway Cluster is configured as a 2 node cluster. You can download a Service Template in VMM to deploy the Gateway’s as a service tier. Personally I experienced a lot of issues using the service template and the lack of Generation 2 support in Virtual Machine Manager (VMM) Service Templates. I have spent some time on creating a PowerShell tool to accomplish this. In this post we are going through the complete deployment and migration of a Hyper-V NVGRE Gateway. In order to use the script we need to have the following components in place:
- Dedicated Hyper-V Host Cluster with shared storage. Best practice is to deploy these host in a separate (HNV) domain and a separate management network for the Hyper-V host and the Virtual Machines.(not required for this toolkit)
- Connectivity from the machine where you run this script to the VMM Server, the dedicated Hyper-V Cluster and the management network where the Gateway VM’s will be deployed to.
- A VMM Template with OS settings configured to join the Virtual Machine in the domain where the Hyper-V hosts are joined. It is required to have the Hyper-V hosts and the Gateway Virtual Machines in the same domain.
- IP Pool for Internet and (HNV) Management network.
- A Run as Account configured in VMM that will be used as run as account to add the Gateway Cluster to VMM.(This is a domain user)
- A Run as Account configured in VMM that will be used for the Local Administrator credentials on the Gateway VM’s we are deploying.
- Name resolution between Management domain and NV HNV domain.
Download the script from the TechNet Script library and run it in PowerShell. Enter your VMM server or cluster name and click on Connect: