Build a Failover Cluster on VMAS
Build a failover cluster on VMAS
Preparation
Configure Domain Controller
In the Server Manager of the server that you want to use as a Domain Controller, click on Add roles and features.

Check Active Directory Domain Services
and
DNS Server
tabs and continue the installation.

Configure Domain Settings
For the node servers, Control Panel --> System and
Security --> System --> Change settings --> Change,
set the Domain
as you created. You may need to reboot the
machine to make effects.

Configure DNS Settings
For the node servers, change their DNS settings to the same as the DC, Control Panel --> Network and Internet --> Network Connections --> Properties --> Internet Protocol Version 4 (TCP/IPv4).

Add the Failover Clustering Feature to Nodes
This should be done for all the servers that you want to join your WSFC.
In the Server Manager of node servers, click Add roles and features.


Check Failover Clustering
.


Running the Failover Cluster Validation Wizard
Before creating the cluster, it's better to validate first. This step can be done on any of your node servers.
Server Manager --> Tools --> Failover Cluster Manager

Select Validate Configuration

In the Select Servers or a Cluster
section, you may find
the Selected Servers
list is empty. Click
Browse
and search servers using their names.


Run the test and see the test result.


If all tests are successful, check the
Create the cluster now using the validated nodes
to start
creating clusters.

Create WSFC
If you checked the
Create the cluster now using the validated nodes
box,
simply continue installing would successfully create a failover
cluster.
Configure Static IP Address
Double click on the cluster you've created, you will see the
following prompt, and check the Static IP Address
.

Build iSCSI Virtual Disk
One DC as Disk Server.
Two node servers as clients.
Configure Disk Server
Install iSCSI service
Again, in the Server Manager --> Add Roles and
Features. Expand the File and Storage Services
and
check boxes start with iSCSI
.


Create virtual disk
Click on TASKS and New iSCSI Virtual Disk.

Either Select by volume
or
Type a custom path
works.





Here I choose to query clients, as we did before in the creating clusters section.

Those are client servers that access the disk server.



Configuration
Server Manager --> File and Storage Services --> iSCSI --> iSCSI
We can add initiators here.

Configure Client Servers
For each client server, configure it as the following.
Double click to start the iSCSI Initiator
service.

Since my initiator for the disk server is an IQN connection, I need
to input the IP address here. Note that we can find the IP address of
the disk server by typing ipconfig
in the command line.

In the Volumes and Devices
, click
Auto Configure
to add the virtual disk to the volume
list.

Now, we can bring the virtual disk online.

In the Disk Management, we can check the status of the virtual disk.

Note that for both clients and disk servers, we need to turn the
startup type of iSCSI service to auto
.

Add Virtual Disk to Cluster
Go to the Disk Management on any node server, initialize and create a new volume for the virtual disk.

Then go to the Failover Cluster Manager, in the
Disk tab, Add Disk
. Choose the virtual
disk created before. Then, in the active node server, we can find a new
volume in the file explorer. You can click
Move Available Storage
to see whether the action
succeeded.

Configure the Cluster Quorum Settings
On the disk of the DC server, create a Witness file folder and share it. Make sure to give permissions to your WSFC server.

Right click on your cluster, More Actions --> Configure Cluster Quorum Settings. This can be done in any of your node servers.

In the Configure Cluster Quorum Wizard
,
Advanced quorum configuration --> All Nodes --> Configure a file share witness --> Select the path of your shared folder





Install a SQL Server 2019 Failover Clustered Instance (FCI)
Download the SQL Server 2019 installation media on the two node servers.

For the primary node server
Run the setup.exe,
New SQL Server failover cluster installation
in the
installation
tab.

It will go through server checks.

If you have successfully added the virtual disk to the cluster, your virtual disks will be shown here.

Create an IP Address that is different from all IP addresses of your servers and the cluster.




For the secondary node server
Run the setup.exe,
Add node to a SQL Server failover cluster
in the
installation
tab.

Follow similar steps to add a node to the failover cluster.


Testing Failover
In the Failover Cluster Manager, find the cluster, Simulate Failure.
