You can update the connection properties for the vCloud Director database by using the reconfigure-database subcommand of the cell management tool.

During the vCloud Director installation or vCloud Director appliance deployment process, you configure the database type and database connections properties. See vCloud Director Installation, Configuration, and Upgrade Guide.

After configuring the vCloud Director database, you can update the database connections by using the reconfigure-database subcommand. You can move the existing vCloud Director database to a new host, change the database user name and password, or enable an SSL connection for a PostgreSQL database.

If you migrated your vCloud Director database to PostgreSQL without reconfiguring the cells in the group, you can use the reconfigure-database subcommand to connect the cells to the new PostgreSQL database. For information about migrating to PostgreSQL, see Migrate to a PostgreSQL Database.

cell-management-tool reconfigure-database  options
Important:

The changes you make by running the reconfigure-database command are written to the global configuration file global.properties and the response file responses.properties of the cell. Before you run the command, verify that the response file is present at /opt/vmware/vcloud-director/etc/responses.properties and writable. For information about protecting and reusing the response file, see vCloud Director Installation, Configuration, and Upgrade Guide.

If you do not use the --pid option, to apply the changes, you must restart the cell.

Table 1. Cell Management Tool Options and Arguments, reconfigure-database Subommand
Option Argument Description
--help

(-h)

None Provides a summary of available options in this category.
--database-host

(-dbhost)

IP address or fully qualified domain name of the vCloud Director database host Updates the value of the database.jdbcUrl property.
Important: The command validates only the value format.
--database-instance

(-dbinstance)

SQL Server database instance. Optional. Used if the database type is sqlserver.
Important: If you include this option, you must provide the same value that you specified when you originally configured the database.
--database-name

(-dbname)

The database service name. Updates the value of the database.jdbcUrl property.
--database-password

(-dbpassword)

Password for the database user. Updates the value of the database.password property. The password you supply is encrypted before it is stored as a property value.
--database-port

(-dbport)

Port number used by the database service on the database host. Updates the value for the database.jdbcUrl property.
Important: The command validates only the value format.
--database-type

(-dbtype)

The database type. One of:
  • sqlserver
  • postgres
Updates the value of the database.jdbcUrl property.
--database-user

(-dbuser )

User name of the database user. Updates the value of the database.user property.
--database-ssl true or false Used if the database type is postgres. Configures the PostgreSQL database to require an SSL connection from vCloud Director.
--pid

(-i)

Тhe process id of the cell. Optional. Runs a hot reconfiguration on a running vCloud Director cell. Does not require a restart of the cell.

If used with the --private-key-path, you can run the command on local and remote cells immediately.

--private-key-path Pathname to the private key of the cell. Optional. All cells in the server group gracefully shut down, update their database properties, and restart.
Important: All cells must permit SSH connections from the superuser without a password.
--remote-sudo-user A user name with sudo rights. Used with the --private-key-path option when the remote user different from root.

For the appliance, you can use this option for the postgres user, for example --remote-sudo-user=postgres.

When you use options --database-host and --database-port, the command validates the format of the arguments but does not test the combination of host and port for network accessibility or the presence of a running database of the specified type.

If you use the --private-key-path option, all cells must be configured to permit SSH connections from the superuser without a password. To perform a verification, for example, you can run the following Linux command:
sudo -u vcloud ssh -i private-key-path root@cell-ip
This example sets your identity to vcloud, then makes an SSH connection to the cell at cell-ip as root but does not supply the root password. If the private key in private-key-path on the local cell is readable by user vcloud.vcloud and the corresponding public key is present in the authorized-keys file for the root user at cell-ip, the command succeeds.
Note:

The vcloud user, vcloud group, and vcloud.vcloud account are created by the vCloud Director installer for use as an identity with which vCloud Director processes run. The vcloud user has no password.

Change the vCloud Director Database User Name and Password

To change the vCloud Director database user name and password, leaving all other connection properties as they were originally configured, you can run the following command:
[root@cell1 /opt/vmware/vcloud-director/bin]#cell-management-tool reconfigure-database \
-dbuser vcd-dba -dbpassword P@55w0rd

Update the vCloud Director Database IP Address by Hot Reconfiguration on All Cells

If you are a non-root user with sudo rights, to change the IP address of the vCloud Director database on all cells immediately, you can run the following command:

[sudo@cell1 /opt/vmware/vcloud-director/bin]#cell-management-tool reconfigure-database \
--dbhost db_ip_address -i $(service vmware-vcd pid cell) --private-key-path=path_to_private-key \
--remote-sudo-user=non-root-user

Reconfigure a Cell After Migrating the vCloud Director Database to PostgreSQL

If you migrated the vCloud Director database from Oracle or Microsoft SQL Server to PostgreSQL without reconfiguring the cells in the server group, to connect each cell to the new PostgreSQL database, you can run the following command:
[root@cell1 /opt/vmware/vcloud-director/bin]#cell-management-tool reconfigure-database \
 -dbhost psql.example.com -dbport 5432 -dbuser vcd-dba -dbname vcloud -dbpassword P@55w0rd \
 -dbtype postgres