This script helps the customers to migrate their on-prem VCD instances to Cloud Director Service
- The host runs the migrate.sh should have packages installed : curl, jq, scp, ssh, sshpass, zip and md5sum
- Make sure on-prem VCD FQDN is reachable from public internet
- Make a note of VCD FQDN name, admin credentials, cell OS credentials and database host OS credentials In case of appliance setup, cell OS credentials refer to primary cell.
- Make a note of VCD setup model (appliance / non-appliance)
- Make a note of CSP organization UUID and the generated API/refresh token
sh scripts/migrate.sh
The migration scripted tool can be run by using sh migrate.sh
The script execution is as follows
- The customer has to provide the on-prem VCD site FQDN name (e.g: migration.eng.vmware.com) as scripted tool requests by
- Enter on-prem VCD site FQDN name: .<domain.name>
- The scripted tool seeks the administrator username and password of the on-prem VCD site by
- Enter admin username for on-prem VCD site .:
- Enter admin password for on-prem VCD site .:
- Upon successful collection, scripted tool outputs "Successfully collected credentials for ."
- Migration scripted tool seeks the on-prem VCD instance deployment model as in appliance/non-appliance. Customer has to enter true if it is appliance based or false if it is non-appliance based
- Is . Appliance based [true for Appliance, false for Non-Appliance]: <true/false>
- Scripted tool finds the active cell (primary cell in case of appliance) and outputs
- Found active Cell: (Non-Appliance model)
- Found primary Cell: (Appliance model)
- Customer can cross verify the cell details, scripted tool seeks active cell (primary cell in case of appliance) login os credentials
- Enter username for cell :
- Enter password for cell :
- Upon successful collection, scripted tool outputs "Successfully collected credentials for "
- Scripted tool makes a copy of /opt/vmware/vcloud-director/etc/responses.properties and outputs "Successfully downloaded responses.properties from "
- Scripted tool finds the database details and outputs "Found Database HOSTNAME: and "Found Database Name: "
- If appliance mode, database resides in primary cell. Scripted tool will reuse the primary cell login os credentials. If non-appliance model, scripted tool seeks database host login os credentials
- Enter username for database host :
- Enter password for database host :
- Scripted tool seeks the CSP org ID and CSP org API token
- Enter CSP ORG ID:
- Enter CSP ORG refresh token: "
- Scripted tool gets the list of environments associated, if it is more than one, it lists all the available environments and customer has to select the required environment
- Found following 5 environments in org: US West - Oregon (xxxxx) Australia - Sydney (xxxxx) Europe - Germany (xxxxx) Asia - Japan (xxxxx) Select environment for CDI migration: values (1-4)] : 1 Scripted tool outputs "Selected Environment: US West - Oregon (xxxxx)
- Scripted tool invokes the compatibleCheck API
- If compatible, scripted tool outputs "Compatibility Check Succeeded, found upgrade category: "
- If not compatible, scripted tool exits by printing the API response and "Compatibility check has been failed, check the API response.
- Scripted tool, takes data only dump from the database and stores as vcloud_db_data.dump
- Creates resources.zip by compressing responses.properties (Collected in step 6) and vcloud_db_data.dump (Collected in step 11)
- Scripted tool outputs "Successfully collected all required resources from . for migration"
- Scripted tool seeks the CDI name to migrate by
- Enter CDI Name to migrate:
- Scripted tool uploads the resources to CDS environment by invoking uploadResources API
- Upon successful upload, scripted tool outputs "Upload Resource Task URN: "
- If upload failed, scripted tool exits by printing API response and "Upload failed, check the API response"
- Scripted tool setups the maintenance mode in all the cells by running /opt/vmware/vcloud-director/bin/cell-management-tool cell -m true -u -p '' depends on environmental variable.
- If ACTIVATE_MAINTENANCE_MODE is set to false, scripted tool will not activate maintenance mode
- If ACTIVATE_MAINTENANCE_MODE is not set (or) set to true, scripted tool will activate maintenance mode
- Scripted tool invokes the migrate API
- Upon successful task initialisation, scripted tool outputs "Migrate to CDI Task ID:
- Upon failure, scripted tool exits by printing API response and "Migration failed, check the API response
- Scripted tool check the task status by every minute interval and outputs the migration status until the task status is either "SUCCESS" of "FAILURE"
- If SUCCESS, scripted tool succeeds by output "Migrate to CDI status SUCCESS for task "
- If FAILURE, scripted tool exits by output "Migrate to CDI status FAILURE for task "
The cloud-director-service-migration project team welcomes contributions from the community. Before you start working with cloud-director-service-migration, please read our Developer Certificate of Origin. All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch. For more detailed information, refer to CONTRIBUTING.md.
Refer LICENSE