Migrate vCloud Director 9.0 DB from MSSQL to Postgres

By | 02/10/2017

With vCloud Director 9.0, VMware introduced postgres as supported database for vCD. If you are planning to use postgres as DB, then you should install Postgres v 9.5 on a supported OS.

In our last Post I mentioned that I purposefully configured MSSQL as DB from my new vCD 9.0 installation, as I wanted to test the migration of vCDDB from MSSQL to Postgres. This post is focussed on how to do so.

If you are new to postgres and do not know how to install it, then follow this blog for installation instructions which are pretty easy and straight forward.

Once you have installed postgres and started services, next is to create database for vCD. Follow below commands to do so

1: Create Database

2: Verify presence of newly created database

3: Create vCloud user and assign password to user

4: Enable the database owner to log in to the database

5: Grant full permission to vCloud user to vCloud database

6: Test the vcloud user access to database

Make sure your postgresql.conf and pg_hba.conf looks like below

Now we are done with DB creation/configuration task. Next is to perform the migration of databse. Unfortunately there is not much info given about this task in vCD 9.0 documentation.

I managed to find the way while playing around in my lab. Database migration is done using the cell management utility which is present in /opt/vmware/vcloud-director/bin directory. We need to use dbmigrate command line option with cell-management-tool.

To see list of supported options run this query

# /opt/vmware/vcloud-director/bin/cell-management-tool dbmigrate –help


Once you have reviewd the available options, use following command to do the db migration

Run the reconfigure-database command

And thats it. You can now login to postgres db and verify the tables etc.

Additional Reading

What’s New in Vcloud Director 9.0

vCloud Director 9.0 Single Cell Installation

vCD 9.0 Documentation

I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂

Category: vCloud Director

About Alex Hunt

Hi All I am Manish Jha. I am currently working in OVH US as Operations Support Engineer (vCloud Air Operations). I have around 7 Years of IT experience and have exposure on VMware vSphere, vCloud Director,vSphere Replication, vRealize Automation, NSX and RHEL. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.