症状:

每次重新启动机器后,Vmware VirtualCenter Server服务都无法自动启动。
服务的启动类型是设为自动的,日志里有如下报错信息
“Vmware VirtualCenter Server
服务因2(0x2)服务性错误而停止。
每次都需要手动启动一下,就OK
 

查看vCenter Serve启动日志:
Section for VMware VirtualCenter, pid=3460, version= 4.0.0 , build=build-162856, option=Release
[2009-10-27 15:15:31.406 03472 info 'App'] Current working directory: C:\WINDOWS\system32
[2009-10-27 15:15:31.406 03472 info 'Libs'] HOSTINFO: Seeing Intel CPU, numCoresPerCPU 1 numThreadsPerCore 2.
[2009-10-27 15:15:31.406 03472 info 'Libs'] HOSTINFO: This machine has 2 physical CPUS, 2 total cores, and 4 logical CPUs.
[2009-10-27 15:15:31.406 03472 info 'App'] Log path: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs
[2009-10-27 15:15:31.406 03472 info 'App'] Initializing SSL
[2009-10-27 15:15:31.406 03472 info 'Libs'] Using system libcrypto, version 9080AF
[2009-10-27 15:15:32.515 03472 info 'App'] Vmacore::InitSSL: doVersionCheck = true, handshakeTimeoutUs = 120000000
[2009-10-27 15:15:32.515 03472 info 'App'] Starting VMware VirtualCenter 4.0.0 build-162856
[2009-10-27 15:15:32.515 03472 info 'App'] Log directory: C:\Documents and Settings\Default User\Local Settings\Application Data\VMware\vpx.
[2009-10-27 15:15:32.515 03472 info 'App'] Account name: SYSTEM
[2009-10-27 15:15:32.515 03472 info 'App'] Total virtual memory available for the process 2097024 KB
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxOsLayer] Enabled low-frag process heap.
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxOsLayer] Enabled low-frag crt heap.
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:749] Calling: InfoDeclSchema(gDB)
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:751] Calling: VpxCallbackDesc::Init(MakeFunctor(this, &ServerApp::RequestShutdown))
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:752] Calling: VpxCryptInit()
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:753] Calling: VpxLRO::Init()
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:754] Calling: VpxLroList::Init(ltud)
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxLRO] 128 max LROs
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxLRO] 12 reserved internal LROs
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxLRO] 12 reserved blocker LROs
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxLRO] 12 reserved short LROs
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxLRO] 8 reserved long LROs
[2009-10-27 15:15:32.515 03472 info 'App'] [VpxLRO] 600-second task lifetime
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:755] Calling: VpxdCharacterizeThreadpool(ltud, minNumThreads, maxNumThreads)
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:756] Calling: VpxdCertificate_Load(gDB, CERTIFICATE_VMDBPATH )
[2009-10-27 15:15:32.515 03472 info 'App'] [Vpxd::ServerApp::Init:757] Calling: VpxdVdb::Init(Vdb::GetInstance(), false, false)
[2009-10-27 15:15:32.593 03472 error 'App'] ODBC error: (28000) - [Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
[2009-10-27 15:15:32.593 03472 error 'App']
Error getting configuration info from the database[2009-10-27 15:15:32.593 03472 error 'App'] [Vpxd::ServerApp::Init] Init failed: VpxdVdb::Init(Vdb::GetInstance(), false, false)
[2009-10-27 15:15:32.593 03472 error 'App'] Failed to intialize VMware VirtualCenter. Shutting down...
[2009-10-27 15:15:32.593 03472 info 'App'] Forcing shutdown of VMware VirtualCenter now

 

解决方法: 

遇到过这种问题, 原因是 VC服务启动的速度快过SQL服务启动的速度,
造成VC启动时时找不到数据库,所以提示错误,当SQL服务启动完成,再重启
一次VC服务,VC服务恢复正常。。。
可以尝试一下设置来解决问题:
1
先在服务中找到负责VCSQL服务的准确名称,一般是MSSQLXXX or MSSQL$SQLEXPRESSXXX
2
打开注册表 HKLM\System\CurrentControlSet\Services\vpxd,打开DependOnService值,
   
添加 VC数据库服务的准确名称,例如: MSSQL$SQLEXPRESSXXX (添加后最后一行要留一个空白行)
3
保存,重启服务器.

文章来源:   http://bbs.vmsky.com/viewthread.php?tid=21519

 

原因分析:
当VMware VirtualCenter Server服务尝试启动的时候,如果它所依赖的服务未全部启动,将出现此问题。
VMware VirtualCenter Server服务依赖的服务有以下两个:
SQL Services
ADAM Services
我们在VC服务器上检查VMware VirtualCenter Server服务的依存服务有哪些时,可以发现以上两个服务是默认没有在依存服务的列
表中的。
解决方法:
解决VMware VirtualCenter Server服务无法自动启动的问题,将SQL Services和ADAM Services这两个服务添加到VMware VirtualCenter Server服务的依存列表中即可。添加方法如下:
1. 在VC上运行“services.msc”打开服务,分别打开服务“SQL Server(SQLEXPerience_VIM)”和“VMware VCMSDS”属性,记录这两个服务的名字,如下图所示,
 

Vmware VirtualCenter Server服务无法自动启动_第1张图片 

 

Vmware VirtualCenter Server服务无法自动启动_第2张图片

2. 打开注册表,浏览到项“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpxd”,双击右边键值“DependOnService”,添加服务名“MSSQL$SQLEXP_VIM”和“ADAM_VMwareVCMSDS”,如下图所示,
 

Vmware VirtualCenter Server服务无法自动启动_第3张图片

 
3. 打开服务管理工具,在服务“VMware VirtualCenter Server”的属性-依存的服务中可以看到刚刚添加的两个服务,如下图所示,
 

Vmware VirtualCenter Server服务无法自动启动_第4张图片

4. 重启VC,重启后发现VMware VirtualCenter Server服务可以自动启动。