Hyper-V Failover Cluster Windows Server 2016 common errors
In this article I cover the issues I've found while setting up a Hyper-V Failover Cluster Windows Server 2016, common errors that are on the path to success. First of all, a brief layout of the configuration that we used:
- DC01 = A Windows Server 2016 function as a Domain Controller
- HYPERV-01 = A Windows Server 2016 with the Hyper-V role and the Failover Clustering feature
- HYPERV-02 = A Windows Server 2016 with the Hyper-V role and the Failover Clustering feature
- NAS01 =A HP Server with storage running FreeNAS, presenting the storage via iSCSI to the Hyper-V nodes
This is quick menu for this article:
- Considerations for the FreeNAS
- Considerations for the HYPER-V
- List the Hyper-V Failover Cluster Windows Server 2016 common errors
You may want to have only one iSCSI target, but associate to that target at least 2 volumes: 1 x volume of 5GB to be used as the "Disk Witness in Quorum" and another volume to be the actual "Cluster Shared Volume" where you shared VMs will run. This is how I created it
- ClusterData Volume = 100GB
- ClusterWitness Volume = 5GB
Sure you can install the Hyper-V role and the Failover Clustering at the same time, but before doing all of that and way before you attempt to configure the Failover console you need to ensure that you have properly setup the Hyper-Vs to avoid any errors. This is how I did it:
Visit the Control Panel >> Administrative Tools >> iSCSI Initiator and add on the "Discovery" tab the IP of your FreeNAS, then visit the "Volumes and Devices" tab and click on Auto Configure. After you have done all of that, the 2 x disks we configured on the FreeNAS will be presented to the Hyper-V under Disk Management with the default status of "Offline", put then Online, Initiate them and create your partition accordingly.
Each one of the Hyper-V servers that you have should be configured under Disk Management exactly the same, contain the drives of the FreeNAS just like this. Note that I assigned drive letter W:\ for the Witness drive, of course
You need to have at least 2 x network cards on your Hyper-V host, and preferentially on the same VLAN. We'll use "Ethernet0" for host communication (static IP) and "Etherner1" for VMs communication (DHCP)
Before adding the role, ensure that both servers where Hyper-V will be installed are members of a domain. I recommend you to create a specific OU for this to host the Hyper-Vs, on my example I created an OU called "Failover" and moved my two Hyper-V hosts in there
During the installation role wizard, select "Ethernet1" as the NIC where a virtual switch will be initially created for VM traffic communication. Leave all other settings as default and reboot the server after the role is installed
For easier management and simplicity purposed, rename that virtual LAN that you have created on the Hyper-Vs after the reboot. I renamed "Virtual NIC Ethernet2":
Before taking things further, you need to think of a name and have a free IP address for your cluster. I thought of the name "Cluster1", yeah, so original! Once you have decided on these two details, create an entry for the cluster name on your DNS
When you create the DNS entry for your cluster name, ensure that you select the option "Allow any authenticated user to update DNS records with the same owner name"
This is how your entry for the Cluster Name should appear on DNS, nice and clean
Once you have done all the steps above, then you're ready to add the Failover Clustering feature on each one of the Hyper-V hosts. After installation, open "Failover Cluster Manager" and create a new cluster, ensure that the Hyper-V hosts name are resolved okay by DNS, just make sure and double check that DNS is configured okay
Before going ahead with this, ensure that the storage has been formatted!
Select "NO" to run the Microsoft Cluster Validation, it will be run at the end anyway, and what's the point to run it now if nothing is configured?
Type the cluster name, on my example I typed "Cluster1", and choose a free IP address for the name, basically entering the details that you previously created on the DNS console. Please note that a new AD object will be created under that name, so ensure the name does not exist on AD before naming the cluster, let the Failover feature handle the AD creation object (thou, as mentioned, you do have to create manually its corresponding entry in DNS)
Ensure as well that you leave the default option "Add all eligible storage to the cluster" ticked
Finally, ensure that both drives that have detected and/or added to the Failover Cluster, because we'll be using in a minute the 100GB drive to store VM data on it
Now the Failover Clustering is configured in both Hyper-V hosts, it is important to note that Disk Management will report the cluster volumes as "Reserved", leave them alone and do not touch them. The drives will not appear under My Explorer either, they are actually presented under a folder called C:\ClusterStorage
On any one of your hosts, visit the C:\ClusterStorage\Volume1 folder and create in there two folders: "Virtual Hard Disks" and "Virtual Machines"
one for for each of the Hyper-V host that you have, and inside each of these folders create a "Virtual Disks" and "VMs" folder. The file structure should look like this:
Configure each of the Hyper-V servers to point to that Volume1 folder inside the C:\ClusterStorage, that way the new VMs that you created are placed on the right Cluster storage location
If you have any virtual machine running locally on any Hyper-V host, now is the time to move them to your centralised Cluster Storage. Right-click the VM and choose to move it to a single storage location, being that one the Volume 1 folder
Once you have ensured that all the VMs that you have running, regardless of which Hyper-V host, have been moved to the centralised Cluster Storage, you can add the "Virtual Machine" role into the Failover Cluster Manager console for each one of those VMs
You can test it now! If you kill the power of the Hyper-V host where the VM is running, it first of all the VM will go into "Unmonitored" status, and will remain inaccessible in that status for 4 minutes, hoping for the original host where it was running to come back online. The original host will have the status of "Isolated", but if it remains like that for over 4 minutes, the host will be marked as "Down" and the High Availability VM will start on any available host
Cluster network name resource 'Cluster Name' failed registration
If you get the error message Event ID: Cluster network name resource 'Cluster Name' failed registration of one or more associated DNS name9s) for the following reason: DNS server failure. Ensure that the network adapters associated with dependent IP address resources are configured with at least one accessible DNS server
Solution: this error probably means that you forgot to tick the option "Allow any authenticated user to update DNS records with the same owner name" when you created the DNS entry for the Cluster Name. Delete the entry and create it again, ensuring that option is selected
London, April 2023