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.
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
- 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
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.
5. Enter the name for new group name. Press Next to continue.
6. Select all 3 databases created in the step 2. Press Next to continue.
7. Select Automatic Failover and change Readable Seconday to Yes. Click Add Replica button.
8. Login to the second SQL server
9. For secondary replica select Automatic Failover and change Readable Seconday to Yes. Press Next to continue.
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.
11. Select the network share to store replication data and press Next. The best solution is to please this folder on network storage.
12. Verify validation results and press Next to continue.
13. Press Finish to start installation.
14. Close Wizard.
15. Verify the status of availability replicas.
16. Right click on Availability Group Listeners node and select Add Listener
17. Enter listener name, port number configured in step 3.
18. Add one static address for each subnet and press OK to continue.
19. Press OK to continue.
20. Verify if listener has been created.
21. Open DNS console and verify if all A records has been created for all configured IP addresses.
Install XenDesktop 7.7
22. Mount XenDesktop 7.7 iso file and start installation. Select XenDesktop Start button.
23. Select Delivery Controler
24. Accept license agreement and press Next to continue.
24. Select required components and press Next to continue.
25. Deselect MS SQL Express installation and press Next to continue.
26. Press Next to continue.
27. Press Install to continue.
28. Press Finish to complete installation.
XenDesktop Site configuration
29. Select Deliver Applications and Desktops option
30. Enter XenDesktop site name and press Next to continue.
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.
32. Press Next to continue.
33. Enter the name of license server and press Next to continue.
34. Configure connection options and press Next to continue.
35. Configure App-V publishing and press Next to continue.
36. Verify the summary information and press Finish to complete the configuration.
37. In the left pane select Configuration node
38. Verify configured database information
39. Open powershell and verify the database connection string.