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 process, you run a configuration script or perform an unattended configuration where you set the database type and database connections properties. For information about configuring network and database connections, see vCloud Director Installation and Upgrade Guide.

After finishing the vCloud Director installation, 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 or password, or enable an SSL connection to a PostgreSQL database.

After finishing the vCloud Director installation, you can also change the database type by migrating the database from Oracle or Microsoft SQL Server to PostgreSQL. See Migrate to a PostgreSQL Database. If you migrate the database without reconfiguring the cells in the group, you can use the reconfigure-database subcommand to connect the cells to the target 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 and Upgrade Guide.

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 commands 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 if database type is sqlserver.

Important:

If you include this option, you must provide the same value that you specified when you originally ran the configuration script.

--database-name

(-dbname)

The database service name.

For information about installing and configuring a vCloud Director database, see vCloud Director Installation and Upgrade Guide.

Updates the value of the database.jdbcUrl property.

--database-pwd

(-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:

  • oracle

  • 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

Configures the target PostgreSQL database to require an SSL connection from vCloud Director.

--private-key-path

Pathname to the private key of the cell.

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.

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

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