How to Migrate PCF to a New Datastore in vSphere
Page last updated:
This topic describes how to migrate your Pivotal Cloud Foundry (PCF) installation to a new vSphere datastore.
Both the new and existing vSphere datastores must reside in the same datacenter and resource pool.
To avoid service disruption, Pivotal recommends that you configure your overall PCF deployment for high availability. In addition, check for configurations necessary to achieve high availability in each of your installed product tiles.
If your environment has any single points of failure, service may be disrupted as a result of the migration.
This section describes the steps you should perform prior to the migration.
Ensure that your PCF environment is fully backed up.
For more information about how to backup PCF, see Backing up Pivotal Cloud Foundry.
Document your current environment settings before proceeding with the datastore migration. Record which VMs are running and in which datastore they reside. If you experience any issues during or after the migration, you must have this information to restore your environment.
To obtain this information, perform the following steps:
- Run the following command.
$ bosh instances --details > instances.txt
- Save the resulting file
instances.txtto a safe location.
- Note the datastore where each VM resides in vSphere.
The default timeout for the BOSH CPI is 60 minutes. When performing a datastore migration, BOSH must copy all of the data from the old disks to the new disks within this time limit. In general, most copy operations should fit within this time limit, but it ultimately depends on the hardware in your deployment and the size of your existing persistent disks.
To determine whether 60 minutes is sufficient for the datastore migration, estimate how long it takes to copy 100 GB of data. Then, based on the size of your persistent disks, determine whether 60 minutes is sufficient time to copy that amount of data.
If you have previously encountered
out of sync errors when modifying your PCF deployment, you should increase the timeout value of the CPI before migrating the datastores.
To modify the default BOSH CPI timeout, follow the instructions in the following KB article.
For more information about resolving the error after migrating your datastore, see After the Migration.
In Elastic Runtime, check the Status tab and make sure there are no errors or reported issues.
In each tile installed in your PCF deployment, check the Status tab and make sure there are no errors or reported issues.
- Check that there are no pending changes and that the status of all tiles is green.
- Make sure the last Installation Log does not contain any errors.
- Before proceeding with the migration, click Apply Changes to make sure there are no errors in the Installation Log.
- In Ops Manager Director, navigate to the vCenter Config page.
- Update the Ephemeral Datastore Names and Persistent Datastore Names field to reflect the new datastore names, then click Save.
Note: If you use the Datastore Clustering feature in vSphere, provide only the individual names of the datastores in the cluster. Do not provide the name of the cluster that contains them.
- Click Apply Changes.
- Confirm that the Ops Manager Director VM has persistent disk on the new datastore.
- Navigate to vCenter Resource Pools and select the Resource Pool that contains your PCF deployment VMs and new datastore.
- Click the Related Objects and Virtual Machines.
- Locate the Ops Manager VM and verify that the VM has an expected value in the Provisioned Space column.
- In Ops Manager Director, navigate to the Director Config page, and select the Recreate all VMs option.
- Click Apply Changes.
When BOSH moves disks, it waits for up to 60 minutes for the operation to complete. If the operation does not complete in time, BOSH can enter a state where it claims that the disks are
out of sync.
If your PCF deployment gets into this state, you can resolve the issue by performing the steps in the following KB article:
You can also prevent the
out of sync BOSH error by increasing the CPI timeout to a larger value before performing the migration. Follow the instructions in the following KB article.