Create an FCI with Azure Elastic SAN (Preview) - SQL Server on Azure VMs
Applies to: SQL Server on Azure VM
This article explains how to create a failover cluster instance (FCI) by using an Azure Elastic SAN volume with SQL Server on Azure Virtual Machines (VMs).
To learn more, see an overview of FCI with SQL Server on Azure VMs and cluster best practices.
Note
Configuring your failover cluster instance with an Azure Elastic SAN is currently in preview for SQL Server on Azure VMs.
Prerequisites
Before you complete the instructions in this article, you should already have:
- An Azure subscription. Get started with a free Azure account.
- Two or more prepared Azure Windows virtual machines in the same availability zone. Since all VMs part of the FCI have to be in the same availability zone, the VM availability is only 99.9%.
- An account that has permissions to create objects on both Azure virtual machines and in Active Directory.
Tip
Simplify your deployment and eliminate the need for an Azure Load Balancer or distributed network name (DNN) for your failover cluster instance by creating your SQL Server virtual machines (VMs) in multiple subnets within the same Azure virtual network.
Create Azure Elastic SAN
Follow the instructions to Create an Azure Elastic SAN.
Your Elastic SAN should be:
- In the same resource group as your SQL Server on Azure VM.
- Configured for zone redundancy.
- In the same availability zone as the primary SQL Server VM.
Connect Elastic SAN volumes to the VMs
Follow the instructions to Connect Elastic SAN volumes to both SQL Server VMs.
Use Disk Management to format your Elastic SAN volume and bring it online.
Create Windows Failover Cluster
The steps to create your Windows Server Failover Cluster differ between single subnet and multi-subnet environments. To create your cluster, follow the steps in the tutorial for either a multi-subnet scenario or a single subnet scenario. Though these tutorials create an availability group, the steps to create the cluster are the same for a failover cluster instance.
Configure quorum
Since the disk witness is the most resilient quorum option, it's recommended to configure a disk witness as the quorum solution. Cloud witness isn't currently supported with Azure Elastic SAN.
If you have an even number of votes in the cluster, configure the quorum solution that best suits your business needs. For more information, see Quorum with SQL Server VMs.
Validate cluster
Validate the cluster on one of the virtual machines by using the Failover Cluster Manager UI or PowerShell.
Before you validate the cluster, take the Elastic SAN volume offline by following these steps:
Under Server Manager, select Tools, and then select Failover Cluster Manager.
Under the cluster, select Disks under Storage.
Right-click the Elastic SAN disk, and then select Take Offline:
Select Yes on the Offline Cluster Shared Volume dialog box to confirm that you're sure, and want to take the disk offline.
To validate the cluster by using the UI, follow these steps:
- Right-click the cluster in Failover Cluster Manager, select Validate Cluster to open the Validate a Configuration Wizard.
- On the Validate a Configuration Wizard, select Next.
- On the Select Servers or a Cluster page, enter the names of both virtual machines.
- On the Testing options page, select Run all tests (recommended) and then select Next.
- On the Confirmation page, select Next. The Validate a Configuration wizard runs the validation tests.
To validate the cluster by using PowerShell, run the following script from an administrator PowerShell session on one of the virtual machines:
Test-Cluster –Node ("<node1>","<node2>") –Include "Cluster Configuration", "Inventory", "Network", "Storage", "System Configuration"
After your cluster has been validated, use the Disks page for your cluster in Failover Cluster Manager to bring your Elastic SAN volume back online.
Test cluster failover
Test the failover of your cluster. In Failover Cluster Manager, right-click your cluster, select More Actions > Move Core Cluster Resource > Select node, and then select the other node of the cluster. Move the core cluster resource to every node of the cluster, and then move it back to the primary node. Ensure you can successfully move the cluster to each node before installing SQL Server.
Create SQL Server FCI
After you've configured the failover cluster and all cluster components, including storage, you can create the SQL Server FCI.
Create first node in the SQL FCI
To create the first node in the SQL Server FCI, follow these steps:
Connect to the first virtual machine by using Remote Desktop Protocol (RDP) or Bastion.
In Failover Cluster Manager, make sure that all core cluster resources are on the first virtual machine. If necessary, move the disks to that virtual machine.
Locate the installation media. If the virtual machine uses one of the Azure Marketplace images, the media is located at
C:\SQLServer_<version number>_Full
.Select Setup.
In SQL Server Installation Center, select Installation.
Select New SQL Server failover cluster installation. Follow the instructions in the wizard to install the SQL Server FCI.
On the Cluster Disk Selection page, select the Azure Elastic SAN volume.
On the Cluster Network Configuration page, the IP you provide varies depending on if your SQL Server VMs were deployed to a single subnet, or multiple subnets.
- For a single subnet environment, provide the IP address that you plan to add to the Azure Load Balancer
- For a multi-subnet environment, provide the secondary IP address in the subnet of the first SQL Server VM that you previously designated as the IP address of the failover cluster instance network name:
On the Database Engine Configuration page, ensure the database directories are on the Azure Elastic SAN volume.
After you complete the instructions in the wizard, setup installs the SQL Server FCI on the first node.
Add additional nodes the SQL FCI
To add an additional node to the SQL Server FCI, follow these steps:
After FCI installation succeeds on the first node, connect to the second node by using RDP or Bastion.
Open the SQL Server Installation Center, and then select Installation.
Select Add node to a SQL Server failover cluster. Follow the instructions in the wizard to install SQL Server and add the node to the FCI.
For a multi-subnet scenario, in Cluster Network Configuration, enter the secondary IP address in the subnet of the second SQL Server VM subnet that you previously designated as the IP address of the failover cluster instance network name
After selecting Next in Cluster Network Configuration, setup shows a dialog box indicating that SQL Server Setup detected multiple subnets as in the example image. Select Yes to confirm.
After you complete the instructions in the wizard, setup adds the second SQL Server FCI node.
Repeat these steps on any other SQL Server VMs you want to participate in the SQL Server failover cluster instance.
Note
Azure Marketplace gallery images come with SQL Server Management Studio installed. If you didn't use a marketplace image Download SQL Server Management Studio (SSMS).
Register with SQL IaaS Agent extension
To manage your SQL Server VM from the portal, register it with the SQL IaaS Agent extension.
Note
At this time, SQL Server failover cluster instances on Azure virtual machines registered with the SQL IaaS Agent extension only support a limited number of features available through basic registration, and not those that require the agent, such as automated backup, patching, Microsoft Entra authentication and advanced portal management. See the table of benefits to learn more.
Register a SQL Server VM with PowerShell (-LicenseType can be PAYG
or AHUB
):
# Get the existing compute VM
$vm = Get-AzVM -Name <vm_name> -ResourceGroupName <resource_group_name>
# Register SQL VM with SQL IaaS Agent extension
New-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -Location $vm.Location `
-LicenseType <license_type>
Configure connectivity
If you deployed your SQL Server VMs in multiple subnets, skip this step. If you deployed your SQL Server VMs to a single subnet, then you'll need to configure an additional component to route traffic to your FCI. You can configure a virtual network name (VNN) with an Azure Load Balancer, or a distributed network name for a failover cluster instance. Review the differences between the two and then deploy either a distributed network name or a virtual network name and Azure Load Balancer for your failover cluster instance.
Limitations
- Microsoft Distributed Transaction Coordinator (MSDTC) is not supported by SQL Server on Azure VM failover cluster instances deployed to Azure Elastic SAN volumes. Review FCI limitations for more information.
- Microsoft Distributed Transaction Coordinator (MSDTC) is supported on Azure virtual machines starting with Windows Server 2019 and later when deployed to dedicated Clustered Shared Volumes (CSVs) and using a standard load balancer. MSDTC is not supported on Windows Server 2016 and earlier.
Limited extension support
At this time, SQL Server failover cluster instances on Azure virtual machines registered with the SQL IaaS Agent extension only support a limited number of features available through basic registration, and not those that require the agent, such as automated backup, patching, Microsoft Entra authentication and advanced portal management. See the table of benefits to learn more.
If your SQL Server VM has already been registered with the SQL IaaS Agent extension and you've enabled any features that require the agent, you need to delete the extension from the SQL Server VM by deleting the SQL virtual machine resource for the corresponding VMs, and then registering it with the SQL IaaS Agent extension again. When you're deleting the SQL virtual machine resource by using the Azure portal, clear the check box next to the correct virtual machine to avoid deleting the virtual machine.
Next steps
If Azure shared disks are not the appropriate FCI storage solution for you, consider creating your FCI using premium file shares or Storage Spaces Direct instead.
To learn more, see: