In this blog post I want to describe how to upgrade your existing App-V 5.0 Server Infrastructure to 5.1. Microsoft recently released a blog post called A simplified Microsoft App-V 5.1 Management Server upgrade procedure. I decided to write this blog post because there are a few gotchas during the upgrade, which aren’t described (yet) in the Microsoft Blog Post About Upgrade your App-V Management Server.
Below you find the Layout of my current App-V Infrastructure in my lab environment.
SRV003
Contains the App-V Management- and Publishing-Server in Version 5.0 SP1 HF4
PC001
Windows 10 x64 with an App-V 5.1 Client. I also want to point out here that an App-V 5.1 Client on a Windows 10 Device will not get any virtual applications from a 5.0 Server. I wrote about this problem in the following blog post: App-V 5.1 – Publishing Error on Windows 10 Devices
DB001
SQL Server 2014 SP1 which contains the “AppVManagement” Database. Just a little note here that the above SQL configuration is technically not supported because of SQL Server 2014 in Combination with an App-V 5.0 Server. Nevertheless, as stated, this is a lab environment and after the Upgrade to App-V 5.1, SQL 2014 will be a supported configuration.
I also want to state at the beginning that this blog post is provided “AS IS” with no warranties. I did the upgrade in this way and it worked for me. If you have additional notes, feel free to contact me and I will update the blog post.
1. Backup your current configuration
Every upgrade / update should start with a backup of your existing configuration. In case of an upgrade failure you can easily go back to the state before the upgrade. The following steps should be completed before you continue to the next step:
- Create a Snapshot of your App-V 5.0 Server
- Create a Backup of your “AppVManagement” Database.
2. Validate the functionality
If your App-V 5.0 Server doesn’t run smoothly before the Upgrade, the Upgrade won’t fix anything for you. So you should do some checks before the upgrade and validate the functionality.
1. Check Last Publishing Attempt
Open the Management Server Web Console in Internet Explorer and navigate to “Servers”. Check if the “Last Publishing Attempt” is current:
2. Check Publishing Service
Login with a user that has some applications published and access the Publishing URL in Internet Explorer. Unpublish an Application and check that the Application is no longer listed in the XML Tree.
3. Check Published Applications
Check if the published applications are present on the system and that they can get started without any issues.
3. Management server database prerequisite software
Install the following components on your management database server, as listed in the above linked TechNet Documentation:
- .NET Framework 4.5.2 – Please go for .NET Framework 4.5.2, .NET Framework 4.5.1 will no longer be supported from January 2016
- Visual C++ Redistributable Packages for Visual Studio 2013 – Make sure to install the x86 and x64 Version
- All other prerequisites should already be installed due to the App-V 5.0 Installation
Upgrading the Management Database Server
Note: We are using the Database Scripts instead of the Installer. The Scripts are also necessary if you run the Management Database on a SQL Cluster.
1. Copy the App-V 5.1 Server Setup EXE to your database server and run the following command in an elevated prompt:
appv_server_setup.exe /layout /layoutdir=c:\temp\Layout
2. Go to the Folder “DatabaseScripts\ManagementDatabase” in the exported Layout Directory and check if the Scripts are present as below. For the upgrade we will only need CreateTables.sql, CreateStoredProcs.sql and UpdateTables.sql
3. Open CreateTables.sql in SQL Server Management Studio and execute it against the “AppVManagement” Database:
4. Open CreateStoredProcs.sql in SQL Server Management Studio and execute it against the “AppVManagement” Database:
5. Open UpdateTables.sql in SQL Server Management Studio and execute it against the “AppVManagement” Database:
6. Now we have our first little gotcha. According to the Microsoft Blog Post, the table “SchemaVersion” should contain the Value “2” by now. But that is not really the case, and if you examine the UpdateTables.sql log, you will also find out why. As you see below the Value “2” will be inserted when the Version is less than 2. But the SchemaVersion Table was just created via the CreateTables.sql Scripts and doesn’t contain any value yet. So that Script will actually never set the Value to “2”.
Now we have to do the magic on our own and simply run the above marked Query (red) in SQL Server Management Studio:
INSERT INTO dbo.SchemaVersion VALUES(2)
7. Run the following Query in SQL Server Management Studio:
GRANT SELECT ON dbo.SchemaVersion TO PUBLIC
8. Refresh the Tables in SQL Server Management Studio and make sure that the Table “SchemaChanges” no longer exists and that the Table “SchemaVersion” exists with the actual value of “2”
4. Management / Publishing server prerequisite software
Install the following components on your management server, as listed in the above linked TechNet Documentation:
- .NET Framework 4.5.2 – Please go for .NET Framework 4.5.2, .NET Framework 4.5.1 will no longer be supported from January 2016
- Visual C++ Redistributable Packages for Visual Studio 2013 – Make sure to install the x86 and x64 Version
- Windows PowerShell 4.0 – Also here, you should go for the newest version instead of 3.0
- Web Server (IIS) Management Tools: IIS Management Scripts and Tools – This is a new prerequisites of App-V 5.1 Server that you need to Install via Server Manager
- All other prerequisites should already be installed due to the App-V 5.0 Installation
5. Upgrading the Management Server
1. Launch regedit on your Management Server and navigate to the following hive: “HKLM\SOFTWARE\AppV\Server\ManagementService” Backup the following two values, because they will be reseted during the upgrade process:
2. Launch the App-V Server Setup and Click Install:
3. Accept the license terms and Click Next two times:
4. Your installed components should be pre-selected. Click Next:
5. Click Next several times unless you hit the “Ready for Installation” Screen. All options should be greyed out in the previous wizard steps. Click Install:
6. Click “Close”, open regedit and navigate again to the Hive: “HKLM\SOFTWARE\AppV\Server\ManagementService” As you see below, the Server Entries were reseted during setup. Revert them to the noted, orginal value:
7. Reboot the Server
8. Open the Management Server Web Console, which is now based on HTML 5 🙂 . If you get the below error, then you should double-check the SQL Server Name entries in the Registry as described above:
9. If you get the following Screen, then your upgrade went well:
10. Try to access the Publishing Service via Internet Explorer. If you get an error saying “Publishing metadata not ready”, see the following blog post: App-V 5.1 – Publishing metadata not ready
That completes the Upgrade Procedure of an App-V 5.0 Infrastructure to 5.1
Good one. Well explained.
Thank you 🙂
Hi
What about the reporting database?
But thanks for the write up!
Much appreciated
Hi Philipp,
Upgrading the Reporting Database, is pretty straight forward. You find everything in this Microsoft Blog Post: http://blogs.technet.com/b/appv/archive/2015/09/23/a-simplified-microsoft-app-v-5-1-management-server-upgrade-procedure.aspx
Besg Regards,
Simon
Thanks Simon. Good post.
What about the Publishing servers? Not necessary to run any task on these ones? Am I missed something here?
Hi Raf,
The Publishing Server will be updates along with the Management Server. So no further updating needed, besides the Reporting Server.
Great post, especial the part about the SchemaVersion-table. 2 comment:
1) MANAGEMENT_DB_SQL_SERVER gets cleared if MANAGEMENT_DB_SQL_SERVER_NAME is blank, so if you give up the same value for MANAGEMENT_DB_SQL_SERVER_NAME as for MANAGEMENT_DB_SQL_SERVER, it will not get cleared during upgrade.
2) After the upgrade I could not refresh on my clients, I got the error: Failed to pre-load publishing metadata. I solved it by removing the following file on the management server(s): C:\programdata\microsoft\appv\server\Management\PublishingMetadata.xml and restart IIS.
Hi Roy,
Thanks for your comment. I actually mentioned the error at the end of the post, that you described. I wrote a blog post about it a few months ago: http://msitproblog.com/2015/10/14/app-v-5-1-publishing-metadata-not-ready/
Darn missed step10… lessons learned; always read until the last word :).
Hi Simon, an other issue I encountered today, while I wanted to install 5.1 Hotfix2… Old 5.0 hotfixes where still marked in the registry (and displayed in ARP). Therefore the hotfix2 installer failed. Simply removing these hotfixes solved the issue.
Interesting, thanks for sharing.
Again an other find, our reporting server did not get any data after the upgrade. All clients showed the following error: 1300000013. You would say, that’s because of the max version size issue…. but that got fixed with 5.1.
After further investigation we found the installer removed some registry entries on the reporting server too (same issue as the management server, you talked about). If REPORTING_DB_SQL_SERVER_NAME under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Server\ReportingService was blank, the value for REPORTING_DB_SQL_SERVER would get replaced with a dot… making it impossible to connect to the database. After correcting the value for REPORTING_DB_SQL_SERVER, the problem got resolved.
An excellent and well explained post. Thank you creating this article, this has saved myself many hours of troubleshooting the APPV 5.0 Server issue issue for Windows 10 Clients. Thank you!
Thank you for the great feedback!