VMware Aria Automation 8.18.1
The error occurrs when resource names within the scope of the deployment are not unique. For example networks with duplicate names across vCenters are attempted to be imported into the same deployment object.
To resolve the issue you can skip the importing of the relevant network resources by onboarding via the API and leveraging the EXCLUDE_NETWORK_ONBOARDING property. Creating the onboarding plan vai api allows us to specify multiple endpoint ids
1. Get compute links for the machines (you'll need these as input):GET https://{{vRAHost}}/iaas/api/machines?$filter=name eq '<machine-name>'
The selfLink in each result is the resourceLink (e.g., /resources/compute/{uuid}).
2. Create the onboarding plan with multiple endpoint IDs:POST https://{{vRAHost}}/relocation/onboarding/planAuthorization: Bearer {{token}}Content-Type: application/json
{ "name": "migration-plan-no-network", "projectId": "<project-uuid>", "endpointIds": ["<vcenter1-endpoint-uuid>", "<vcenter2-endpoint-uuid>"]}
Save the returned documentSelfLink — this is your planLink (e.g., /relocation/onboarding/plan/{plan-uuid}).
3. Create deployments with machines (This step can also be completed via UI now that the onboarding plan is created with multiple endpoint ids):POST https://{{vRAHost}}/relocation/onboarding/task/create-deploymentAuthorization: Bearer {{token}}Content-Type: application/json
{
"planLink": "/relocation/onboarding/plan/<plan-uuid>",
"name": "<deployment-name>",
"resources": [
{"link": "/resources/compute/<machine-uuid-1>", "name": "<vm-name-1>"},
{"link": "/resources/compute/<machine-uuid-2>", "name": "<vm-name-2>"}
]
}
Repeat for each deployment grouping.
4. Query the created resources (to get their UUIDs):GET https://{{vRAHost}}/relocation/onboarding/resource?expand=true&$filter=deploymentLink eq '/relocation/onboarding/deployment/<dep-uuid>'Authorization: Bearer {{token}}
5. PATCH each machine resource to include the EXCLUDE_NETWORK_ONBOARDING property:
PATCH https://{{vRAHost}}/relocation/onboarding/resource/<resource-uuid>
Authorization: Bearer {{token}}
Content-Type: application/json
{
"options": ["EXCLUDE_NETWORK_ONBOARDING"]
}
6. Execute the onboarding plan:POST https://{{vRAHost}}/relocation/api/wo/execute-planAuthorization: Bearer {{token}}Content-Type: application/json
{ "planLink": "/relocation/onboarding/plan/<plan-uuid>"}