VMware Cloud Community
OldguardMD
Contributor
Contributor

Moving the vSphere database to a new server

We have a vSphere server 5.0 server where the database is loaded with a light version of SQL 2005 (I believe it was installed as part of the vSphere 5 installation).  We have recently stood up a larger SQL server and would like to move the SQL server to a 2008 R2 database server. After reviewing the documentation it seemed simple enough, but when I tried to do it, it didn't work out.

I shutdown all of the services and backed up the database. I create the database on the new server and restored from backup. I have a service account I want to use for access, so I associated that with the newly restored database on the new server and made the service account a DBO for that database. I think went to the ODBC entry used by vSphere and changed the database server name and selected the database. The test of the ODBC connection worked fine. I then tried to restart the vSphere services and the main service hung on start up and created a bunch of errors in the logs saying it couldn't contact the database. I tried upgrading the SQL client to the latest version and recreated the ODBC entry, but that didn't help. When I reboot the server the vSphere server service hangs and you can't even get into the server using RDP. If I disable the vSphere service the server comes right up. when I look at the logs for the vSphere service, they say it can't contact the database.

I found an article that says how to modify the registry to to add a user name to the database properties, and it also contained the command line for updating the password, but those to changes together appear to have had no affect. When I pointed the server back to the original database through ODBC and removed the user name and password from the registry, the server operates just fine. I am pretty sure the database is fine, and the ODBC connection is OK, so how do I tell vSphere to use integrated authentication with a domain account? Or am I just missing something more fundamental...

Tags (3)
0 Kudos
5 Replies
NickMarshall9
VMware Employee
VMware Employee

Hi,

I must say the "you can't even get into the server using RDP" sounds quite worrying! I wouldn't have thought a restored DB could have caused such a problem.

Could you link the article / guide you followed resulting in the error? I can test it in my lab to see what's gone wrong.

Cheers,

Book - Mastering VMware vSphere 5.5 Blog - LabGuides.com & NickMarshall.com.au Podcast - vBrownBag.com
0 Kudos
OldguardMD
Contributor
Contributor

The remote desktop service wouldn't start because the following service would never enter the running state (remain in a "Starting" status for at least 20 minutes before I gave up and rebooted the system).

          vpxd               VMware VirtualCenter Server

Since the TermService is one of the last to start, it never started..

This is the guide I used, but it is missing a lot of information:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=796089...

  • Step one was no issue...
  • Step two was modified because I wanted to roll back. I took a back up of the database and restored it to the new server so that I could roll back if needed.
  • Step 3 was not done because we are running vSphere 5.0, not 4.1 and I didn't see why I should move it since I am just trying to move the SQL database and not the whole vSphere server.
  • Step 4 is where the problem seems to be. Since no credentials are currently used, I assume I need to add credentials. I used the following link to try to work that out, but the information is incomplete, and my guess on the missing pieces didn't work. I tried using the machine credentials similar to a WSUS server database, and I tried using a service account that I actually implemented using the below method. Neither works. I know ODBC is fine because the ODBC connection tests good and is associated with the right database.
  • I don't think 5 applies since I believe vSphere 5 installs Microsoft SQL Server 2005 Express.
  • At step 6, the vpxd service hangs in a "starting" state and the logs say that the server cannot connect to the database..
0 Kudos
mwpreston
Hot Shot
Hot Shot

Hi,

Did you set the service account that you are using as the actual dbo or owner of that database?  This may help...

0 Kudos
OldguardMD
Contributor
Contributor

So the answer to my question was that I was using the wrong procedure. Below is the link to the right procedure.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=102860...

You basically stop the services, move the database, uninstall vSphere and then reinstall vSphere. I had a minor issue with having to install as the service account, and the services had to be modified to use the new service account manually, but other than that it was pretty straight forward.

0 Kudos
NickMarshall9
VMware Employee
VMware Employee

Good to know - I wont try that old method in my lab this weekend then!

Cheers,

Book - Mastering VMware vSphere 5.5 Blog - LabGuides.com & NickMarshall.com.au Podcast - vBrownBag.com
0 Kudos