vmware

Moving my VMware vCenter 4.1 and VMware Update Manager database

Moving my VMware vCenter 4.1 and VMware Update Manager database

I have already explained that i have a local vSphere setup running as a test environment. Of course i use vCenter for that, not much use to have a cluster running and not using vCenter ;).

As this setup is a small environment, i chose to use the MSSQL Server 2005 Express which is bundled with the vCenter 4.1 U1 installer. But with the release of vSphere 5, vCenter no longer supports MSSQL Server 2005 Express.

The solution? Install MSSQL Server 2008 R2 which i have a license for because of my Microsoft Action Pack Subscription and move the database of vCenter 4.1 and Update Manager to this new DB server.

So in one of my Windows Server 2008 Enterprise VM’s i installed the SQL server and set it up to contain the databases for VMware Update Manager and VMware vCenter.

First up: Update manager!

Moving the database to the new server was rather easy. Steps i took:

  1. Allowed mixed authentication
  2. created a user with sysadmin rights, just for the ease of it
  3. Made a database called VIM_UMDB
  4. Set the compatibility to 90 (MSSQL 2005)
  5. Stopped Update Manager
  6. Took a backup of it’s database
  7. Restored it to the VIM_UMDB on the new server (overwrite everything)

After this step something went wrong, it took a while before i figured out the problem was with the Database connector. It seems so logical now, but it took me a while to figure it out. So a little guide after you moved the DB:

  1. Install the MSSQL 2008 R2 Native Client, this also installs a 32bit driver. You can download it from here (search for Native Client)
  2. Open odbcad32.exe (C:\Windows\SysWOW64\odbcad32.exe) , not the regular ODBC configruation. This is where i went wrong, you need to open the 32 bit version to add a 32 bit connector.
  3. Add a new connector with the SQL Server Native Client 10.0 driver and name it something you can remember

Now the only thing we need is to change the configuration of the Update Manager so it knows to use the new database connector.

  1. Just open C:\Program Files (x86)\VMware\Infrastructure\Update Manager\vci-integrity.xml
  2. Find the <database> tag
  3. In the <dbtype> tag, fill in: SQL Server Native Client 10.0
  4. In the <dsn> tag, fill in the name of the DB connector you created.
  5. Save the file
  6. Restart the Update Manager

To be sure, connect to your vCenter server with the client, and see if you get an error about the Update Manager. If not, check if you can scan a host or something. If everything works, great, you successfully moved your Update Manager database!

Next: vCenter Database

This should be a bit easier cause VMware has a Knowledge Base article about it (and another one). And my experience with the Update Manager database did help. Basically the first 10 steps (1-7 and 1-3) are the same, except you just create a normal DSN (so don’t use the 32 bit odbcad32.exe). Next steps:

  1. Uninstall vCenter… Yes, indeed, uninstall it.
  2. Reboot your vCenter server
  3. Reinstall vCenter
  4. During the install select the newly created database connection.
  5. Don’t forget to recreate the statistics rollup job in SQL server (KB Article)
After you reinstalled vCenter, you will have to reconnect the Update Manager to it. You can do this by using the VMwareUpdateManagerUtility in the C:\Program Files (x86)\VMware\Infrastructure\Update Manager folder.