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.

image-20220602103151680

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

image-20220602102333211

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.

image-20220607180631031

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).

image-20220607181311498

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.

image-20220602103139638
image-20220602102912334

Check Failover Clustering.

image-20220602104348148
image-20220602103048935

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

image-20220602105158375

Select Validate Configuration

image-20220602105248004

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.

image-20220602110339994
image-20220602110303490

Run the test and see the test result.

image-20220602110507810
image-20220602110705518

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

image-20220607174119603

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.

image-20220602121732074

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.

image-20220602123004600
image-20220602123112170

Create virtual disk

Click on TASKS and New iSCSI Virtual Disk.

image-20220602123606013

Either Select by volume or Type a custom path works.

image-20220602123754160
image-20220602123850625
image-20220602124038768
image-20220602124119537
image-20220602124204011

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

image-20220602124345269

Those are client servers that access the disk server.

image-20220602125418777
image-20220602125735307
image-20220602130013751

Configuration

Server Manager --> File and Storage Services --> iSCSI --> iSCSI

We can add initiators here.

image-20220602130314511

Configure Client Servers

For each client server, configure it as the following.

Double click to start the iSCSI Initiator service.

image-20220602132228794

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.

image-20220602132943178

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

image-20220602135943801

Now, we can bring the virtual disk online.

image-20220602133216522

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

image-20220602133526450

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

image-20220602133916305

Add Virtual Disk to Cluster

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

image-20220602152433107

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.

image-20220602151901691

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.

image-20220606092732482

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

image-20220606093158802

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

image-20220606093427113
image-20220606093544405
image-20220606093655628
image-20220606093810393
image-20220606093833067

Install a SQL Server 2019 Failover Clustered Instance (FCI)

Download the SQL Server 2019 installation media on the two node servers.

image-20220602164508936

For the primary node server

Run the setup.exe, New SQL Server failover cluster installation in the installation tab.

image-20220606094314046

It will go through server checks.

image-20220602164925334

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

image-20220602165504291

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

image-20220602165656261
image-20220602165816089
image-20220602165914386
image-20220602165926475

For the secondary node server

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

image-20220602174455520

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

image-20220602174957642
image-20220606102320690

Testing Failover

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

image-20220607174939143

Build a Failover Cluster on VMAS
http://example.com/2022/06/07/Build a failover cluster on VMAS/
Author
Jiacheng Xie
Posted on
June 7, 2022
Licensed under