VMware introduced the provision of the migration instrument emigrate an on-prem VMware Cloud Director deployment to VMware Cloud Director service in November 2022.
This weblog will exhibit how you can carry out a migration of an on-prem VMware Cloud Director deployment to VMware Cloud Director service utilizing the migration instrument supplied by VMware, as defined within the documentation How Do I Migrate from On-premises VMware Cloud Director to VMware Cloud Director service by Using the Migration Tool.
An overview of the steps required is:
- Setup the necessities to run the migration instrument if this will likely be carried out from a Windows machine
- Create a migration.properties file to learn into the migration instrument
- Run the migration instrument (obtain the most recent model from https://github.com/vmware-samples/cloud-director-service-migration and extract to the host you’ll carry out the migration from
Prerequisites:
Before operating the migration instrument, you will want to put in the required packages for Linux or on Windows, use a shell akin to cygwin to run the instrument. The beneath directions exhibit the migration instrument on Windows utilizing cygwin. For a full record of the migration instrument necessities, see Migration Tool Prerequisites.
For cygwin set up curl, jq, zip, ssh, scp, sshpass, and md5sum.
Create a Migration Properties File
You should not have to create the migration.properties file to do a migration, nevertheless it makes it simpler to see the information in a file, and if it’s important to rerun the script for any cause, you don’t should maintain retyping the identical data in.
For cygwin, within the default location when opening it, CD to /tmp and create the file known as migration.properties. File within the following keys and their corresponding values:
- SITE_NAME – that is the VMware Cloud Director website identify that will likely be migrated, akin to vcd-site1
- SITE_ADMIN_USERNAME – this is able to typically be the administrator account
- IS_APPLIANCE – tells the instrument whether or not the VMware Cloud Director is an equipment deployment
- CSP_ORG_ID – that is the lengthy org ID of your group within the VMware portal. For extra data on how you can discover this data, see
- CSP_ORG_REFRESH_TOKEN – that is the token generated within the VMware portal to make use of for operating duties akin to associations, migrations, and different features. For extra data, see How Do I Generate an API Token.
- CELL_USERNAME – this is able to typically be root
- DBHOST_USERNAME – this is able to typically be root
Here is an instance of a migration.properties file crammed out.
SITE_NAME=vcd–01a.corp.native SITE_ADMIN_USERNAME=administrator IS_APPLIANCE=true CSP_ORG_ID=abcdef–ghjk–1234–5678–abcdef CSP_ORG_REFRESH_TOKEN=12345678910 CELL_USERNAME=root DBHOST_USERNAME=root |
Note that in case your VMware Cloud Director occasion just isn’t publicly obtainable, akin to a lab occasion for dev/check/UAT, you will want so as to add one further line to the migration.properties file. The migration instrument connects to VCD to confirm the model earlier than trying a migration and does so by connecting to the general public DNS identify listed within the migration.properties file, so if it isn’t publicly obtainable, add the road beneath with the potential values within the hyperlink. You might want to substitute model with the main model quantity being migrated, akin to 10.3, 10.4, and many others.
UPGRADE_CATEGORY=release-model:manufacturing
Below is an instance of my crammed out migration.properties file with UPGRADE_CATEGORY added because the VCD occasion just isn’t publicly obtainable.
If you run the migration script and it fails for any cause previous the purpose the place it begins studying within the migration.properties file, you will want to open the properties file and re-add the road for UPGRADE_CATEGORY as it is going to be eliminated.
Once the migration.properties file has been accomplished, reserve it and open your cygwin bash or which ever bash you might be utilizing. Navigate to the folder that the migration instrument was extracted to and run the script by operating ./migrate.sh.
The script will immediate you line by line to simply accept the values that have been entered within the migration.properties file, or if the file doesn’t exist, you will want to manually enter the data when prompted.
- Migration properties file discovered, want to reuse. Enter y to learn within the entries from the properties file.
- On-prem VCD website FQDN identify (discovered: name_from_file). Enter y to make use of the worth from the properties file.
- On-prem VCD admin person identify (discovered: admin_user). Enter y to make use of the worth from the properties file.
- Enter admin password for for on-prem VCD website name_from_file. Enter the password for the admin account specified to connect with VCD.
- Is VCD name_from_file equipment primarily based? Enter y to specify it’s an equipment primarily based VCD.
- Username for cell name_from_file discovered. Enter y to make use of the person specified within the file.
- Enter password for cell name_from_file. Enter the password the account specified to connect with the VCD equipment.
- CSP ORG ID discovered csp_org_from_file. Enter y to make use of the org id specified within the file.
- CSP ORG refresh token discovered token_from_file. Enter y to make use of the CSP org token specified within the file.
- Enter CDI Name emigrate: This would be the identify of the CDS occasion within the VMware portal. Enter the identify you would like the CDS to be known as. Note that this would be the website identify inside VCD as properly.
In the display shot beneath, you may see that you’ll want to reply every questions per line.
The migration instrument will gather the database data from the VCD database cell, add it to an S3 bucket, create the CDS occasion and import the database dump to the brand new occasion. You can see within the display shot above on the final line within the backside purple field that it’s dumping the database from vcd-01a.corp.native to organize to add it to an S3 bucket.
Once the database dump has accomplished, the script will add the recordsdata to an S3 bucket to be imported to create the CDS occasion. In the display shot beneath, the highest purple field exhibits that the recordsdata have been collected, then efficiently uploaded. The backside purple field exhibits that VMware Cloud Director on prem equipment that’s being migrated is put into upkeep mode to keep away from adjustments within the configuration between the migration and the CDS occasion coming on-line.
You ought to now see the CDS occasion that was migrated with the identify supplied through the migration.