Skip to content

Commit ce22fc1

Browse files
authored
Merge pull request #50587 from MikeRayMSFT/20180830-UpdateTutorial
Update the load balancer tutorial to clarify WSFC IP address settings.
2 parents 59ed94c + 41b896c commit ce22fc1

File tree

2 files changed

+50
-41
lines changed

2 files changed

+50
-41
lines changed

articles/virtual-machines/windows/sql/virtual-machines-windows-portal-sql-availability-group-tutorial.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following table lists the prerequisites that you need to complete before sta
4242
|![Square](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/square.png)| Windows Server | File share for cluster witness |
4343
|![Square](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/square.png)|SQL Server service account | Domain account |
4444
|![Square](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/square.png)|SQL Server Agent service account | Domain account |
45-
|![Square](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/square.png)|Firewall ports open | - SQL Server: **1433** for default instance <br/> - Database mirroring endpoint: **5022** or any available port <br/> - Azure load balancer probe: **59999** or any available port |
45+
|![Square](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/square.png)|Firewall ports open | - SQL Server: **1433** for default instance <br/> - Database mirroring endpoint: **5022** or any available port <br/> - Availability group load balancer IP address health probe: **59999** or any available port <br/> - Cluster core load balancer IP address health probe: **58888** or any available port |
4646
|![Square](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/square.png)|Add Failover Clustering Feature | Both SQL Servers require this feature |
4747
|![Square](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/square.png)|Installation domain account | - Local administrator on each SQL Server <br/> - Member of SQL Server sysadmin fixed server role for each instance of SQL Server |
4848

@@ -75,7 +75,7 @@ After the prerequisites are completed, the first step is to create a Windows Ser
7575
| Access Point for Administering the Cluster |Type a cluster name, for example **SQLAGCluster1** in **Cluster Name**.|
7676
| Confirmation |Use defaults unless you are using Storage Spaces. See the note following this table. |
7777

78-
### Set the cluster IP address
78+
### Set the Windows server failover cluster IP address
7979

8080
1. In **Failover Cluster Manager**, scroll down to **Cluster Core Resources** and expand the cluster details. You should see both the **Name** and the **IP Address** resources in the **Failed** state. The IP address resource cannot be brought online because the cluster is assigned the same IP address as the machine itself, therefore it is a duplicate address.
8181

@@ -340,13 +340,15 @@ At this point, you have an Availability Group with replicas on two instances of
340340

341341
On Azure virtual machines, a SQL Server Availability Group requires a load balancer. The load balancer holds the IP addresses for the Availability Group listeners and the Windows Server Failover Cluster. This section summarizes how to create the load balancer in the Azure portal.
342342

343+
An Azure Load Balancer can be either a Standard Load Balancer or a Basic Load Balancer. Standard Load Balancer has more features than the Basic Load Balancer. For an availability group, the Standard Load Balancer is required if you use an Availability Zone (instead of an Availability Set). For details on the difference between the load balancer types, see [Load Balancer SKU comparison](../../../load-balancer/load-balancer-overview.md#skus).
344+
343345
1. In the Azure portal, go to the resource group where your SQL Servers are and click **+ Add**.
344-
2. Search for **Load Balancer**. Choose the load balancer published by Microsoft.
346+
1. Search for **Load Balancer**. Choose the load balancer published by Microsoft.
345347

346348
![AG in Failover Cluster Manager](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/82-azureloadbalancer.png)
347349

348-
1. Click **Create**.
349-
3. Configure the following parameters for the load balancer.
350+
1. Click **Create**.
351+
1. Configure the following parameters for the load balancer.
350352

351353
| Setting | Field |
352354
| --- | --- |
@@ -355,7 +357,7 @@ On Azure virtual machines, a SQL Server Availability Group requires a load balan
355357
| **Virtual network** |Use the name of the Azure virtual network. |
356358
| **Subnet** |Use the name of the subnet that the virtual machine is in. |
357359
| **IP address assignment** |Static |
358-
| **IP address** |Use an available address from subnet. Note that this is different from your cluster IP address |
360+
| **IP address** |Use an available address from subnet. Use this address for your availability group listener. Note that this is different from your cluster IP address. |
359361
| **Subscription** |Use the same subscription as the virtual machine. |
360362
| **Location** |Use the same location as the virtual machine. |
361363

@@ -373,7 +375,9 @@ To configure the load balancer, you need to create a backend pool, a probe, and
373375

374376
![Find Load Balancer in Resource Group](./media/virtual-machines-windows-portal-sql-availability-group-tutorial/86-findloadbalancer.png)
375377

376-
1. Click the load balancer, click **Backend pools**, and click **+Add**.
378+
1. Click the load balancer, click **Backend pools**, and click **+Add**.
379+
380+
1. Type a name for the backend pool.
377381

378382
1. Associate the backend pool with the availability set that contains the VMs.
379383

@@ -388,7 +392,7 @@ To configure the load balancer, you need to create a backend pool, a probe, and
388392

389393
1. Click the load balancer, click **Health probes**, and click **+Add**.
390394

391-
1. Set the health probe as follows:
395+
1. Set the listener health probe as follows:
392396

393397
| Setting | Description | Example
394398
| --- | --- |---
@@ -404,14 +408,14 @@ To configure the load balancer, you need to create a backend pool, a probe, and
404408

405409
1. Click the load balancer, click **Load balancing rules**, and click **+Add**.
406410

407-
1. Set the load balancing rules as follows.
411+
1. Set the listener load balancing rules as follows.
408412
| Setting | Description | Example
409413
| --- | --- |---
410414
| **Name** | Text | SQLAlwaysOnEndPointListener |
411415
| **Frontend IP address** | Choose an address |Use the address that you created when you created the load balancer. |
412416
| **Protocol** | Choose TCP |TCP |
413-
| **Port** | Use the port for the availability group listener | 1435 |
414-
| **Backend Port** | This field is not used when Floating IP is set for direct server return | 1435 |
417+
| **Port** | Use the port for the availability group listener | 1433 |
418+
| **Backend Port** | This field is not used when Floating IP is set for direct server return | 1433 |
415419
| **Probe** |The name you specified for the probe | SQLAlwaysOnEndPointProbe |
416420
| **Session Persistence** | Drop down list | **None** |
417421
| **Idle Timeout** | Minutes to keep a TCP connection open | 4 |
@@ -420,17 +424,17 @@ To configure the load balancer, you need to create a backend pool, a probe, and
420424
> [!WARNING]
421425
> Direct server return is set during creation. It cannot be changed.
422426
423-
1. Click **OK** to set the load balancing rules.
427+
1. Click **OK** to set the listener load balancing rules.
424428

425-
### Add the front end IP address for the WSFC
429+
### Add the cluster core IP address for the Windows Server Failover Cluster (WSFC)
426430

427431
The WSFC IP address also needs to be on the load balancer.
428432

429-
1. In the portal, add a new Frontend IP configuration for the WSFC. Use the IP Address you configured for the WSFC in the cluster core resources. Set the IP address as static.
433+
1. In the portal, on the same Azure load balancer, click **Frontend IP configuration** and click **+Add**. Use the IP Address you configured for the WSFC in the cluster core resources. Set the IP address as static.
430434

431-
1. Click the load balancer, click **Health probes**, and click **+Add**.
435+
1. On the load balancer, click **Health probes**, and click **+Add**.
432436

433-
1. Set the health probe as follows:
437+
1. Set the WSFC cluster core IP address health probe as follows:
434438

435439
| Setting | Description | Example
436440
| --- | --- |---
@@ -444,13 +448,13 @@ The WSFC IP address also needs to be on the load balancer.
444448

445449
1. Set the load balancing rules. Click **Load balancing rules**, and click **+Add**.
446450

447-
1. Set the load balancing rules as follows.
451+
1. Set the cluster core IP address load balancing rules as follows.
448452
| Setting | Description | Example
449453
| --- | --- |---
450-
| **Name** | Text | WSFCEndPointListener |
451-
| **Frontend IP address** | Choose an address |Use the address that you created when you configured the WSFC IP address. |
454+
| **Name** | Text | WSFCEndPoint |
455+
| **Frontend IP address** | Choose an address |Use the address that you created when you configured the WSFC IP address. This is different from the listener IP address |
452456
| **Protocol** | Choose TCP |TCP |
453-
| **Port** | Use the port for the availability group listener | 58888 |
457+
| **Port** | Use the port for the cluster IP address. This is an available port that is not used for the listener probe port. | 58888 |
454458
| **Backend Port** | This field is not used when Floating IP is set for direct server return | 58888 |
455459
| **Probe** |The name you specified for the probe | WSFCEndPointProbe |
456460
| **Session Persistence** | Drop down list | **None** |
@@ -483,7 +487,7 @@ In SQL Server Management Studio, set the listener port.
483487

484488
1. You should now see the listener name that you created in Failover Cluster Manager. Right-click the listener name and click **Properties**.
485489

486-
1. In the **Port** box, specify the port number for the Availability Group listener by using the $EndpointPort you used earlier (1433 was the default), then click **OK**.
490+
1. In the **Port** box, specify the port number for the Availability Group listener. 1433 is the default, then click **OK**.
487491

488492
You now have a SQL Server Availability Group in Azure virtual machines running in Resource Manager mode.
489493

includes/virtual-machines-ag-listener-configure.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The availability group listener is an IP address and network name that the SQL S
1010

1111
![Cluster Network Name](./media/virtual-machines-ag-listener-configure/90-clusternetworkname.png)
1212

13-
2. <a name="addcap"></a>Add the client access point.
13+
1. <a name="addcap"></a>Add the client access point.
1414
The client access point is the network name that applications use to connect to the databases in an availability group. Create the client access point in Failover Cluster Manager.
1515

1616
a. Expand the cluster name, and then click **Roles**.
@@ -24,7 +24,9 @@ The availability group listener is an IP address and network name that the SQL S
2424

2525
d. To finish creating the listener, click **Next** twice, and then click **Finish**. Do not bring the listener or resource online at this point.
2626

27-
3. <a name="congroup"></a>Configure the IP resource for the availability group.
27+
1. Take the availability group cluster role offline. In **Failover Cluster Manager** under **Roles**, right-click the role, and select **Stop Role**.
28+
29+
1. <a name="congroup"></a>Configure the IP resource for the availability group.
2830

2931
a. Click the **Resources** tab, and then expand the client access point you created.
3032
The client access point is offline.
@@ -41,7 +43,7 @@ The availability group listener is an IP address and network name that the SQL S
4143
1. Disable NetBIOS for this address and click **OK**. Repeat this step for each IP resource if your solution spans multiple Azure VNets.
4244
------------------------->
4345

44-
4. <a name = "dependencyGroup"></a>Make the SQL Server availability group resource dependent on the client access point.
46+
1. <a name = "dependencyGroup"></a>Make the SQL Server availability group resource dependent on the client access point.
4547

4648
a. In Failover Cluster Manager, click **Roles**, and then click your availability group.
4749

@@ -53,7 +55,7 @@ The availability group listener is an IP address and network name that the SQL S
5355

5456
d. Click **OK**.
5557

56-
5. <a name="listname"></a>Make the client access point resource dependent on the IP address.
58+
1. <a name="listname"></a>Make the client access point resource dependent on the IP address.
5759

5860
a. In Failover Cluster Manager, click **Roles**, and then click your availability group.
5961

@@ -65,34 +67,37 @@ The availability group listener is an IP address and network name that the SQL S
6567

6668
![IP Resource](./media/virtual-machines-ag-listener-configure/98-propertiesdependencies.png)
6769

68-
d. Right-click the listener name, and then click **Bring Online**.
69-
7070
>[!TIP]
7171
>You can validate that the dependencies are correctly configured. In Failover Cluster Manager, go to Roles, right-click the availability group, click **More Actions**, and then click **Show Dependency Report**. When the dependencies are correctly configured, the availability group is dependent on the network name, and the network name is dependent on the IP address.
7272
7373

74-
6. <a name="setparam"></a>Set the cluster parameters in PowerShell.
74+
1. <a name="setparam"></a>Set the cluster parameters in PowerShell.
7575

7676
a. Copy the following PowerShell script to one of your SQL Server instances. Update the variables for your environment.
7777

78-
- `$ILBIP` is the IP address that you created on the Azure load balancer for the availability group listener.
78+
- `$ListenerILBIP` is the IP address that you created on the Azure load balancer for the availability group listener.
7979

80-
- `$ProbePort` is the port you configured on the Azure load balancer for the availability group listener.
80+
- `$ListenerProbePort` is the port you configured on the Azure load balancer for the availability group listener.
8181

8282
```PowerShell
8383
$ClusterNetworkName = "<MyClusterNetworkName>" # the cluster network name (Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)
8484
$IPResourceName = "<IPResourceName>" # the IP Address resource name
85-
$ILBIP = "<n.n.n.n>" # the IP Address of the Internal Load Balancer (ILB). This is the static IP address for the load balancer you configured in the Azure portal.
86-
[int]$ProbePort = <nnnnn>
85+
$ListenerILBIP = "<n.n.n.n>" # the IP Address of the Internal Load Balancer (ILB). This is the static IP address for the load balancer you configured in the Azure portal.
86+
[int]$ListenerProbePort = <nnnnn>
8787
8888
Import-Module FailoverClusters
8989
90-
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$ILBIP";"ProbePort"=$ProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0}
90+
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$ListenerILBIP";"ProbePort"=$ListenerProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0}
9191
```
9292

9393
b. Set the cluster parameters by running the PowerShell script on one of the cluster nodes.
9494

95-
Repeat the steps above to set the cluster parameters for the WSFC cluster IP address.
95+
> [!NOTE]
96+
> If your SQL Server instances are in separate regions, you need to run the PowerShell script twice. The first time, use the `$ListenerILBIP` and `$ListenerProbePort` from the first region. The second time, use the `$ListenerILBIP` and `$ListenerProbePort` from the second region. The cluster network name and the cluster IP resource name are also different for each region.
97+
98+
1. Bring the availability group cluster role online. In **Failover Cluster Manager** under **Roles**, right click the role, and select **Start Role**.
99+
100+
If necessary, repeat the steps above to set the cluster parameters for the WSFC cluster IP address.
96101

97102
1. Get the IP address name of the WSFC Cluster IP address. In **Failover Cluster Manager** under **Cluster Core Resources**, locate **Server Name**.
98103

@@ -104,22 +109,22 @@ Repeat the steps above to set the cluster parameters for the WSFC cluster IP add
104109

105110
a. Copy the following PowerShell script to one of your SQL Server instances. Update the variables for your environment.
106111

107-
- `$ILBIP` is the IP address that you created on the Azure load balancer for the WSFC core cluster resource. It is different from the IP address for the availability group listener.
112+
- `$ClusterCoreIP` is the IP address that you created on the Azure load balancer for the WSFC core cluster resource. It is different from the IP address for the availability group listener.
108113

109-
- `$ProbePort` is the port you configured on the Azure load balancer for the WSFC health probe. It is different from the probe for the availability group listener.
114+
- `$ClusterProbePort` is the port you configured on the Azure load balancer for the WSFC health probe. It is different from the probe for the availability group listener.
110115

111116
```PowerShell
112117
$ClusterNetworkName = "<MyClusterNetworkName>" # the cluster network name (Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)
113118
$IPResourceName = "<ClusterIPResourceName>" # the IP Address resource name
114-
$ILBIP = "<n.n.n.n>" # the IP Address of the Cluster IP resource. This is the static IP address for the load balancer you configured in the Azure portal.
115-
[int]$ProbePort = <nnnnn> # The probe port from the WSFCEndPointprobe in the Azure portal. This port must be different from the probe port for the availability grouop listener probe port.
119+
$ClusterCoreIP = "<n.n.n.n>" # the IP Address of the Cluster IP resource. This is the static IP address for the load balancer you configured in the Azure portal.
120+
[int]$ClusterProbePort = <nnnnn> # The probe port from the WSFCEndPointprobe in the Azure portal. This port must be different from the probe port for the availability grouop listener probe port.
116121
117122
Import-Module FailoverClusters
118123
119-
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$ILBIP";"ProbePort"=$ProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0}
124+
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$ClusterCoreIP";"ProbePort"=$ClusterProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0}
120125
```
121126

122127
b. Set the cluster parameters by running the PowerShell script on one of the cluster nodes.
123128

124-
> [!NOTE]
125-
> If your SQL Server instances are in separate regions, you need to run the PowerShell script twice. The first time, use the `$ILBIP` and `$ProbePort` from the first region. The second time, use the `$ILBIP` and `$ProbePort` from the second region. The cluster network name and the cluster IP resource name are the same.
129+
>[!WARNING]
130+
>The availability group listener health probe port has to be different from the cluster core IP address health probe port. In these examples, the listener port is 59999 and the cluster core IP address is 58888. Both ports require an allow inbound firewall rule.

0 commit comments

Comments
 (0)