You can use the VMware Cloud Director service migration tool to migrate your on-premises VMware Cloud Director installation to VMware Cloud Director service.
Use the migration tool to seamlessly migrate to VMware Cloud Director service while keeping your SDDC resources on-premises. After a successful migration, use VMware Cloud Director service to manage your on-premises SDDC resources.
SITE_NAME=migration.eng.example.com SITE_ADMIN_USERNAME=administrator IS_APPLIANCE=true/false CSP_ORG_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx CSP_ORG_REFRESH_TOKEN=API Token CELL_USERNAME=root DBHOST_USERNAME=root
During the migration, the migration tool prompts you to choose whether to use the values from the file, or to enter custom value for each parameter. If you choose not to create the migration.properties file before the migration, the migration tool creates it and populates it with the values that you enter during the migration. You can then reuse the file for subsequent migrations.
Source on-premises environment version | VMware Cloud Director service Migration Support |
---|---|
VMware Cloud Director 10.3.3 | VMware Cloud Director service (10.3.3) |
VMware Cloud Director 10.4 | VMware Cloud Director service (10.4) |
VMware Cloud Director 10.4.1 | VMware Cloud Director service (10.4.1) |
Prerequisites
- To be able to check the compatibility between your on-premises VMware Cloud Director environment and VMware Cloud Director service, verify that the load balancer that is in front of your on-premises installation is publicly accessible.
- Reach out to VMware support to verify that your VMware Cloud organization supports the migration. See How Do I File a VMware Cloud Director service Migration Support Request.
- Verify that you installed
curl
,jq
,zip
,ssh
,scp
,sshpass
andmd5sum
support packages on the host from which you plan to run the migration. - Obtain the VMware Cloud Director hostname, the administrator user name for it, and the administrator password.
- Make a note of on-premises VMware Cloud Director deployment type - appliance or Linux-based.
- If you are using an appliance deployment, make note of the primary and the cell OS credentials.
- If you are using a Linux deployment, make note of the active cell OS credentials and of the external database host OS credentials.
- Generate a VMware Cloud API token and save the token credentials. The scope of the token must contains the Administrator and NSX Cloud Admin service roles, as well as the Developer or the Organization Owner organization role. See How Do I Generate an API Token.
- Verify that migration is supported for the VMware Cloud Director configuration that you are using. See Limitations to VMware Cloud Director to VMware Cloud Director service migration.
- Verify that your on-premises configuration matches the scale maximums supported by VMware Cloud Director service. See Configuration Maximums for VMware Cloud Director Service.
- Download the migration script from https://github.com/vmware-samples/cloud-director-service-migration to the host from which you plan to run it.
Procedure
Example: Migration to VMware Cloud Director service
SITE_NAME=migration.eng.example.com SITE_ADMIN_USERNAME=administrator IS_APPLIANCE=false CSP_ORG_ID=11111111-2222-3333-4444-555555555555 CSP_ORG_REFRESH_TOKEN=Ab4XdNsdMeNFVSHA8q3ze8ebR0t4Hik7lSs6DZJTFoF_wcQaTWw7U6O8ZLk6j4IM CELL_USERNAME=root DBHOST_USERNAME=root
Run the command to start the migration tool.
sh migrate.sh
The tool prompts you to choose whether to use the migration.properties file and to provide additional input at some steps.
Migration Input properties file present, wish to reuse [y/n]: y Script will reuse the input values located in /tmp/migration.properties Site FQDN name (found: migration.eng.example.com), wish to reuse [y/n]: y Site admin user name (found: administrator), wish to reuse [y/n]: y Enter admin password for on-prem VCD site migration.eng.example.com: xxxxx Successfully collected administrator credentials for migration.eng.example.com Is migration.eng.example.com appliance based (found: false), wish to reuse [y/n]: y Found active Cell: migration-vcd1.eng.example.com Username for cell migration-vcd1.eng.example.com (found: root), wish to reuse [y/n]: y Enter password for cell migration-vcd1.eng.example.com: xxxxxx Successfully collected root credentials for migration-vcd1.eng.example.com Successfully downloaded responses.properties from migration-vcd1.eng.example.com Found Database HOSTNAME: migration-db.eng.example.com Found Database Name: vcloud Username for DB Host migration-db.eng.example.com (found: root), wish to reuse [y/n]: y Enter password for DB Host migration-db.eng.example.com: xxxxx Successfully collected root credentials for migration-db.eng.example.com CSP ORG ID (found: 11111111-2222-3333-4444-555555555555), wish to reuse [y/n]: y CSP ORG refresh Token (found: Ab4XdNsdMeNFVSHA8q3ze8ebR0t4Hik7lSs6DZJTFoF_wcQaTWw7U6O8ZLk6j4IM), wish to reuse [y/n]: y Retrieving list of environments associated for org: 11111111-2222-3333-4444-555555555555 Found following 4 environments in org: 11111111-2222-3333-4444-555555555555 US West - Oregon (66666) Australia - Sydney (77777) Europe - Germany (88888) Asia - Japan (99999) Select environment for CDI migration: values (1-5)] : 1 Selected Environment: US West - Oregon (66666) Compatibility Check Succeeded, found upgrade category: release-10.3:production Successfully collected all required resources from migration.eng.example.com for migration Enter CDI Name to migrate: MigratedInstance Uploading collected resources from migration.eng.example.com for migration Upload Resource Task URN: urn:vcdc:task:99999999-8888-7777-6666-555555555555 Setting up maintenance mode on all cloud cells Entering maintenance mode on migration-vcd1.eng.example.com Successfully entered maintenance mode. Successfully entered maintenance mode on migration-vcd1.eng.example.com Entering maintenance mode on migration-vcd2.eng.example.com Successfully entered maintenance mode. Successfully entered maintenance mode on migration-vcd2.eng.example.com Entering maintenance mode on migration-vcd3.eng.example.com Successfully entered maintenance mode. Successfully entered maintenance mode on migration-vcd3.eng.example.com Successfully entered maintenance mode on all cloud cells Migrate to CDI Task ID: urn:vcdc:task:888888888-7777-6666-5555-4444444444444 Migrate to CDI task run status: IN_PROGRESS - Deploying instance Migrate to CDI task run status: IN_PROGRESS - Waiting for service to be available Migrate to CDI task run status: IN_PROGRESS - Backup VMware Cloud Director database schema Migrate to CDI task run status: IN_PROGRESS - Waiting for all cells to be ready Migrate to CDI task run status: IN_PROGRESS - Creating groups in system org Migrate to CDI task run status: IN_PROGRESS - Integrating VCD micrometer metrics with Wavefront Migrate to CDI task run status: SUCCESS - Migrate to CDI status SUCCESS for task urn:vcdc:task:888888888-7777-6666-5555-4444444444444