I'm using VMWare Server 2.0 on Windows Server 2003 R2. Sometimes after restarting the host machine, the VMWare host agent service won't start due to an error.
This is the error messages from Event Viewer:
[Service control manager] Timeout (30000 milliseconds) waiting for the VMware Host Agent service to connect.
[Service control manager] The VMware Host Agent service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.
I've set the service to automatically restart after subsequent failure using services.msc
(using a 10 min. delay), but it still won't start. Only starting the service manually seems to work.
Has anyone experienced this before? What workarounds or fixes are there?
-- updated --
Here's a small vbs script that i use to check whether a service is running or not, and automatically starts it if it's not running. I use the scheduler to run this script every 15min.
strComputer = "."
strSvcName = "VMWareHostd"
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set objService = objWMI.Get("Win32_Service.Name='" & strSvcName & "'")
If objService.State= "Stopped" Then
call SendEmail("[email protected]","[email protected]","Service X stopped","")
objService.StartService()
End If
Private function SendEmail(From, Destination, Subject, Textbody)
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set objEmail = CreateObject("CDO.Message")
Set objCdoConfig = CreateObject("CDO.Configuration")
With objCdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "127.0.0.1"
.update
End With
with objEmail
set .Configuration = objCdoConfig
.From = From
.To = Destination
.Subject = Subject
.Textbody = Textbody
end with
call objEmail.Send
end function
--