Home Page Microsoft Technical/How-To VCF Compute (vSphere) VCF Networking (NSX) Workloads

Microsoft SQL Server Failover Clustering on VCF 9.1 VM Service: Supervisor Direct Implementation (Part 2)

Introduction

In this part of the series, we will build the two nodes MSSQL FCI Cluster via the vSphere Supervisor and the Local Consumption Interface service.

  • Part 1 focuses on Requirements, Topology, and Methods.
  • Part 2 (this article) focuses on the Supervisor Direct Implementation.
  • Part 3 focuses on the VMware Cloud Foundation (VCF) Automation manual implementation.
  • Part 4 focuses on the VCF Automation blueprint-based implementation.

What will you learn from this article?

By the end of part 2, you will be able to create a fully fledged infrastructure that is ready for MSSQL Server Failover Clustering via the Supervisor VM Service.

The Configuration Iteration

To achieve the desired configuration, we will iterate between the vCenter vSphere Client and the Supervisor’s Local Consumption Interface.

For the sake of keeping this realistic, we will put some assumptions for the configuration values, which will be used to represent the different iteration inputs.

Configuration ItemValue
Namespacesql-prod
VM Classsql-fci-8c64g
Storage Classvsan-raid1-sql
Windows Imagewin2k22
Subnetssql-public: 100.100.127.0/24 sql-hearbeat: 192.168.50.0/24
Nodessqlfci01-n1: 100.100.127.11 | 192.168.50.11 sqlfci01-n2: 100.100.127.12 | 192.168.50.12 sql-fci01-cls: 100.100.127.13 (CNO/cluster name object) sql-fci01-lsn: 100.100.127.14 (MSSQL listener)
Shared Volumessqlfci01-data: 500GB. sqlfci01-home: 100GB. sqlfci01-quorum: 50GB.

Step 01: Check the shared-disk capability

Shared disks work only when the Supervisor capability “supports_shared_disks_with_VM_service_VMs” is active, and this is set to true by default, however it is always good to double check.

By using VCF CLI, make sure you are on the Supervisor default context then you can use kubectl to retrieve the capability state, where the expected output is “true”:

On the other hand, when this is set to “false,” the VM Operator removes the shared-disk fields from its API, and the later steps fail.

Step 02: Create the storage policy

Depending on your performance preference, and the actual production MSSQL deployment requirements, you should configure a storage policy to match those requirements. One thing to note: “VM Encryption” cannot be added to-date, and if configured the VM Operator will refuse adding a shared controller on an encrypted storage class. To that end, you may use an alternative, such as. vSAN’s data-at-rest encryption.

Step 03: Create the VM Class

The VM Class here is important, not just from a t-shirt size perspective, but also from a performance perspective, given that creating the VM Class includes configuring the compute criteria required by the MSSQL nodes.

  • From the Supervisor Management, go to the Services tab, and click Manage on the VM Service pane. Click VM Classes, then Create VM Class.
  • Name it, i.e. sql-fci-8c64g, and make sure you’re picking the newest virtual hardware version as this cannot be changed later.
  • Finish the wizard, then open the class and click Edit:
    • Set CPU to 8 and memory to 64 GB.
    • Set the memory reservation to 64 GB and tick Reserve all guest memory (All locked).
    • Leave CPU Hot Plug and Memory Hot Plug unchecked.
  • Under VM Options, Boot Options, choose EFI firmware and enable Secure Boot.
  • An important note: Make sure you’re not adding any new SCSI controllers; those will be added automatically by the VM Operator when the shared disks are attached.

Step 04: Prepare the vSphere Namespace

After configuring the storage policy and the VM Class, and given that you already have a content library that has the Windows 2022 template, it is time to create the Namespace.

  • From the Supervisor Management, go to Namespaces and create the namespace sql-prod in the Supervisor’s designated zone.
  • On the namespace:
    • From the Storage card, add the RAID-5 policy (which will appear in the namespace as a storage class).
    • From the VM Service card:
      • Click Add VM Class and select sql-fci-8c64g.
      • Click Add Content Library and select the library that holds the Windows image.

Step 05: Create the Subnets

The configuration requires the creation of the primary and heartbeat networks, and to that end there are multiple ways:

  • If it is a shared subnet, as in not originating from the Namespace and was created via NSX to serve other workloads, then what you need to do is attach the subnets to the Namespace rather than creating them:
    • From the Supervisor Management, go to sql-prod Namespace and select the Configure tab (give it a couple of seconds to load all the information).
    • In General, scroll down to the Namespace Networks, and click on Add.
    • Once you have added both networks, they will show as “Shared Namespace Network” in the UI.
  • If the subnet will be originating from the Namespace directly, those can be configured via the Local Consumption Interface:
    • From the Supervisor Management, go to sql-prod Namespace and select the Resources tab.
    • Click on “GO TO SERVICE” in the Network card.
    • Click on the Subnets tab.
    • Click on “NEW SUBNET”, and from here the first time you will create the public network, and you will do the same to create the private heartbeat network.
    • Those networks will be bound to the Namespace and will not be marked as shared.

Step 06: Create the shared volumes

For this specific deployment, the shared disks number, volume and sizes are there to serve the purpose of showcasing how it works, however in production, most likely you will have a completely different number of disks with different sizes and allocations based on your requirements.

  • From the Supervisor Management, go to sql-prod Namespace and select the Resources tab.
  • Click on “GO TO SERVICE” in the Volume card, and click New Volume, then you are going to create the following three volumes:
Volume NameCapacityAccess Mode
sqlfci01-data500 GBMultiple VMs / Pods (Read Write Many)
sqlfci01-home100 GBMultiple VMs / Pods (Read Write Many)
sqlfci01-quorum50 GBMultiple VMs / Pods (Read Write Many)

Step 07: Create the VMs

We will be creating the two nodes, without attaching the Shared Volumes during creation, this step will be done later on (the following steps are to be repeated per VM):

  • From the Supervisor Management, go to sql-prod Namespace and select the Resources tab.
  • Click on “GO TO SERVICE” in the Virtual Machine Service card, and click CREATE VM.
  • Pick the source type from where you will deploy this VM: choose OVF
  • Select the VM Class and VM Image:
    • Input the VM’s name.
    • Select the zone.
    • Select the Windows 2022 image.
    • Select the VM class.
    • Select the Storage Class
    • Change the Power State to Powered Off.
  • Advanced Settings (optional): you can configure Sysprep here if desired, otherwise skip to the next configuration window.
  • Network Configuration:
    • Edit the default eth0 interface and select the primary network and input the IP address.
    • Click on ADD NETWORK INTERFACE and select the heartbeat network and input the IP address.
    • Fill in the Global Network Settings as desired.
  • Review and confirm.

Step 08: Attach the Shared Volumes

We will be attaching the 3 volumes that were created previously, and this action will be repeated on the two VMs.

  • From the Supervisor Management, go to sql-prod Namespace and select the Resources tab.
  • Click on “GO TO SERVICE” in the Virtual Machine Service card.
  • Click on the MSSQL node VM.
  • Scroll down to Volumes.
  • Click on “ATTACH VOLUME”.
  • Select Choose from existing volumes, select sqlfci01-data and set Application Type to Microsoft WSFC.
  • Repeat the same steps for sqlfci01-home, then for sqlfci01-quorum (keep the order on both nodes).
  • For you to see also the controller, you can edit the VM settings in the vSphere Client (you’ll get a warning so that you do not to modify anything). From there you can see the additional SCSI controller that has been added and you can see that all 3 volumes/disks are now attached to it.

Step 09: Power On the VMs

Now that everything is set, you can change the state of the VMs from Powered Off to Powered On.

  • From the Supervisor Management, go to sql-prod Namespace and select the Resources tab.
  • Click on “GO TO SERVICE” in the Virtual Machine Service card.
  • Click on the first MSSQL node VM.
  • Toggle the Power State so that to change it to Powered On.
  • Repeat the same steps for the second MSSQL node VM.

Step 10: Create the DRS Rules

Finally you can configure a DRS rule which makes sure that both nodes do not reside on the same ESX host at the same time.

Step 11: MSSQL FCI Installation

From here you can work on the initial configuration of the Windows OS, and then follow Microsoft’s guidance for installing and configuring a two node Microsoft SQL Server Failover Cluster.

Up Next

Head over to Part 3, where we will build on the same topology via VCF Automation via the IaaS Services Console.


Discover more from VMware Cloud Foundation (VCF) Blog

Subscribe to get the latest posts sent to your email.