When engineering information systems it is important to take right decisions and be sure they are sustainable for the upcoming years. Two years ago I implemented a full App-V infrastructure model architecture with a central management server and branch office streaming servers.
The system was ready and fully functional for the upcoming Windows 7 migration. During the installation I run into a network issue (RTSP protocol inspection) and decided the install the management server in a branch office location. The server was located in a hosted 3rd party data center with firewall infrastructure in between. A black box for me and no insight to solve the problem I had.
Windows 7 migration finished and the server was in a location with many local dependencies and possible network outages. At this moment we had more then 100 virtual packages stored in the system. I researched configuration settings that were needed if the server was to be moved and come to conclusion that this was hell of job to do it manually.
Another central server was already waiting for the management role but initially the communication did not work. I needed to redirect all App-V clients from one management server to another one. Reallocating server was considered but I wanted to minimize the server footprint and licenses.
The final solution is to let client communicate over RTSPS protocol to the new management server. The database was already in the central site and I installed another management server on the same database. After the installation I had two management servers sharing single database and both of them were able to publish the applications.
My final challenge was to change all hard coded links for the imported applications and redirect them to the new management server.
I logged on the SQL server and researched the App-V database and tables. After hour or two, doing some initial tests I managed to create SQL statements.
App-V SQL database contains 47 tables. In the following tables there is a reference to the content share where OSD and ICON file are stored:
- dbo.APPLICATION_PUBLISH_TOS
- dbo.APPLICATIONS
- dbo.FILE_TYPES
- dbo.SYSTEM_OPTIONS
Before continuing and implementing these scripts please make sure you are testing this in your own lab/test environment. I have done that running the SQL statements on my LAB App-V server and verified it was successfully working. Make sure to review client and server event logs, App-V logs and functionality of App-V packages.
How to change App-V OSD and ICON location in the database?
The following SQL statements will replace the OSD and icon file references from the first server to the second one.
My old App-V management server is named app-v-001.networknet.local with content share. I wanted to migrate to app-v-002.networknet.local server with same content share name.
Make sure Application Virtualization Management Server (AppVirtServer) service is stopped on both management servers. I logged on my SQL server and with SQL Server Management Studio I run the SQL.
/* List of all imported OSD files dbo.APPLICATIONS */
select * from dbo.APPLICATIONS UPDATE dbo.APPLICATIONS SET osd_file=REPLACE(osd_file,'\\app-v-001.networknet.local\content\','\\app-v-002.networknet.local\content\'); UPDATE dbo.APPLICATIONS SET icon_file=REPLACE(icon_file,'\\app-v-001.networknet.local\content\','\\app-v-002.networknet.local\content\'); select name, osd_file, icon_file from dbo.APPLICATIONS
/* List of all published shortcuts dbo.APPLICATION_PUBLISH_TOS*/
select * from dbo.APPLICATION_PUBLISH_TOS UPDATE dbo.APPLICATION_PUBLISH_TOS SET icon_file=REPLACE(icon_file,'\\app-v-001.networknet.local\content\','\\app-v-002.networknet.local\content\'); select b.name, a.icon_file from APPLICATION_PUBLISH_TOS as A inner join APPLICATIONS as b on a.app_id = b.app_id
/*List of file types and icon dbo.FILE_TYPES*/
select * from dbo.FILE_TYPES UPDATE dbo.FILE_TYPES SET icon_file=REPLACE(icon_file,'\\app-v-001.networknet.local\content\','\\app-v-002.networknet.local\content\'); select icon_file from dbo.FILE_TYPES
/*List of system options on dbo.SYSTEM_OPTIONS*/
select * from dbo.SYSTEM_OPTIONS UPDATE dbo.SYSTEM_OPTIONS SET default_content_path=REPLACE(default_content_path,'\\app-v-001.networknet.local\content\','\\app-v-002.networknet.local\content\'); select default_content_path from dbo.SYSTEM_OPTIONS
I started both AppVirtServer services and changed the GPO responsible assigning the App-V management server. After GPO was refreshed and App-V client restarted due a reboot all redirection worked fine to the new management server and content share. I closely monitored the “C:\Program Files (x86)\Microsoft System Center App Virt Management Server\App Virt Management Server\logs\sft-server.log” log file on the first management server to make sure no App-V clients were talking to this server.
References
Leave a comment