VMware Cloud Community
mclark
Expert
Expert
Jump to solution

VirtualCenter service not starting on reboot

My VC server VirtualCenter service will not start automatically on reboot. The SQL 2005 Express edition is installed on the same VM. I have the VC service set to depend on MSSQLSERVER, but it has not made a difference. The event viewer logs show VC trying to hit SQL before it's ready, so I assume that MSSQLSERVER shows started, and then VC tries to start, but SQL is not quite ready yet even though it's started. Anyone else having this problem and have a good way to fix it? It is not helpful to have to log into the ESX host to start the VC service every time...

Thanks!

0 Kudos
45 Replies
abrjgl
Contributor
Contributor
Jump to solution

That log looks exactly like the problem I had when one of my servers had upgraded to ESX 3.5u2. Which is another bug since I didn't tell Update Manager to remediate with any of the latest updates. As I said upgrading to VC 2.5u2 solved my problem. Hopefully techsupport can help you out.

0 Kudos
fishface
Contributor
Contributor
Jump to solution

You are dead right. There was a mix up with the upgrade ISO and what we thought was Update 2 - was in fact Update 1. Update 2 did fix the issue.

Found another issue along the way where Update Manager fails to upgrade from the ISO image prompts for disk 1. I had to copy the entire ISO to c:\disk1 and run it from there. Nice one vmware. Another smooth upgrade path....

:smileygrin:

0 Kudos
SpiderIce
Enthusiast
Enthusiast
Jump to solution

Check out your SQL, it may have no space left. The VC service will not start if it is having SQL problems. Check the HDD that SQL database is located on make sure it as space. Then check to Make sure the database as not filled up it you restricted the space.We had both of this problems happen at my place of work.

0 Kudos
estoeckle
Contributor
Contributor
Jump to solution

Depending on how your VC was taken to update 2 the name of the Database Service will be different. Which is why I put that this was for a clean installation of VCu2.

Thanks,

Erick

0 Kudos
leeroyrichardso
Contributor
Contributor
Jump to solution

I have checked the sql server and we have plenty of room for our vm database, but the vcentre service just refuses to start.

This is the only error I get

The VMware VirtualCenter Server service terminated with service-specific error 2 (0x2).

For more information, see Help and Support Center at

Lee Richardson

Lee Richardson
0 Kudos
Paul_Lalonde
Commander
Commander
Jump to solution

Hi all,

I've had the same issue, but resolved it by adding a SQL server dependency to the vpxd service. Here's what I did.

In the registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services/vpxd

I modified the existing value of DependOnService which was "ProtectedStorage lanmanworkstation"

to become: "ProtectedStorage lanmanworkstation MSSQL$SQLEXP_VIM"

(where MSSQL@SQLEXP_VIM is the instance of my VirtualCenter SQL Server service)

and VirtualCenter comes up fine every time. It appeared that before doing this, VC would try to start before SQL was started and this caused it to fail. Now, with SQL as a dependency, VC starts every time.

Hope this helps!

Paul

0 Kudos
mclark
Expert
Expert
Jump to solution

The problem is that if you have upgraded to Update 2 from Update 1 or 2.5 GA you do not have MSSQL$SQLEXP_VIM as an option. And if you just put in MSSQLSERVER, the VC service still tries to start before SQL is fully initialized. It seems that unless they update the VC service to have some sort of wait time before starting (or unless I reinstall 2.5 Update 2 from scratch - which I don't want to do), this will continue to be a problem.

0 Kudos
NotAvailable
Contributor
Contributor
Jump to solution

Hi

I have a fresh VC2.5 U2 Installation on an XP VM. Having had the same issue (Login failed for NT-authority\system), I added the dependency (MSSQL$SQLEXP_VIM) to the service vpxd and this also showed up in the service properties - but... no effect.

Having talked with VMware support I added a Windows scheduled Task which calls a batch that pings localhost 10 times and then runs "net start vpxd". But this is definitely NOT satisfying!!

I did not yet add the dependency to the License Server too, but this shouldnt affect the startup of vpxd, right?

Thnaks for your ideas... Smiley Happy

0 Kudos
JayArr
Contributor
Contributor
Jump to solution

Can you provide more details on this batch script?

At the moment, any thing I can do to make sure this service stays running or at least starts after a scheduled reboot is one less thing I have to worry about on a Monday.

Does this batch script just ping the local server?

0 Kudos
NotAvailable
Contributor
Contributor
Jump to solution

The ping is only to wait a couple of seconds after server reboot (instead of using "sleep "), so you can ping any address that is reachable (actually it doesn't even have to be reachable...)

Then I only call

net start vpxd

to start the service

JayArr
Contributor
Contributor
Jump to solution

Oh wow... not as complicated as I figured it would be...

Something still strikes me that this is still really stupid for a service to fail like this... it's not like this was a custom hack of an installation.

Ah well - thanks for the reply, I'll give it a shot.

0 Kudos
LatinSuD
Enthusiast
Enthusiast
Jump to solution

It seems that once VC fails with event ID 1000 it won't try to restart. So restart delay is ignored.

But the service dependence does work.(Edit the registry key and add MSSQL$SQLEXP_VIM)

Thank you a lot!

0 Kudos
JayArr
Contributor
Contributor
Jump to solution

It seems that once VC fails with event ID 1000 it won't try to restart. So restart delay is ignored.

But the service dependence does work.(Edit the registry key and add MSSQL$SQLEXP_VIM)

Thank you a lot!

That's good to know - with the latest out-of-band patch from Microsoft, we'll be rebooting this server this weekend. I'll be able to see if it returns.

0 Kudos
Protegimus
Contributor
Contributor
Jump to solution

Setting the VMware VirtualCenter service dependency according to BenConrad, estoeckle and Paul Lalonde's posts depending on your installation version resolves the automatic VirtualCenter service failure to start, but be aware that on a Server 2003 VC host using the command:

sc "backslash backslash computer_name" config vpxd depend="MSSQL$SQLEXP_VIM"

will replace the existing service dependencies of:

"ProtectedStorage lanmanworkstation"

rather than appending MSSQL$SQLEXP_VIM to the list to become:

"ProtectedStorage lanmanworkstation MSSQL$SQLEXP_VIM"

Use the registry change method or amend the sc command syntax as follows:

sc "backslash backslash computer_name" config vpxd depend="ProtectedStorage/lanmanworkstation/MSSQL$SQLEXP_VIM"

0 Kudos
scerazy
Enthusiast
Enthusiast
Jump to solution

Anybody can say whatever they want, but for me "service dependence does NOT NOT NOT work"

ESX 3.5 with upto June patches, VC 2.5 U1 on SQLExpress2005

Each time server is rebooted, service needs to be started by hand.

Tried all dependencies, none makes any difference

Seb

0 Kudos
NotAvailable
Contributor
Contributor
Jump to solution

Same here, no matter if I set registry key or use service context menu. The only way to startup the service is the .bat file mentioned above. And still no statement from VMWare.

0 Kudos
LatinSuD
Enthusiast
Enthusiast
Jump to solution

I admit I have only tested it a couple of times. (I also have latest updates applied).

Can you verify the dependence is correct? Go to "VMware VirtualCenter" properties -> dependencies and check that "SQL Server (SQLEXP_VIM)" is there.

And a second test for curiosity: if you stop both VC and SQL and then start VC, does it autostart SQL and does it work correctly? In my case it works too.

0 Kudos
scerazy
Enthusiast
Enthusiast
Jump to solution

In VC 2.5 U1 there is NO SQLEXP_VIM, it is still SQL Server (SQLEXPRESS) with actual service name MSSQL$SQLEXPRESS

Yes, it shows in Properties/Dependencies and yes, it will start SQL server on its own

But will not start on server reboot:

The VMware VirtualCenter Server service terminated with service-specific error 2 (0x2).

and doing it by hand give perfect:

The VMware VirtualCenter Server service entered the running state.

Seb

0 Kudos
geob
Enthusiast
Enthusiast
Jump to solution

I have had a simular issue and was able to ovfercome this by creating a vbscript to check the service and start it if not running. I then set the script to run as a scheduled task.

Script Starts Here

strComputer = "."

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!
" & strComputer & "\root\cimv2")

Set colAllRunningServices = objWMIService.ExecQuery("Select * from Win32_Service")

Const EVENT_SUCCESS = 0

Const EVENT_ERROR = 1

Set objShell = Wscript.CreateObject("Wscript.Shell")

For Each objService In colAllRunningServices

If objService.DisplayName = "VMware VirtualCenter Server" Then

If objService.State = "Stopped" Then

objShell.LogEvent EVENT_ERROR, "Virtual Center Server is Stopped"

objService.StartService()

objShell.LogEvent EVENT_SUCCESS, "AutoStartVC_V2.vbs is attempting to start Virtual Center Server"

Else

End If

Else

End If

Next

Script Ends Here

0 Kudos
jaypalewicz
Contributor
Contributor
Jump to solution

I had this same problem. I read the forums and added MSSQL$SQLEXP_VIM to the end of the dependencies list using the registry edit method. This seemed to work for a while. Then, for some reason it stopped working as advertised. I would reboot the VirtualCenter server and the VirtualCenter service would fail to start.

Here is what I did to fix the problem. I added MSSQL$SQLEXP_VIM before ProtectedStorage and lanmanworkstation. Things seem to be working fine now.

0 Kudos