Sunday, April 29, 2012

vCenter 5 refuses to start because duplicate datastore

Please take note that you must do this only with proper guidance from VMware Support. What I did below is not supported and is not recommended.

Plus, I got my vCenter DB corrupted as a result along the way, and I had to spend more time than I thought I would. So you have been warned.


vCenter service will not start. The error at vpxd is duplicate name for the datastore named Templates. I’ve manually unmounted the Templates datastore from each ESXi, but still got the same error. So my guess is vCenter database is somehow corrupted.

Below is the log.


2012-04-28T18:16:26.458+08:00 [02520 info 'Default'] [Vpxd::ServerApp::Init:898] Calling: VpxdMoHost::Init()

2012-04-28T18:16:26.458+08:00 [02520 info 'Default'] [Vpxd::ServerApp::Init:899] Calling: VpxdDatastore::Init(gDB)

2012-04-28T18:16:26.458+08:00 [02520 error 'Default'] Duplicate name (Templates) in datastore folder

2012-04-28T18:16:26.458+08:00 [02520 error 'Default'] [Vpxd::ServerApp::Init] Init failed: VpxdDatastore::Init(gDB)

2012-04-28T18:16:26.458+08:00 [02520 warning 'VpxProfiler'] ServerApp::Init [TotalTime] took 2078 ms

2012-04-28T18:16:26.474+08:00 [02520 error 'Default'] Failed to intialize VMware VirtualCenter. Shutting down...

2012-04-28T18:16:26.474+08:00 [02520 info 'Default'] Wrote uptime information

2012-04-28T18:16:36.381+08:00 [02536 warning 'VpxProfiler' opID=SWI-46e11f30] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms

2012-04-28T18:16:48.382+08:00 [02536 warning 'VpxProfiler' opID=SWI-7871f574] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms

2012-04-28T18:17:00.383+08:00 [02536 warning 'VpxProfiler' opID=SWI-ef0a9776] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms

2012-04-28T18:17:12.376+08:00 [02536 warning 'VpxProfiler' opID=SWI-ff16e089] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms

2012-04-28T18:17:24.358+08:00 [02536 warning 'VpxProfiler' opID=SWI-dccf3641] VpxUtil_InvokeWithOpId [TotalTime] took 12000 ms

2012-04-28T18:17:24.702+08:00 [02520 info 'Default'] Forcing shutdown of VMware VirtualCenter now


With the help of some kind experts, I connected to the database.

Below are some steps I used to recover. Please note that the actual recovery experience was not as smooth as this one. I’m just documenting the key steps here.





So I go to the DS_Assignment table and delete them first.


A warning as it is not undoable.


The deletion went successfully.

So I went back to the VPX_Datastore table and deleted the duplicate entry.

And my VC is up J




1 comment:

  1. I had exactly the same problem, so thanks for documenting the way you fixed it. Found I had to delete the corresponding entry for the removed datastores from the VPX_ENTITY table also.