How to Install and Configure the Windows Server Failover Clustering on an ECS Instance

In this tutorial, we will show you how to prepare your remote cloud and deploy Windows Server Failover Clustering on an Alibaba Cloud ECS Instance.

We recommend you use Windows Server Failover Clustering (WSFC) and SQL Server AlwaysOn Availability Groups as your SQL Server high availability solution on Alibaba Cloud’s ECS (Elastic Compute Service) Instances.

WSFC is a feature of the Windows Server platform, which is generally used to improve the high availability of applications and services on your network. WSFC is a successor to the Microsoft Cluster Service (MCS).

An Alibaba Cloud ECS Instance provides fast memory and the latest Intel CPUs to help you to power your cloud applications and achieve faster results with low latency. All ECS instances come with Anti-DDoS protection to safeguard your data and applications from DDoS and Trojan attacks.

The Alibaba Cloud ECS allows you to load applications with multiple operating systems and manage network access rights and permissions. Within the user console, you can also access the latest storage features, including auto snapshots, which is perfect for testing new tasks or operating systems as it allows you to make a quick copy and restore later. It offers a variety of configurable CPU, memory, data disk and bandwidth variations allowing you to tailor each Instance to your specific needs.

We recommend the following hardware to deploy this solution:

  1. ECS: 4-core CPU or above with 16GB of memory, or above.
  2. Mount SSD cloud disks as ECS.

We also recommend the following software with the listed specifications:

  1. .NET Framework 4.0 or above
  2. Powershell 5.0 or above
  3. Windows Server 2016 64-bit Data Center Edition
  4. SQL Server 2016 64-bit Enterprise Edition

1.Set up Your ECS and Remote Cloud

1.1.Modify Your Host Name

You can manually alter the name using the following Powershell command:

Rename-Computer -NewName "ServerName" -restart -force

1.2.Disable UAC Restrictions

new-itemproperty -path 
HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem -Name
LocalAccountTokenFilterPolicy -Value 1

1.3.Install the Windows Failover Cluster Feature

Install -WindowsFeature -Name Failover-Clustering - IncludeManagementTools

1.4.Modify the DNS Suffix of a Windows Host

You can modify it through the UI, or use the Powershell command:

$ParentKeyPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
New-ItemProperty -Path $ParentKeyPath -Name "NV Domain" -Value $DnsSuffix -PropertyType

1.5.Change the Host’s Static IP Address

You can use the UI or the Powershell command for configuration. However, remember to check the DNS configuration and adjust it as necessary. The Powershell command is as follows:

$IPType = "IPv4"$Adapter = Get-NetAdapter | Where-Object {$_.Status -eq 'up' -and $ -ne 'loopback'}$IpAddress=((($Adapter | Get-NetIPConfiguration).IPv4Address) | Where InterfaceAlias -ne "loopback").IPAddress
$PrefixLength=((($Adapter | Get-NetIPConfiguration).IPv4Address) | Where InterfaceAlias -ne "loopback").PrefixLength
If (($adapter | Get-NetIPConfiguration).IPv4Address.IPAddress)
$adapter | Remove-NetIPAddress -AddressFamily $IPType -Confirm:$false
If (($adapter | Get-NetIPConfiguration).Ipv4DefaultGateway)
$adapter | Remove-NetRoute -AddressFamily $IPType -Confirm:$false
# config static ip address
$Adapter | New-NetIPAddress -AddressFamily $IPType -PrefixLength $PrefixLength -IPAddress $IpAddress -DefaultGateway $Gateway

1.6.Modify the Host’s Hosts File

copy C:\Windows\System32\drivers\etc\hosts C:\Windows\System32\drivers\etc\hosts_2017033141131
echo >> C:\Windows\System32\drivers\etc\hosts
echo >> C:\Windows\System32\drivers\etc\hosts
echo >> C:\Windows\System32\drivers\etc\hosts

1.7.Create a Windows Cluster

New-Cluster –Name clus-aliyun0001 -Node,, -AdministrativeAccessPoint DNS -StaticAddress

1.8.Set an Arbitration Mechanism for Windows Cluster

Set VOTE: 
$node = "Always OnSrv1"
(Get-ClusterNode $node).NodeWeight = 0
Set no-witness:
Set-ClusterQuorum -NoWitness
Set majority-node arbitration:
Set-ClusterQuorum –NodeMajority

1.9.Set the Interval for the Windows Cluster Failovers

If you want to increase the limit of automatic failovers to, say 30 failovers, use the following command.

(Get-ClusterGroup "Cluster Group").FailoverThreshold = 30

1.10.Create a Read-Only Server Load Balancer

2.Deploy an Active Directory (AD) Domain Service and the CA (Certificate) Service

2.1.Add AD Domain Service

Under Server Roles, click “Active Directory Domain Service” and click “Next”.

Make sure the “Include management tools” checkbox is selected and click “Add Features”.

Check your installation selection matches the screenshot below. Click “Install”.

The installation process will start, and you will see a progress bar:

When the installation is complete, the following line will appear, indicating that you need to configure your installation:

Your installation is complete. Click “Close” and proceed to the next step.

2.2.Configure the AD Domain Service

The configuration wizard window will appear:

Check to “Add a new forest” and enter your root domain name.

Next, click the “Domain Controller Options” on the left-hand menu and fill in the password fields, leaving all the other options as the default values:

Click “Next”. The prerequisite checks should pass successfully. You can now click “Install” to begin the installation:

After the installation your computer will automatically restart. Use “rwstest.comAdministrator” to log in to Windows Server.

2.3.Install the CA (Certificate) Service

Go to “Role Services” and check “Certification Authority Web Enrollment”:

Click “Next” and the following screen should appear:

The CA Service installation is complete.

2.4.Configure the CA (Certificate) Service

Click “Next” and make sure the “Enterprise CA” is selected:

Click “Next”. Then, add the details of your CA:

Click “Next” and check your configuration:

Click “Configure” and the following screen should appear:


The following should appear:

That’s it! You’ve installed and configured Windows Server Failover Clustering for Alibaba Cloud ECS.


Follow me to keep abreast with the latest technology news, industry insights, and developer trends.