When creating an onboarding plan, you can attach an existing VMware cloud template (VCT) to the deployment. The cloud template allows you to iteratively update the deployment and avoid the need to delete onboarded resources and create new ones while gradually scaling out your deployment.

With a cloud template attached to your deployment, you can run all day 2 actions including the Update day 2 action provided that the YAML of the selected cloud template accepts user input.
Note: You can choose any cloud template but depending on the cloud template details, an Update day 2 action might delete and re-create original resources.

By attaching a cloud template with resource mapping, you can create an onboarding deployment that maps VMs to template resources in the same way as the deployment that was originally provisioned in VMware Aria Automation using the same cloud template. The only restriction is that the onboarding deployment must have the same number of machines as the selected cloud template and the admin must specify the VM to template resource mapping.

A deployment that uses a cloud template with resource mapping includes the Update day 2 action if the selected template accepts user input and the update only applies changes to existing resources. It will not re-create the original resources unless there are major changes between the current version of cloud template and original deployment. Onboarded deployments can also be iteratively updated without deletion and re-creation of the onboarded machines.

Prerequisites for adding deployments with a cloud template

  • Verify that all general prerequisites and prerequisites for the Onboarding service have been satisfied. See Prerequisites for API Use Case Examples.
  • Verify that you have the planLink for an existing onboarding plan. For example, to list onboarding plans use GET /relocation/api/onboarding/plan. See Onboard machines as a single deployment.
  • Verify that you have the IDs and names of the resources that you are planning to onboard. For example, to list unmanaged machines, use POST /relocation/api/wo/query-unmanaged-machine. See Onboard machines as a single deployment.
  • Verify that the VMware cloud template that you plan to attach exists. For example, to list cloud templates use GET /blueprint/api/blueprints. See Create and Update a Cloud Template.
  • If adding a cloud template with mapping, verify that you have the correct template component name to link to each machine. For example:
    • To get template component names, use GET /blueprint/api/blueprints/<blueprint_id> where blueprint_id is the ID for your cloud template. In the response, the blueprint content field lists the machine component names.
    • To list unmanaged machines, use POST /relocation/api/wo/query-unmanaged-machine.
Example payloads include the following input:
  • planLink for existing onboarding plan
    "planLink": "/relocation/onboarding/plan/d2010bcd-34f6-4fac-9d67-f7f4c6ec686a"
  • Template to attach if onboarding with template but without mapping
    "name": "singleMachines"
    "link": "/blueprint/api/blueprints/b79612a9-6e2f-4b48-a775-88eb7676dc2c"
  • Template to attach if onboarding with template and with mapping
          "template": {
            "name": "vc01",
            "link": "/blueprint/api/blueprints/74bbcdae-b945-4a95-ac86-8bed0a75e2c2",
            "components": {
              "/resources/compute/bf07d26a-38cd-392e-b3d6-0004cf36168a": "Cloud_vSphere_Machine_1",
              "/resources/compute/cc628c21-5531-414d-a09e-5f35916ce689": "Cloud_vSphere_Machine_2"
            }

How do I add a deployment with a cloud template

The following example adds a deployment with the template singleMachine to bring the VMs East-centos-small-000011 and est under management.

curl -X POST \
    $url/relocation/onboarding/task/create-deployment-bulk \
    -H "Authorization: Bearer $access_token" \
    -H 'Content-Type: application/json' \
    -d '{
       "deployments": [
         {
           "resources": [
             {
               "link": "/resources/compute/b82870f1-575b-308b-ac2e-874fad85703b",
               "name": "East-centos-small-000011",
               "tagLinks": []
             },
             {
               "link": "/resources/compute/e12fefb6-2d0a-3ee1-bb7f-1ceceb3d1ca6",
               "name": "est",
               "tagLinks": []
             }
           ]
           "template": {
             "name": "singleMachine",
             "link": "/blueprint/api/blueprints/b79612a9-6e2f-4b48-a775-88eb7676dc2c"
           }
         }
       ],
       "planLink": "/relocation/onboarding/plan/d2010bcd-34f6-4fac-9d67-f7f4c6ec686a"
}' | jq "."

How do I add a deployment with a cloud template and mapping

The following example adds a deployment with the template vc01 to bring:
  • VMs VM-20 and VM-21 under management with:
    • VM-20 mapped to Cloud_vSphere_Machine_1 in the template.
    • VM-21 mapped to Cloud_vSphere_Machine_2 in the template.
  • VMs VM-0014 and VM-0015 under management with:
    • VM-0014 mapped to Cloud_vSphere_Machine_1 in the template.
    • VM-0015 mapped to Cloud_vSphere_Machine_2 in the template.
curl -X POST \
    $url/relocation/onboarding/task/create-deployment-bulk \
    -H "Authorization: Bearer $access_token" \
    -H 'Content-Type: application/json' \
    -d '{
       "deployments": [
         {
       "template": {
         "name": "vc01",
         "link": "/blueprint/api/blueprints/74bbcdae-b945-4a95-ac86-8bed0a75e2c2",
         "components": {
           "/resources/compute/bf07d26a-38cd-392e-b3d6-0004cf36168a": "Cloud_vSphere_Machine_1",
           "/resources/compute/cc628c21-5531-414d-a09e-5f35916ce689": "Cloud_vSphere_Machine_2"
         }
       },
       "resources": [
         {
           "link": "/resources/compute/bf07d26a-38cd-392e-b3d6-0004cf36168a",
           "name": "VM-20",
           "tagLinks": []
         },
         {
           "link": "/resources/compute/cc628c21-5531-414d-a09e-5f35916ce689",
           "name": "VM-21",
           "tagLinks": []
         }
       ]
     },
     {
       "template": {
         "name": "vc01",
         "link": "/blueprint/api/blueprints/74bbcdae-b945-4a95-ac86-8bed0a75e2c2",
         "components": {
           "/resources/compute/2ce64191-867e-3bb2-9017-6f5aa5d3a3c2": "Cloud_vSphere_Machine_1",
           "/resources/compute/c4f46940-e4e1-45fb-bd30-58794398a50c": "Cloud_vSphere_Machine_2"
         }
       },
       "resources": [
         {
           "link": "/resources/compute/2ce64191-867e-3bb2-9017-6f5aa5d3a3c2",
           "name": "VM-0014",
           "tagLinks": []
         },
         {
           "link": "/resources/compute/c4f46940-e4e1-45fb-bd30-58794398a50c",
           "name": "VM-0015",
           "tagLinks": []
         }
       ]
     }
   ],
   "planLink": "/relocation/onboarding/plan/d2010bcd-34f6-4fac-9d67-f7f4c6ec686a"
}' | jq "."