If you are running Hyper-V Failover Cluster and managing it using SCVMM you would have noticed that when you create a new VM in SCVMM, the VM name in the Failover Cluster Manager shows as “SCVMM VMNAME Resources”.
Also, if you rename a VM in SCVMM or Hyper-V Manager it does not get updated in Failover Cluster Manager and vice versa. This creates issues if you have alot of VMs to manage and then if you need to rename a VM.
To resolve this issue, I wrote a small script using Powershell. This script can be run in two modes:
- Compare the VM names in Failover Cluster and SCVMM and list the VMs with mismatching names.
- Rename the VMs in Failover Cluster to match the SCVMM names.
There are three variables that you need to check/change before running the script:
- $VMMServer: This is your VMM Server FQDN
- $Cluster: This is your Failover Cluster FQDN
- $Mode: If you set it to “1” it will list the VMs with mismatch names, if you set it to “2” it will rename the VMs
If this script works for you and solves your issue, please leave a comment.
Download the script below