Synchronizing networks between Hyper-V hosts
When managing multiple Hyper-V Servers simultaneously, it is often best to keep the server configurations similar. This allows for easier management of the servers, as well as enabling portability of the virtual machines between the Hyper-V Servers. In this recipe we will synchronize the networking configuration between Hyper-V Servers.
Getting ready
To perform this recipe we will need two Hyper-V Servers with similar hardware configurations. We are assuming that the physical servers are configured similarly, specifically, with respect to the number, naming, and purpose of the network adapters.
How to do it...
Carry out the following steps to synchronize networks between Hyper-V hosts:
Open PowerShell and collect information on the
Private
andInternal
switches:$HV01Switch = Get-VMSwitch -ComputerName HV01 -SwitchType Private, Internal $HV02Switch = Get-VMSwitch -ComputerName HV02 -SwitchType Private, Internal
Compare the switches and create new switches...