To build a 2-node File Server Failover Cluster Instance in Azure, we are going to assume you have a basic Virtual Network based on Azure Resource Manager and you have at least one
virtual machine up and running and configured as a Domain Controller. Once you have a Virtual Machine and a Domain Controller configured, you are going to provision two virtual machines which will act as the two nodes in our cluster.
Our environment will look like this:
DC1 – Our Domain Controller and File Share Witness
VM-1 and VM-2 – The two nodes of our File Server Cluster. We are building a File Server Cluster in this guide. In another step-by-step guide we will demonstrate a SQL Server cluster
Create the Cluster
Now that both cluster nodes (VM-1 and VM-2) have been provisioned as described above and added to the above provisioned domain controller, a cluster can be created. Before a cluster can be created the Failover Clustering feature needs to be enabled on all cluster nodes. Once enabled you are ready to build your cluster. Most of the steps shown can be performed both via PowerShell and the GUI. PowerShell is recommended for the first step.
If the cluster is created via the Failover Cluster Manager GUI it will be given a duplicate IP address. Azure VMs have to use DHCP. By specifying “Static IP” VMs in
the Azure portal, a DHCP reservation was created. This is not exactly a DHCP reservation because a true DHCP reservation would remove that IP address from the DHCP pool.
Specifying a Static IP address in the Azure portal means that if the IP address is still available when the VM requests it, Azure will assign that IP address to it. However, if the VM is offline and another host comes online in that same subnet it could be issued that same IP address.
There is an additional side effect to the way Azure implements DHCP. When creating a cluster with the Windows Server Failover Cluster GUI, there is not an option to specify a cluster IP address. Instead it relies on DHCP to obtain an address. DHCP will issue a duplicate IP address, usually the same IP address as the host requesting a new IP address. The cluster install will complete but there may be some errors and Windows Server Failover Cluster may need to be run from another node. Once it is running, the core cluster IP address must be changed to one that is not currently in use on the network.
To avoid this situation create the cluster via PowerShell and specify the cluster IP address as part of the PowerShell command to create the cluster. The cluster can be
created using the New-Cluster command as follows:
After the cluster creation is completed, validate the cluster by running the following command. Some storage and network warnings are expected but you can ignore the warnings.
Create a Quorum Witness
As mentioned earlier, if you are using Windows 2016 or 2019, a Cloud Witness must be created for the cluster quorum. If you are using Windows Server 2012 R2 or Windows Server 2008 R2, a File Share Witness needs to be created. Instructions for creating one can be found here.