Rebuild the vCenter 4.1 Database

After purging my vCenter database, I seemingly corrupted it (I should have taken a snapshot first). In this case, as the database was small (read: 1 host, 6 VMs) I decided to rebuild it. This is not something you’ll want to do lightly, as well, everything kinda goes away. If you do proceed with this on a production system, and have a corresponding RPE, well, consider yourself warned.

Note: Under normal circumstances you will have either a database backup or a snapshot of your vCenter VM before doing the pruning mentioned prior… a rebuild can be useful however, in times where you don’t.

Here’s how:

  1. Stop the vCenter Server Service
    1. Start > Run > services.msc
    2. Find vCenter Server Service
    3. Click Stop
      image
  2. Fire up a command prompt
  3. Change directories to “C:\Program Files\VMware\Infrastructure\VirtualCenter Server”
  4. Run vpxd.exe -b, you’ll be greeted with the following:
    PS C:\Program Files\VMware\Infrastructure\VirtualCenter Server> .\vpxd.exe -b
    [2010-10-19 21:58:31.794 03744 info ‘App’] Current working directory: C:\Program Files\VMware\Infrastructure\VirtualCenter Server
    [2010-10-19 21:58:31.794 03744 info ‘App’] Log path: C:\ProgramData\VMware\VMwareVirtualCenter\Logs
    [2010-10-19 21:58:31.794 03744 info ‘App’] Initializing SSL
    [2010-10-19 21:58:31.810 03744 info ‘Libs’] Using system libcrypto, version 9080CF
    [2010-10-19 21:58:34.059 03744 info ‘App’] Vmacore::InitSSL: doVersionCheck = true,handshakeTimeoutUs = 120000000
    [2010-10-19 21:58:54.026 03744 info ‘App’] [LdapBackup] Making sure LDAP instance VMwareVCMSDS is running
    [2010-10-19 21:58:54.057 03744 info ‘App’] [LdapBackup] Attempting to start service ADAM_VMwareVCMSDS…
    [2010-10-19 21:58:54.135 03744 info ‘App’] [LdapBackup] Service started
  5. After that, you can start the service again.

You should drop us a line on twitter here.

One thought on “Rebuild the vCenter 4.1 Database”

  • That’s a pretty awesome trick to start a vcenter database from scratch. Now my vcenter status is showing problems with services that need a connection back to the vcenter database (license monitoring, storage management). I didn’t have this before the rebuild… Yeesh..

Comments are closed.