Tuesday 27 October 2015

Upgrading VirtualCenter 2.5 on Server 2008

I know its all old tech (Windows Server 2008 and VirtualCenter 2.5) but we have an old ESX 3.5 server that a dev of ours uses and it was licensed by a .lic file hosted on a 2003 server.

Now as we all know 2003 was dropped a few months back so when I found this little f*cker I decided to upgrade it to 2008 (its 32-bit so that's as far as I can go with it). Once the server was upgraded and 2008 was working was when the troubles really started...The key thing here would of been to upgrade VMware BEFORE I updated to 2008 but (my mistake entirely) I thought maybe someone would of updated this to the latest version 2 years ago when it was last in use and VMware released the updates but there you go...

First off the license server wouldn't start as it said it couldn't read the license files. This is an known issue with VMware license server and WS 2008. To get the license server working you need to download the VirtualCenter 2.5 Update6c zip and run bin\VMware-licenseserver.exe file in compatibility mode. If you don't then you will get an authorization error saying you don't have permission and you'll be stuck on an older version. Easy enough...

The slightly more difficult job was upgrading VirtualCenter 2.5 to U6 and then to U6c. If you run the msi normally (VMware VirtualCenter Server.msi) it will fail saying its already installed and not offer to upgrade you. If you run the VMware-vcserver.exe it will pop up with an error saying you need to be running Windows 2000, XP or Windows 2003 to install this product. Since those days are long gone as you're on 2008+ you need to edit the VMware VirtualCenter Server.msi file (the .exe refers and runs it) and tell it to ignore the upper limit of the OS version. Using Microsofts Orca editor you can open the .msi and find the section that mentions LaunchCondition. Edit the line "VersionNT>=500 And VersionNT<600" and remove the "And VersionNT<600" so that it won't bother checking if you are running 2003+. Now just allow compatibility mode for the .exes you want to run and they will actually run and allow you to upgrade!

Occasionally the upgrade will tell you that files are in use and list the PID number of the application (sometimes just the PID number) so have cmd prompt running as admin handy and run taskkill /F /PID <PID number> to kill them all off and let you continue.

I had an issue after it all ran as my SQL DB (VIM_VCDB) was full so the DB upgrade script failed. I cleared the SQL logs and then re-ran the database upgrade (to rerun go to C:\Program Files\VMware\Infrastructure\VirtualCenter Server\dbupgrade and run VCDatabaseUpgrade.exe)

I thought I was in the clear but the VMware Infrastructure Server service still wouldn't start. When I tried to run vpxd.exe via cmd prompt I saw the following error:

[VpxdVdb] Database version value 'VirtualCenter Database 2.5u2' is incompatible with this release of VirtualCenter.

Now even though the DBupgrade said it was successful it did not mark the DB as upgraded so my DB still throught it was running 2.5 Update 2 and not the upgraded 2.5 Update 6. Odd and I thought I could just edit the table in SQL that contains this info but I thought it may be best to go down the proper route. I ran the dbupgrade again but via cmd prompt and using an extra switch

VCDatabaseUpgrade.exe DSN="VMware VirtualCenter" MINORDBUPGRADE=1

My ODBC System DSN was "VMware VirtualCenter" but yours may be different so check first. Once that ran I restarted SQL and the VMware services and bingo I was in and everything was working fine. I had to run both updates as you can only upgrade to Update 6c from Update 6.




No comments:

Post a Comment