VMware Cloud Community
wallstru
Contributor
Contributor

successful upgrade instructions for vCenter 4.1 to vCenter 5.0 using sql express

i hope this helps anyone needing to do the same upgrade i just completed - i saw quite a few people posting questions about it, and not a lot of solid answers (and *definitely* not simple processes in the answers!).  i just completed an upgrade from vCenter 4.1 using sql express 2005 to vCenter 5.0 using sql 2008 r2 express and think this is the most simple solution out there.  i take no responsibility for any problems you may run into while using these instructions, but here are the steps i followed:

1.  took a snapshot of my vCenter server (yes, it is running as a virtual machine, and i wanted to be able to roll it back if the upgrade failed)

2.  took backup of sql 2005 express db using the commandline:

     - stop the VMware VirtualCenter Server service in the service control panel

     - open a command prompt (with elevated permissions if on server 2008 or 2008 r2)

     - run this command:

          sqlcmd -S localhost\SQLEXP_VIM -E

     - then run this command:

          BACKUP DATABASE VIM_VCDB TO DISK = "C:\Temp\VIM.bak" WITH NOFORMAT, INIT, NAME = "VCENTER", SKIP,NOREWIND, NOUNLOAD, STATS = 10

     - then run this command:

          GO

     - then run this command:

          EXIT

     - verify that the backup was saved in c:\temp

     - **NOTE** i think there was a separate database for vSphere update manager, but i didn't back that up because i didn't care about preserving it

3.  uninstall vSphere and any other other VMWare software related to it

4.  uninstall any SQL software on the machine

5.  install sql 2008 r2 express 64bit with the management tools (you will need sql server management studio)

     - i installed it in mixed mode to keep my options open

     - name the instance SQLEXP_VIM

     - set a strong sa password

     - after the installation is complete, open sql server management studio and connect to your newly created instance on the local machine (the connection string i had to use was localhost\SQLEXP_VIM

     - In sql server mgmt studio, right-click the databases folder and create a new database called VIM_VCDB (i didn't change any options when i created it)

     - using the steps in the vsphere upgrade guide on page 44-45, restore the backup database, overwriting the new database you just created:

          ~ Right-click icon for the database just created (VIM_VCDB) and select Task > Restore > Database

          ~ Select From Device and click Browse

          ~ Click Add, navigate to the backup file created in step 2 above, and click OK

          ~ In the Restore Database window, select the .bak file check box

          ~ On the Options page, select the Overwrite the existing database check box and click OK.

     - create an ODBC DSN for the new database:

          ~ Select Control Panel > Administrative Tools > Data Sources (ODBC)

          ~ select the System DSN tab

          ~ click Add

          ~ choose SQL Server Native Client and click Finish

          ~ name it whatever you want to (i called mine vcenter)

          ~ give it a description if you want to

          ~ for the server, enter localhost\SQLEXP_VIM

          ~ use the defaults for the rest of the screens, and test it at the end

          ~ you'll then end up with an entry in the System DSN section with the name that you gave it

6.  Install the Microsoft JDBC driver 3.0 (http://www.microsoft.com/download/en/details.aspx?id=28562) using instructions from here:  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200664...

7.  Install vCenter, noting that you have an existing database.

again, i hope this helps,  it all went smootly for me.

wally

9 Replies
KNadeau
Contributor
Contributor

What is uninstalled in Step 3 - Uninstall vSphere?  Are all the vCenter 4.1 applications uninstalled from vCenter, such as vCenter Orchestrator, vCenter Converter, vCenter Server, Update Manager? If not, what do you mean by uninstall vSphere?

Step 7 - Is vCenter 5.0 installed on the same server that vCenter 4.1 was running on?

Just want to establish that you did perform an in place upgrade, but essentially just had to uninstall vCenter and SQL 2005 express, install SQL 2008 express, restore DB, and install vCenter 5.0 all on the same server.

0 Kudos
wallstru
Contributor
Contributor

knadeau - vsphere = vcenter; my apologies for not being clearer.  i am not running orchestrator; i uninstalled all of the rest of the applications you listed, and the only vmware software left was vmware tools.  this was all done on the same server as an "in place upgrade" (i guess you could call it that).  i wanted to avoid setting up a second server and doing a migration.

wally

0 Kudos
KNadeau
Contributor
Contributor

Perfect, Thanks! This exactly what I was looking to do, but there are not any VMware documents on how to do so.

0 Kudos
PetiePooo
Contributor
Contributor

Thanks!  I'm attempting to perform an upgrade from 4.1.0U2 to 5.0.0U1 while moving from a standalone server to a VM.

Any ideas on how to perform the DB setup and restore via sqlcmd instead of the management studio?  Any knowledgible DBAs out there willing to take a stab?

Or is the management studio available as a separate download/install?  The redist/SQLEXPR folder under the vSphere 5 installation package doesn't include it...

0 Kudos
wallstru
Contributor
Contributor

You can download SQL Express with the management tools.  Here is the 2008 R2 version:

http://www.microsoft.com/en-us/download/details.aspx?id=23650

Hope it helps!

wally

0 Kudos
gparker
Enthusiast
Enthusiast

Hi all,

I've just successfully completed an in-place upgrade from vCenter 4.1 to vCenter 5.0-U1 and the accompanying SQL-2005-Express VCDB and VUM databases to SQL-2008-Express like this:-

1. If not already installed, install SQL Management Studio and use it to take backups of the databases.

2. Make a snapshot of the vCenter 4.1 VM (snapshots are GOOD, repeat GGOD!).

3. Run the vCenter 5.0 installer and do an in-place upgrade, telling it to preserve and upgrade the databases.

4. Log into vCenter, reconnect the hosts if necessary, check that the settings are still intact, check that vCenter Server Status shows green ticks.

5. Run the SQL-2008-R2-Express 32-bit installer and select the "Upgrade from SQL 2000, SQL2005 to SQL-2008" option. NOTE:- Use the 32-bit version of SQL-2008-R2-Express not the 64-bit version. The installer should detect the "SQLEXP_VIM" instance and prompt you to upgrade it. The upgrade went smoothly for me Smiley Happy

6. Go into SQL Management Studio and execute the query "select @@version" and it should report that the databases are now on SQL-2008-Express Smiley Happy

7. In Programs and Features, uninstall SQL-2005. The un-installer should not detect and instances which again confirms to you that they're running on SQL-2008.

Hope this helps,

George.

0 Kudos
AlbertWT
Virtuoso
Virtuoso

George, so in this case the VCenter 5.1 installer .ISO file already containing the SQL Server 2008 R2 express 32 bit ? does it supports the 64 bit SQL Server express edition ?

/* Please feel free to provide any comments or input you may have. */
0 Kudos
gparker
Enthusiast
Enthusiast

Hi,

I'm not sure if it supports the 64bit SQL Express. Check the vSphere 5.1 upgrade guide, it contains details on what versions of SQL are compatible/supported with vCenter 5.1. If you want to use a 64 bit SQL Server, you should look to using the full SQL Server, not the Express Edition.

AlbertWT
Virtuoso
Virtuoso

Cool, thanks George.

/* Please feel free to provide any comments or input you may have. */
0 Kudos