Share this post

The FMA architecture introduced in XenApp 7.x changes the concept of database usage. If the SQL Server fails for any reason, users with existing sessions are not impacted, but launching new desktops or applications is not possible because access to the SQL database is required.

Just to recap the IMA and FMA architecture differences in terms of database usage:

  • IMA use the database only to store static configuration data.  Database changes are infrequent, so each change could be replicated out to the LHC (local host cache ) of every server in the site.
  • FMA allows a site to be scaled out by using the database to store both configuration data and dynamic information, such as user sessions and VDA registrations and load.  The frequency of changes is drastically higher, and FMA is fully dependent on database availability.  It is highly recommended to deploy SQL database with any of the supported  high availability features like clustering, mirroring, or another HA technology. For more details see my post XenDesktop 7 Database High-Availability.

In this article I would like to configure XenDesktop 7.7 site to use SQL database configured with AlwaysOn Availability Groups with non-shared storage.

For more information about AlwaysOn Availability Groups feature see Microsoft article: SQL Server AlwaysOn Availability Groups.

Required resources

The following server will be used in our scenario:

  • DB01  – Windows 2012 R2 server installed with SQL Server 2014 Enterprise edition
  • DB02 – Windows 2012 R2 server installed with SQL Server 2014 Enterprise edition
  • XD02 – Windows 2012 R2 server installed with XenDesktop 7.7 components: Studio, Delivery Controller, StoreFront

Assumptions

  • Active Directory is installed and configured
  • All servers listed above are members of the same Active Directory domain
  • Windows Server Failover Cluster is installed and configured
  • Both database server hosts are members of Windows Server Failover Cluster
  • SQL Server 2014 is installed and configured on both database servers
  • SQL Server networking is configured to use the same port. In my case I will use standard port 1433 but any other port can be used.
  • AlwaysOn Feature is enabled on both SQL servers

Configuration procedure

Prepare SQL databases

1. Login to DB01 and open Microsoft SQL Server Management Studio

2. Create 3 empty databases for SiteConfig, Monitoring and Configuration Loggining information. Databases can be created manually or using scripts available on download page. When manuall procedure is used remember to change collation settings to Latin1_General_100_CI_AS_KS

3. Create a backup for all databases created in step 2.

Configure new Availability Group

4. In Microsoft SQL Server Management Studio right click AlwaysON High Availability node and Start New Availability Group Wizard.

AAG-1

5. Enter the name for new group name. Press Next to continue.

AAG-2

6. Select all 3 databases created in the step 2. Press Next to continue.

AAG-3

7. Select Automatic Failover and change Readable Seconday to Yes. Click Add Replica button.

AAG-4

8. Login to the second SQL server

AAG-5

9. For secondary replica select Automatic Failover and change Readable Seconday to Yes. Press Next to continue.

AAG-6

10. Normally listener should be configured  but due to the bug in management studio Add button is not visible. Listen will be created in the next step.  Press Next to continue.

AAG-7

11. Select the network share to store replication data and press Next. The best solution is to please this folder on network storage.

AAG-8

12. Verify validation results and press Next to continue.

AAG-9

13. Press Finish to start installation

AAG-10

14. Close Wizard.

AAG-11

15. Verify the status of availability replicas.

AAG-12

16. Right click on Availability Group Listeners node and select Add Listener

AAG-14

17. Enter listener name, port number configured in step 3.

The listener can use a dynamic IP address that is assigned by a server running the Dynamic Host Configuration Protocol (DHCP). DHCP is limited to a single subnet.

In order to support multi subnet configuration network mode must be changed to Static IP. If you select Static IP a subnet grid appears below the Network Mode field. This grid displays information about each subnet that can be accessed by this availability group listener.

In my configuration SQL servers are located in different subnets

AAG-15

18. Add one static address for each subnet and press OK to continue.

AAG-16

19. Press OK to continue.

AAG-17

20. Verify if listener has been created.

AAG-18

21. Open DNS console and verify if all A records has been created for all configured IP addresses.

AAG-138

Install XenDesktop 7.7

22. Mount XenDesktop 7.7 iso file and start installation. Select XenDesktop Start button.

AAG-19

23. Select Delivery Controler

AAG-20

24. Accept license agreement and press Next to continue.

AAG-21

24. Select required components and press Next to continue.

AAG-22

25. Deselect MS SQL Express installation and press Next to continue.

AAG-23

26. Press Next to continue.

AAG-24

27. Press Install to continue.

AAG-25

28. Press Finish to complete installation.

AAG-26

XenDesktop Site configuration

29. Select Deliver Applications and Desktops option

AAG-27

30. Enter XenDesktop site name and press Next to continue.

AAG-28

31. For each corresponding line enter the name of the database created in the step 2. In the Location fields enter the name of listener created in the step 17. Press Select button to add additional controllers.

AAG-29

32. Press Next to continue.

AAG-30

33. Enter the name of license server and press Next to continue.

AAG-31

34. Configure connection options and press Next to continue.

AAG-32

35. Configure App-V publishing and press Next to continue.

AAG-33

36. Verify the summary information and press Finish to complete the configuration.

AAG-34

37. In the left pane select Configuration node

AAG-35

38. Verify configured database information

AAG-36

39. Open powershell and verify the database connection string.

AAG-37