You can update the connection properties for the VMware Cloud Director database by using the reconfigure-database subcommand of the cell management tool.
During the VMware Cloud Director installation or VMware Cloud Director appliance deployment process, you configure the database type and database connections properties. See Install VMware Cloud Director on Linux and Deployment and Initial Configuration of Your VMware Cloud Director Appliance.
After configuring the VMware Cloud Director database, you can update the database connections by using the reconfigure-database subcommand. You can move the existing VMware Cloud Director database to a new host, change the database user name and password, or enable an SSL connection for a PostgreSQL database.
cell-management-tool reconfigure-database options
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 Install VMware Cloud Director on Linux.
If you do not use the --pid option, you must restart the cell to apply the changes.
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 VMware Cloud 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:
|
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 VMware Cloud Director. |
--pid (-i) |
The process id of the cell. | Optional. Runs a hot reconfiguration on a running VMware Cloud 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.
sudo -u vcloud ssh -i private-key-path root@cell-ipThis 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.
The vcloud
user, vcloud
group, and vcloud.vcloud
account are created by the VMware Cloud Director installer for use as an identity with which VMware Cloud Director processes run. The vcloud
user has no password.
Change the VMware Cloud Director Database User Name and Password
[root@cell1 /opt/vmware/vcloud-director/bin]#cell-management-tool reconfigure-database \ -dbuser vcd-dba -dbpassword P@55w0rd
Update the VMware Cloud 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 VMware Cloud 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