vCenter tip: housekeeping tips for your vCenter Server Database

If using a small/medium vCenter setup may well be using a Postgres database to get you by. Good to run a check on it from time to time. Standard operations include:

  • Performing regular backups
  • Monitoring log growth and compact when needed

Although as part of its own day-to-day operations space is automatically reclaimed sometimes you may run into situations where you need to manually reclaim space. To do:

Step 1. Log in to the VMware vCenter Server Appliance as root using SSH (putty) or directly at the console.

Step 2. To stop the vCenter service: service vmware-vpxd stop

Step 3. To find out the database password:

cat /etc/vmware-vpx/embedded_db.cfg | grep PASSWORD

Step 4. To get an idea of storage availability run # df -h

Step 5. In the results of the previous command, locate the /storage/db row to determine the amount of space used by the database.

Step 6. Enter this command to run the Vaccum command:

sudo -u postgres /opt/vmware/vpostgres/1.0/bin/vacuumdb -a -e -v -f -U postgres > /tmp/vacuumdb.log

Step 7 The Vaccuum command will prompt you to enter a database password for each of the 5 associated databases, postgres, template0, template1, VCDB and ssodb. At each prompt, provide the password obtained in Step 3.

Step 8. Use this command again to verify that the space used by the database has decreased: df -h


The status of your VMware Postgres database at Home > Administration > System Configuration > Services. Select the VMware Postgres service in the list of services and use the information in the center pane to verify the Health is Good and the State is Running.

From here you can also, you can use the Actions dropdown to stop and restart the service.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.