Release date: May 25th 2019
Welcome to my VMware Horizon series. In this session I will describe how I moved the Horizon Composer database to my AlwaysON SQL Cluster. I wont backup the old database and move it to the new SQL Cluster, as this is a lab-setup. Instead I will setup a new database and reinstall Horizon Composer
This exercise will involve the following tasks:
- Disable provisioning in Horizon Administrator
- Uninstall Vmware Horizon Composer
- Create new Composer database
- Create Login
- Create Availability Group and Listener
- Edit ODBC-settings on composer server
- Install Composer
- Update Composer settings in Horizon Administrator
- Verify functionality and test failover
Disable provisioning in Horizon Administrator
In Horizon Administrator – View Configuration – Servers – vCenter Servers, Disable Provisioning
Uninstall Vmware Horizon Composer
Log into Composer server desktop, uninstall VMware Horizon 7 Composer from the control panel
Create new Composer database
Open SQL Server Management Studio on one of the nodes in SQL cluster, New Database…
Give the database a name, in this case it will be the Composer-database, I’ll call it ComposerDB
Create Login
To setup SQL permissions for the ComposerDB database, right-click Logins – New Login…
Enter a new Login name, ComposerDB-adm, deselect “Enforce password policy” and set ComposerDB as Default database
The Server Role “Public” will be sufficient for my new login
I map my user to my newly created ComposerDB database and give the user db_owner membership for this database.
Create Availability Group and Listener
Before we can create an availability group, taking a backup is a prerequisite.
Default settings will suffice, as the database is empty
Right click Availability Groups, select New Availability Group Wizard
I give the availability group a somewhat meaningful name, Next
Select the ComposerDB database, Next
I add my replica and check “Automatic Failover”, click the Listener tab…
I enter a Listener DNS Name and Port. I click Add to enter a static ip-address. This will automatically be added to DNS, Next
Automatic seeding looks good, Next
Validation looks green, great! Next.
Finish
Nice, successfully created the availability group, Close
I verify that I can make a connection on port 1433 to my new listener FQDN
Edit ODBC-settings on composer server
I choose my DSN, ViewComposer, Configure
I enter my listener-address, Next
Enter SQL user-info, Next
I check and modify the default database setting, Next
Finish
I test the new ODBC settings
Successful change, OK
Reinstall Composer
VMware Horizon 7 Composer installation wizard launches, Next
Accept the terms, Next
Default destination folder is a good a location as any, Next…
I enter the ODBC-settings I defined during the ODBC-config above, Next…
I will use the default SOAP-port, Next…
Install…
When the installer completes, Finish
After the installer finish, I click Yes to restart the server.
Verify Horizon Composer service status after reboot
Update Composer settings in Horizon Administrator
In Horizon Administrator, I verify that the Composer has an error, most likely due to new self signed certificate after I reinstalled the composer. I click my composer-URL
I click “Verify” to check the new untrusted certificate
Click “View Certificate”
I click “Accept”
This generates this benign error, OK
The status now changes to “No problem detected”
The Dashboard is now without Composer-problems
Finally, I re-enable provisioning in Horizon Administrator
Verify functionality and test failover
Prior to testing failover, I make sure to replicate sql user accounts to my secondary sql-server, as described by Microsoft here: How to transfer logins and passwords between instances of SQL Server
In SQL Management Studio, I verify that my new database is synchronized.
To test failover for my ComposerDB, I click “Failover” on my Sql-ag-compdb Availability Group
The Failover wizard starts, Next. Select new primary, Next
Finish
Everything looks successful and green, Close
The availability group is now Primary
I re-test the connection to make sure I have database connectivity after failing over, all good!
Next I log in to my composer server, restarts Composer service and checks Event logs.
VMware Horizon planning, deployment etc.
Disclaimer: Every tips/tricks/posting I have published here, is tried and tested in different it-solutions. It is not guaranteed to work everywhere, but is meant as a tip for other users out there. Remember, Google is your friend and don’t be afraid to steal with pride! Feel free to comment below as needed.