CVAD PVS DB Migration to a SQL AG

by Ray Davis, CTA

I recently moved a PVS farm that consisted of 4 servers from a Single Database instance to a SQL AG instance. I wasn’t 100% sure how to do this, so I reached John Carmody, aka @c4rm0, who sent me his blog as a reference. In this write-up, you will notice that there are very similar steps at a high level. I wanted to share my experience to confirm that it does work, and I tried to add more details so that my blog and his blog should cover all questions that may arise. Again, I wanted to clarify that this isn’t a copy of his post, but more of a report on my experiences with it and to back up the use case. 😊 The move to a SQL AG is around replicating the DB to a DR area and having the DB up for other DR requests around CVAD setup.

Let’s Start
1. In my situation, I had a Change Control in place, and I knew that I wanted to take an outage to do this. Therefore I am unsure if you can do this while maintaining uptime. Because the 4 PVS servers use the PVS database, it is hard to move the DB to an AG while the connections are ongoing from the PVS servers to the database.

2. Stopping the stream service on the PVS servers during the change achieves the same thing. We don’t want connections to the PVS database while migrating the database.

3. After stopping the services, they used a quick DB script to copy and restore the DB on the AG.

Graphical user interface, text, application

Description automatically generated

4. The process in action:

Graphical user interface, text, application

Description automatically generated

5. Next, we will need to open the PVS configuration Wizard to reconfigure the Database parameters.

Graphical user interface, text, application

Description automatically generated

6. In this screenshot, you will need to update the AG connection and check “Enable MultiSubnetFailover for SQL Server Always On.”

Graphical user interface, application

Description automatically generated

7. The Site Farm name will appear once the connection is established again.

Graphical user interface, text, application

Description automatically generated

8. Select the exiting Site.

9. Select the Existing Default Store.

10. Select the Citrix Licensing Server that you are using. It should auto-fill from what you had before as well.

Graphical user interface, text, application

Description automatically generated

11. Enter your service account information here. SOAP services to keep things going.

Graphical user interface

Description automatically generated

12. I left this the default, as PVS manages my Computer accounts.

13. Select the Streaming Network Interfaces.

Graphical user interface, application

Description automatically generated

14. Select the other Servers for Steaming. Note: you will notice that I have 2 Servers here. Above I said I was moving 4 Servers, and 2 of them aren’t on this list. In my environment, I split the XA and XD into different PVS Servers for the environment Audit Requirement I have. There is just 2 of the servers in this example.

Graphical user interface, text, application

Description automatically generated

15. Option here and check the settings in the Output text. Then start the services.

A picture containing graphical user interface

Description automatically generated
Graphical user interface, text, application

Description automatically generated

16. After this had been completed, and I rebooted my PVS servers. I do this, and you don’t have to.

17. New Location

Graphical user interface, text, application

Description automatically generated

18. You can see my 01 servers are already picking up connections.

Graphical user interface

Description automatically generated

19. Then my 02 server is as well.

Graphical user interface, text, application

Description automatically generated

20. Then, I rebooted one of the PVS targets to ensure it could be steamed and verified registered in Studio.

Text

Description automatically generated

21. The VDA is streaming as it should.

22. On two of my newer servers, I had this in the event logs. I knew what that was because I had dealt with this before. These needed the native SQL tools updated. Once this was done, the Stream process connected just fine.

       a. https://support.citrix.com/article/CTX226526

Graphical user interface

Description automatically generated with medium confidence

23. Error in Event Logs.

24. After installing the Native SQL Tools. The Services was good on 04.

A picture containing table

Description automatically generated


As you can see, this isn’t a complex process, and it is straightforward, and Citrix made this extremely easy, in my opinion. I hope this helps someone out there. 

Thank you.
​​

Leave a Reply