Thursday, July 22, 2010

Addressing the VirtualCenter service not starting because SQL service hasn’t started yet

As mentioned in the previous post (http://terenceluk.blogspot.com/2010/07/vcenter-virtual-center-service-fails-to.html), if you install a SQL instance onto the same server as VirtualCenter / vCenter, sometimes the SQL database does not start and load the vCenter database fast enough before vCenter attempts to start. One of the ways to address this is to add the SQL server service as a dependency to the VirtualCenter service (I always struggle trying to figure out whether I should call it VirtualCenter or vCenter service since it’s still technically named VirtualCenter in the services console in version 4.0 Update 2).

image

To add the SQL service as a dependency isn’t as straight forward as I originally thought because what I attempted initially was just open up the service’s properties and try to do it through the GUI but as it turns out, you can’t add it like that. The following is what you need to do:

1. Start –> Run –> Regedit and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services.

2. Find the name of the service that we want VirtualCenter to depend on. In our case, it’s MSSQLServer.

image

3. Locate the key for VirtualCenter (it’s named vpxd).

image

Notice the DependOnService key that’s type: REG_MULTI_SZ.

4. Open up the properties of the DependOnService key.

image

5. Add an additional line and type in: MSSQLSERVER.

image

6. Hit OK and close the registry editor.

Now when you navigate into the services console to check the VirtualCenter service, you will see the following:

image

If you’re still having problems with the service starting upon restart, see my previous blog post:

vCenter / Virtual Center Service fails to start with event ID: 1000, 7024, 7001, 18456

http://terenceluk.blogspot.com/2010/07/vcenter-virtual-center-service-fails-to.html

No comments: