If your current vCloud Director environment of an earlier version uses an external Microsoft SQL database, you can migrate to a new vCloud Director environment that consists of vCloud Director 9.7 appliance deployments. Your current vCloud Director environment can consist of vCloud Director installations on Linux or vCloud Director appliance deployments. The new vCloud Director environment can use the appliance embedded PostgreSQL databases in a high availability mode.

The migration workflow includes four major stages.
  • Creating the new vCloud Director server group by deploying one or more instances of the vCloud Director 9.7 appliance
  • Upgrading the existing vCloud Director environment
  • Migrating the external to the embedded database
  • Copying the shared transfer service data and the certificates data.

Procedure

  1. Upgrade your current vCloud Director environment to version 9.7, and upgrade the source database schema.

    See Upgrading vCloud Director and Patching the vCloud Director Appliance.

  2. Verify that the migration source vCloud Director restart is successful.
  3. If you want the new vCloud Director environment to use the IP addresses of the existing environment, change the IP addresses of the existing cells to temporary IP addresses.
  4. If you want the new vCloud Director environment to use the NFS server of the existing environment, create and export a new directory on this NFS server as the new shared NFS mountpoint.

    You cannot reuse the existing mountpoint because the user and group IDs (UID/GID) of the users in the old NFS might not match the user and group IDs in the new NFS.

  5. Create the new server group by deploying one or more instances of the vCloud Director 9.7 appliance.
    • If you want to use the database high availability function, deploy one primary and two standby cells, and, optionally, one or more vCD application cells.
    • If you changed the IP addresses of the existing cells to temporary IP addresses, you can use the original IP addresses for the new cells.
    • If you exported a new path on the existing NFS server, you can use this new shared mountpoint for the new environment.

    See Deploying the vCloud Director Appliance.

  6. On each existing cell and on each newly deployed cell, run the command to stop the vCloud Director service.
    /opt/vmware/vcloud-director/bin/cell-management-tool -u <admin username> cell –-shutdown
  7. Choose one of the existing cells to serve as a migration source.

    The migration source must have access to the eth1 network IP address of the newly deployed primary cell.

  8. On the new primary cell, enable access to the embedded database from the migration source.

    See Configure External Access to the vCloud Director Database.

  9. On the migration source, run the cell management tool to migrate the external database to the database that is embedded in the new primary cell.

    The embedded database uses the eth1 network IP address of the appliance.

    /opt/vmware/vcloud-director/bin/cell-management-tool dbmigrate -dbhost eth1_IP_new_primary \
    -dbport 5432 -dbuser vcloud -dbname vcloud -dbpassword database_password_new_primary

    For information about using the cell management tool, see the vCloud Director Administrator's Guide.

  10. On each newly deployed cell, back up and replace the configuration data, and reconfigure and start the vCloud Director service.
    1. Back up the properties and the certificates files, and copy and replace these files from the migration source.
      The global.properties, responses.properties, certificates, and proxycertificates files are at /opt/vmware/vcloud-director/etc/.
      Important: If you are migrating to vCloud Director version 9.7.0.1 or later, you must also back up, copy, and replace the truststore file from the migration source, along with the other files.
    2. Back up the keystore file that is at /opt/vmware/vcloud-director/certificates.ks.

      Do not copy and replace with the keystore file from the migration source.

    3. Run the command to reconfigure the vCloud Director service.
      /opt/vmware/vcloud-director/bin/configure --unattended-installation --database-type postgres --database-user vcloud \
      --database-password db_password_new_primary --database-host eth1_ip_new_primary --database-port 5432 \
      --database-name vcloud --database-ssl true --uuid --keystore /opt/vmware/vcloud-director/certificates.ks \
      --keystore-password root_password_new_primary --primary-ip appliance_eth0_ip \
      --console-proxy-ip appliance_eth0_ip --console-proxy-port-https 8443 
      Where:
      • The --keystore-password value matches the initial root password of this appliance.
      • The --database-password value matches the database password that you set during the appliance deployment.
      • The --database-host value matches the eth1 network IP address of the primary appliance.
      • The --keystore value is the path to the certificates.ks file you backed up in Step 10.b.
      • The --primary-ip value matches the eth0 network IP address of the appliance.
      • The --console-proxy-ip value matches the eth0 network IP address of the appliance.

      For troubleshooting information, see Reconfiguring the vCloud Director Service Fails When Migrating or Restoring to vCloud Director Appliance.

    4. Run the command to start the vCloud Director service.
      service vmware-vcd start

      You can monitor the progress of the cell startup at /opt/vmware/vcloud-director/logs/cell.log.

  11. After all cells of the new server group finish the startup process, verify that the migration of your vCloud Director environment is successful.
    1. Open the vCloud Director Web Console by using the eth0 network IP address of any cell from the new server group, https://et0_IP_new_cell/cloud.
    2. Log in to the vCloud Director Web Console with your existing system administrator credentials.
    3. Validate that your vSphere and cloud resources are available in the new environment.
  12. After the successful verification of the vCloud Director migration, use the vCloud Director Web Console to delete the disconnected cells that belong to the old vCloud Director environment.
    1. From the Manage & Monitor tab, click Cloud Cells.
    2. Right-click a cell name and select Delete.

You can deploy the vCloud Director appliance to add members to the server group of the migrated environment.

What to do next

The new migrated vCloud Director appliance environment uses self-signed certificates. To use the well-signed certificates from the old environment, on each cell of the new environment, follow these steps:

  1. Copy and replace the keystore file from the old cell to /opt/vmware/vcloud-director/data/transfer/certificates.ks.
  2. Run the cell management tool command to replace the certificates.

    Ensure that vcloud.vcloud is the owner of this file.

    /opt/vmware/vcloud-director/bin/cell-management-tool certificates -j -p --keystore /opt/vmware/vcloud-director/data/transfer/certificates.ks \
    --keystore-password ks_password_old_vCD
  3. Restart the vCloud Director service.
    service vmware-vcd restart
    

If you add new members to this server group, the new appliance cells are deployed with these well-signed certificates.