Skip to content

Commit ff5cec4

Browse files
authored
Merge branch 'main' into nl-tag-build-content-batch2
2 parents 394f3d4 + 5d4076e commit ff5cec4

32 files changed

+159
-28
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
author: MashaMSFT
3+
ms.author: mathoma
4+
ms.date: 04/30/2025
5+
ms.service: azure-vm-sql-server
6+
ms.topic: include
7+
---
8+
When using an Azure Load Balancer to support a Virtual Network Name (VNN) resource, you must configure the cluster to reply to the health probe requests. If the health probe fails to get a response from a backend instance, then no new connections are sent to that backend instance until the health probe succeeds again.
9+
10+
To set the probe port parameter in PowerShell, use the following script once per applicable IP address resource:
11+
12+
```powershell
13+
$ClusterNetworkName = "<MyClusterNetworkName>" # The cluster network name. Use Get-ClusterNetwork on Windows Server 2012 or later to find the name.
14+
$IPResourceName = "<IPResourceName>" # The IP address resource name.
15+
[int]$ProbePort = <nnnnn> # The probe port that you configured in the health probe of the load balancer for a given Frontend IP Address. Any unused TCP port is valid.
16+
17+
Import-Module FailoverClusters
18+
19+
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$IPResourceName";"ProbePort"=$ProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0}
20+
```
21+
22+
The changes you make don't take effect until the IP address resource is taken offline and brought online again. Perform a failover of the resource for this change to take effect.
23+
24+
After you set the cluster probe, use the following PowerShell script to check cluster parameters:
25+
26+
```powershell
27+
Get-ClusterResource $IPResourceName | Get-ClusterParameter
28+
```
29+
30+
## Exclude ports from the dynamic port range
31+
32+
When using a health probe port between 49,152 and 65,536 (the [default dynamic port range for TCP/IP](/windows/client-management/troubleshoot-tcpip-port-exhaust#default-dynamic-port-range-for-tcpip)), add an exclusion for each health probe port on every VM.
33+
34+
Configuring port exclusion prevents other system processes from being dynamically assigned the same port on the VM
35+
36+
To set a port exclusion, use the following PowerShell script:
37+
-  for each health probe port
38+
- on every VM
39+
40+
```powershell
41+
[int]$ProbePort = <nnnnn> # The probe port that you configured in the health probe of the load balancer. Any unused TCP port is valid.
42+
43+
netsh int ipv4 add excludedportrange tcp startport=$ProbePort numberofports=1 store=persistent
44+
```
45+
46+
To confirm that exclusions have been configured correctly, use the following command:
47+
48+
```powershell
49+
netsh int ipv4 show excludedportrange tcp
50+
```
51+
52+
53+
54+
55+
56+

azure-sql/virtual-machines/windows/availability-group-az-commandline-configure.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ Although the disk witness is the most resilient quorum option, it requires an Az
193193

194194
If you have an even number of votes in the cluster, configure the [quorum solution](hadr-cluster-quorum-configure-how-to.md) that best suits your business needs. For more information, see [Quorum with SQL Server VMs](hadr-windows-server-failover-cluster-overview.md#quorum).
195195

196-
197196
## Validate cluster
198197

199198
For a failover cluster to be supported by Microsoft, it must pass cluster validation. Connect to the VM using your preferred method, such as [Bastion](/azure/bastion/bastion-connect-vm-rdp-windows), and validate that your cluster passes validation before proceeding further. Failure to do so leaves your cluster in an unsupported state.
@@ -217,8 +216,9 @@ Manually create the availability group as you normally would, by using [SQL Serv
217216

218217
The Always On availability group listener requires an internal instance of Azure Load Balancer. The internal load balancer provides a "floating" IP address for the availability group listener that allows for faster failover and reconnection. If the SQL Server VMs in an availability group are part of the same availability set, you can use a Basic load balancer. Otherwise, you need to use a Standard load balancer.
219218

220-
> [!NOTE]
221-
> The internal load balancer should be in the same virtual network as the SQL Server VM instances.
219+
> [!IMPORTANT]
220+
> - The internal load balancer should be in the same virtual network as the SQL Server VM instances.
221+
> - The public IP resource for each SQL Server VM should have a Standard SKU to be compatible with the Standard load balancer. To determine the SKU of your VM's public IP resource, go to **Resource Group**, select your **Public IP Address** resource for the desired SQL Server VM, and locate the value under **SKU** in the **Overview** pane.
222222
223223
The following code snippet creates the internal load balancer:
224224

@@ -247,8 +247,6 @@ $intLb = New-AzLoadBalancer -name <load balancer name> -ResourceGroupName <resou
247247

248248
---
249249

250-
>[!IMPORTANT]
251-
> The public IP resource for each SQL Server VM should have a Standard SKU to be compatible with the Standard load balancer. To determine the SKU of your VM's public IP resource, go to **Resource Group**, select your **Public IP Address** resource for the desired SQL Server VM, and locate the value under **SKU** in the **Overview** pane.
252250

253251
## Create listener
254252

@@ -337,6 +335,10 @@ New-AzAvailabilityGroupListener -ResourceGroupName <resource group name> `
337335

338336
---
339337

338+
## Configure probe port
339+
340+
[!INCLUDE [virtual-machines-port-exclusion](../../includes/virtual-machines-port-exclusion.md)]
341+
340342
## Modify number of replicas
341343
There's an added layer of complexity when you're deploying an availability group to SQL Server VMs hosted in Azure. The resource provider and the virtual machine group now manage the resources. As such, when you're adding or removing replicas in the availability group, there's an additional step of updating the listener metadata with information about the SQL Server VMs. When you're modifying the number of replicas in the availability group, you must also use the [az sql vm group ag-listener update](/cli/azure/sql/vm/group/ag-listener#az-sql-vm-group-ag-listener-update) command to update the listener with the metadata of the SQL Server VMs.
342344

azure-sql/virtual-machines/windows/availability-group-clusterless-workgroup-configure.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ tags: azure-service-management
1515

1616
This article explains the steps necessary to create an Active Directory domain-independent cluster with an Always On availability group; this is also known as a workgroup cluster. This article focuses on the steps that are relevant to preparing and configuring the workgroup and availability group, and glosses over steps that are covered in other articles, such as how to create the cluster, or deploy the availability group.
1717

18-
1918
## Prerequisites
2019

2120
To configure a workgroup availability group, you need the following:
@@ -35,7 +34,6 @@ For reference, the following parameters are used in this article, but can be mod
3534
| **DNS suffix** | ag.wgcluster.example.com |
3635
| **Work group name** | AGWorkgroup |
3736

38-
3937
## Set a DNS suffix
4038

4139
In this step, configure the DNS suffix for both servers. For example, `ag.wgcluster.example.com`. This allows you to use the name of the object you want to connect to as a fully qualified address within your network, such as `AGNode1.ag.wgcluster.example.com`.
@@ -280,7 +278,7 @@ In this step, configure your availability group, and add your databases to it. D
280278
281279
## Configure a load balancer
282280

283-
In this final step, configure the load balancer using either the [Azure portal](availability-group-load-balancer-portal-configure.md) or [PowerShell](availability-group-listener-powershell-configure.md).
281+
In this final step, configure the load balancer by using either the [Azure portal](availability-group-load-balancer-portal-configure.md) or [PowerShell](availability-group-listener-powershell-configure.md).
284282

285283
However, there may be some [limitations](https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/sql-server-workgroup-cluster-fcm-errors/ba-p/371387) when using the Windows Cluster GUI, and as such, you should use PowerShell to create a client access point or the network name for your listener with the following example script:
286284

@@ -295,9 +293,11 @@ Set-ClusterResourceDependency -Resource TestName -Dependency "[IPAddress1] or [I
295293
Start-ClusterResource -Name TestName -Verbose
296294
```
297295

296+
## Configure probe port
298297

298+
[!INCLUDE [virtual-machines-port-exclusion](../../includes/virtual-machines-port-exclusion.md)]
299299

300-
## Next steps
300+
## Related content
301301

302302
Once the availability group is deployed, consider optimizing the [HADR settings for SQL Server on Azure VMs](hadr-cluster-best-practices.md).
303303

azure-sql/virtual-machines/windows/availability-group-listener-powershell-configure.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If you are restricting access with an Azure Network Security Group, ensure that
5252

5353
## Determine the load balancer SKU required
5454

55-
[Azure load balancer](/azure/load-balancer/load-balancer-overview) is available in two SKUs: Basic & Standard. The standard load balancer is recommended as the Basic SKU is scheduled to be [retired on September 30, 2025](https://azure.microsoft.com/updates/azure-basic-load-balancer-will-be-retired-on-30-september-2025-upgrade-to-standard-load-balancer/). The standard load balancer is required for virtual machines in an availability zone. Standard load balancer requires that all VM IP addresses use standard IP addresses.
55+
[Azure load balancer](/azure/load-balancer/load-balancer-overview) is available in two SKUs: Basic & Standard. The standard load balancer is recommended as the Basic SKU is scheduled to be [retired on September 30, 2025](https://azure.microsoft.com/updates/azure-basic-load-balancer-will-be-retired-on-30-september-2025-upgrade-to-standard-load-balancer/). The standard load balancer is required for virtual machines in an availability zone. Standard load balancer requires that all VM IP addresses use standard IP addresses.
5656

5757
The current [Microsoft template](./availability-group-quickstart-template-configure.md) for an availability group uses a basic load balancer with basic IP addresses.
5858

@@ -127,6 +127,7 @@ foreach($VMName in $VMNames)
127127
}
128128
```
129129

130+
130131
## <a name="Add-IP"></a> Example script: Add an IP address to an existing load balancer with PowerShell
131132

132133
To use more than one availability group, add an additional IP address to the load balancer. Each IP address requires its own load-balancing rule, probe port, and front port.
@@ -255,7 +256,7 @@ Use the following PowerShell cmdlets to create an internal load balancer for Azu
255256
* [New-AzLoadBalancerProbeConfig](/powershell/module/Az.Network/New-AzLoadBalancerProbeConfig) creates a probe configuration for a load balancer.
256257
* [Remove-AzLoadBalancer](/powershell/module/Az.Network/Remove-AzLoadBalancer) removes a load balancer from an Azure resource group.
257258

258-
## Next steps
259+
## Related content
259260

260261

261262
To learn more, see:

azure-sql/virtual-machines/windows/availability-group-quickstart-template-configure.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ To configure the internal load balancer and create the availability group listen
167167
| **Listener** | The DNS name that you want to assign to the listener. By default, this template specifies the name "aglistener," but you can change it. The name should not exceed 15 characters. |
168168
| **Listener Port** | The port that you want the listener to use. Typically, this port should be the default of 1433. This is the port number that the template specifies. But if your default port has been changed, the listener port should use that value instead. |
169169
| **Listener IP** | The IP address that you want the listener to use. This address will be created during template deployment, so provide one that isn't already in use. |
170-
| **Existing Subnet** | The name of the internal subnet of your SQL Server VMs (for example: *default*). You can determine this value by going to **Resource Group**, selecting your virtual network, selecting **Subnets** in the **Settings** pane, and copying the value under **Name**. |
170+
| **Existing Subnet** | The name of the internal subnet of your SQL Server VMs (for example: *default*). You can determine this value by going to **Resource Group**, selecting your virtual network, selecting **Subnets** in the **Settings** pane, and copying the value under **Name**. |
171171
| **Existing Internal Load Balancer** | The name of the internal load balancer that you created in step 3. |
172172
| **Probe Port** | The probe port that you want the internal load balancer to use. The template uses 59999 by default, but you can change this value. |
173173

@@ -178,6 +178,10 @@ To configure the internal load balancer and create the availability group listen
178178
>[!NOTE]
179179
>If your deployment fails halfway through, you'll need to manually [remove the newly created listener](#remove-listener) by using PowerShell before you redeploy the **101-sql-vm-aglistener-setup** quickstart template.
180180
181+
## Configure probe port
182+
183+
[!INCLUDE [virtual-machines-port-exclusion](../../includes/virtual-machines-port-exclusion.md)]
184+
181185
## Remove listener
182186
If you later need to remove the availability group listener that the template configured, you must go through the SQL IaaS Agent extension. Because the listener is registered through the SQL IaaS Agent extension, just deleting it via SQL Server Management Studio is insufficient.
183187

azure-sql/virtual-machines/windows/availability-group-vnn-azure-load-balancer-configure.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn to configure an Azure load balancer to route traffic to the v
44
author: AbdullahMSFT
55
ms.author: amamun
66
ms.reviewer: mathoma
7-
ms.date: 06/18/2024
7+
ms.date: 04/30/2025
88
ms.service: azure-vm-sql-server
99
ms.subservice: hadr
1010
ms.topic: how-to
@@ -207,6 +207,28 @@ Get-ClusterResource $IPResourceName | Get-ClusterParameter
207207
208208
---
209209

210+
## Configure port exclusion
211+
212+
When using a health probe port between 49,152 and 65,536 (the [default dynamic port range for TCP/IP](/windows/client-management/troubleshoot-tcpip-port-exhaust#default-dynamic-port-range-for-tcpip)), add an exclusion for each health probe port on every VM.
213+
214+
Configuring port exclusion prevents other system processes from being dynamically assigned the same port on the VM
215+
216+
To set a port exclusion, use the following PowerShell script:
217+
-  for each health probe port
218+
- on every VM
219+
220+
```powershell
221+
[int]$ProbePort = <nnnnn> # The probe port that you configured in the health probe of the load balancer. Any unused TCP port is valid.
222+
223+
netsh int ipv4 add excludedportrange tcp startport=$ProbePort numberofports=1 store=persistent
224+
```
225+
226+
To confirm that exclusions have been configured correctly, use the following command:
227+
228+
```powershell
229+
netsh int ipv4 show excludedportrange tcp
230+
```
231+
210232
## Modify the connection string
211233

212234
For clients that support it, add `MultiSubnetFailover=True` to the connection string. Although the `MultiSubnetFailover` connection option isn't required, it provides the benefit of a faster subnet failover. This is because the client driver tries to open a TCP socket for each IP address in parallel. The client driver waits for the first IP address to respond with success. After the successful response, the client driver uses that IP address for the connection.

azure-sql/virtual-machines/windows/failover-cluster-instance-vnn-azure-load-balancer-configure.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn to configure an Azure Load Balancer to route traffic to the v
44
author: AbdullahMSFT
55
ms.author: amamun
66
ms.reviewer: mathoma
7-
ms.date: 06/18/2024
7+
ms.date: 04/30/2025
88
ms.service: azure-vm-sql-server
99
ms.subservice: hadr
1010
ms.topic: how-to
@@ -203,6 +203,28 @@ Get-ClusterResource $IPResourceName | Get-ClusterParameter
203203
204204
---
205205

206+
## Configure port exclusion
207+
208+
When using a health probe port between 49,152 and 65,536 (the [default dynamic port range for TCP/IP](/windows/client-management/troubleshoot-tcpip-port-exhaust#default-dynamic-port-range-for-tcpip)), add an exclusion for each health probe port on every VM.
209+
210+
Configuring port exclusion prevents other system processes from being dynamically assigned the same port on the VM
211+
212+
To set a port exclusion, use the following PowerShell script:
213+
-  for each health probe port
214+
- on every VM
215+
216+
```powershell
217+
[int]$ProbePort = <nnnnn> # The probe port that you configured in the health probe of the load balancer. Any unused TCP port is valid.
218+
219+
netsh int ipv4 add excludedportrange tcp startport=$ProbePort numberofports=1 store=persistent
220+
```
221+
222+
To confirm that exclusions have been configured correctly, use the following command:
223+
224+
```powershell
225+
netsh int ipv4 show excludedportrange tcp
226+
```
227+
206228
## Modify the connection string
207229

208230
For clients that support it, add `MultiSubnetFailover=True` to the connection string. Although the `MultiSubnetFailover` connection option isn't required, it provides the benefit of a faster subnet failover. This is because the client driver tries to open a TCP socket for each IP address in parallel. The client driver waits for the first IP address to respond with success. After the successful response, the client driver uses that IP address for the connection.

0 commit comments

Comments
 (0)