Resolving Migration Issues

Problem

A migration project fails with the following message:

The following resources from the <subscription_id> must be unprovisioned or merged prior to migration:

(<resource type ID>, <resource type name>, <resource class ID>)

...

(<resource type ID>, <resource type name>, <resource class ID>)

Solution

This occurs when the migration runs across a subscription that contains more resource types based on the same resource class than the target service template has, and the usage of these resource types is non-zero. A possible solution would be to merge the resource types based on the MySQL databases resource class in the source subscription. To do this, run a script as shown in the example below:

/opt/oa-migrator/lib/lshng_migrator/merge-resources.py --subscription-id <subscription_id> --rt-id <resource_type_id> --merge-to <destination_resource_type_id>

where:

<subscription_id> - the ID of the subscription from the migration script's message;

<resource_type_id> - the ID of the resource type from the migration script's message to merge;

<destination_resource_type_id> - the ID of the resource type from the migration script's message to merge with.

Alternatively, you can equalize the amounts of resources in the source subscription and target service template by unprovisioning extra resources from the source subscription. When done, you need to re-run the migration.