Friday, November 26, 2021

CVAD PVS DB migration to a SQL AG

 I recently had to move a PVS farm that consisted of  4 servers from a Single Database instance to a SQL AG instance. I wasn’t 100% how to do this, so I reached John Carmody, aka @c4rm0. He 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 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 but more of 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.


  1. Stopping the Stream service on the PVS servers during the change achieve the same thing we don’t want connections to the PVS database while migrating the database


Graphical user interface, diagram

Description automatically generated


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


Graphical user interface, text, application

Description automatically generated

  1. The process in action

Graphical user interface, text, application

Description automatically generated


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




Graphical user interface, text, application

Description automatically generated

  1. 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


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

Graphical user interface, text, application

Description automatically generated

  1. Select the exiting Site


  1. Select the Existing Default Store


  1. 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

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

Graphical user interface

Description automatically generated

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


  1. Select the Streaming Network Interfaces.

Graphical user interface, application

Description automatically generated



  1. 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 server in this example.


Graphical user interface, text, application

Description automatically generated

  1. 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


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


  1. New Location

Graphical user interface, text, application

Description automatically generated



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

Graphical user interface

Description automatically generated


  1. Then my 02 server is as well.

Graphical user interface, text, application

Description automatically generated



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

Text

Description automatically generated


  1. The VDA is steaming as it should.



  1. On 2 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.

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

Graphical user interface

Description automatically generated with medium confidence

  1. Error in Event Logs

  1. 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.


No comments:

Post a Comment