Mark Scholman has been working on a new script project to configure Hyper-V hosts.
This tool allows you to configure hyper-v hosts. It is using the converged network setup as described in this blog post. What it does is the following:
- Rename Adapters
- Create Teams
- Create Tnics
- Set Network Config (MGT,LM,CSV)
- Join Server to the Domain
- Create a server-local administrators group in the domain
- Allows you to create a new or join an existing cluster
- Configure Cluster network names
- Configure Cluster Live migration subnet
On the to-do list is the following and will be added with upcoming releases:
- Configure Storage network (iSCSI & SMB3)
- Use of different topologies for converged networking as described here
- Using Jea or PSCustomSessionConfiguration for deployment of Hyper-V hosts
How to use the tool:
On the newly provisioned Hyper-V Server start the Deploy-HyperVHost.ps1. On the Configure Nic’s tab select the adapters you want to use for Management (MGT / LM / CSV) and click “Set Management Adapters”:
Notice the list box will refresh with the new names for the adapters. Next select the adapters you want to use for VM Network and click “Set VMNet Adapters”
Finally configure Storage adapters:
Result is that we have configured all adapters now with a logical name we can use in the rest of the deployment:
Side note: I used 2 adapters for each team configuration, but you can use for example 3 adapters or 4 adapters for Management and 2 or 3 for the VMNet. The script is intelligent on using the logical names and reusing them in the Team setup.
Next part is to setup the host parameters and start the deployment of the host. Go to the tab “Configure host”
We need to specify the next parameters:
Host Name
The name of the server.
Domain Name
The domain to join the server to.
Management IP
The ip address for the management interface.
Management VLAN
If you’re using vlans specify the vlan id. Untagged is vlan 1.
Management gateway
The gateway for the management network.
Live Migration IP
The ip address for live migration (LM) communication
Live Migration VLAN
The VLAN id used for the LM network.
CSV IP
Cluster IP Address.
CSV VLAN
Cluster VLAN ID.
Primary DNS
The Primary DNS server to use for management network.
Secondary DNS (optional)
If applicable: The second DNS server for the management network.
Domain Controller Name
The Name of a Domain Controller. (needs remote Powershell enabled)
Local Admin Group Name (optional)
Name of a Domain group what is configured to be Local Administrator on the host
Group OU Path (optional)
The OU DN where the group needs to be created.
LAB: Build HyperV on HyperV
Used for demo purposes when you want to run this tool in a Hyper-V Virtual Machine. (Team settings and Hyper-V Role modification in the VM)
Next click on the “Deploy Host” button and enter domain admin credentials
Now wait until the server automatically reboots. While server is rebooting you can verify that the computer is in the domain and the local group is created:
When the server is rebooted login as the domain admin and start the Deployment tool again.
The last tab is for Configure the Cluster. You can create a new cluster:
Or add the node to an existing cluster:
Download the script http://gallery.technet.microsoft.com/Hyper-V-Deployment-Tool-419679d3