Windows Failover Server Clustering on OCI
Microsoft Windows allows you to configure a failover cluster.
As part of this configuration a single cluster IP address can be configured. This IP address is hosted on the master node of the cluster and if the master node fails, it is automatically failed over to the new master node of the cluster.
As can be seen in the documentation, on OCI, a vNIC can have one or more IP addresses assigned to it. It will always have a primary IP address and can have multiple secondary IP addresses. The IP address of each node in the cluster is assigned as the primary IP address of the vNIC assigned to that node. The cluster IP address is assigned as a secondary IP address, initially to the vNIC of the master node in the cluster. When the master node fails, whilst the Windows clusterware will fail the cluster IP address to the new master node automatically within the cluster, the secondary IP address also has to be reassigned to the vNIC of this new master node. The script provided in the repo performs that functionality.
The script supports a 2 node failover cluster for Windows Server 2016 or Windows Server 2019 with an optional DR node in a different data center. It was designed to provide failover for nodes running SQL Server and optionally you can configure a SQL Server cluster name and IP in which case the script will failover the IP for this cluster as well as for the default Windows failover cluster.
On both nodes of the windows cluster:
Field Name | Description |
---|---|
node1_name | The name of the first node that is configured in the Windows Cluster |
node2_name | The name of the second node that is configured in the Windows Cluster |
sql_cluster_name | If SQL Server is in a cluster as well, specify the configured cluster name. If not specified private_ip_id_sql_cluster will be ignored and is not required. |
private_ip_id_default_cluster | OCID of the secondary IP address configured as the Windows cluster IP address |
private_ip_id_sql_cluster | OCID of the secondary IP addeess configured as the SQL Server IP address |
skip_dr_node_name | If the cluster contains a DR node in a different DataCenter, specify its name here and it will be ignored by the script (which is for HA not DR) |
vnic_1 | OCID of the primary vNIC of Node 1 |
vnic_2 | OCID of the primary vNIC of Node 2 |
schtasks.exe /create /tn IPFailover /xml "<repo directory>oci-mscluster-scheduler.xml" /f