Import Products using the vRealize Suite Lifecycle Manager API

You can import additional products into an existing environment that has been configured with product binaries, licenses, and certificates.

You use the Environment API to import products. The Environment API also includes calls to deploy, update, scale out, and delete environments. For property definitions used in the calls, see Properties for Environment Operations.

This procedure shows how to import vRealize Operations Manager. The import procedure is the same for all products, but the request payload varies. For other request payloads, see Request Body Examples for Product Import.

By including the payload for other products in the same environment request, you can use a single command to:
  • Import multiple products.
  • Import and install multiple products.

Prerequisites

Procedure

  1. Import vRealize Operations Manager.
    curl -X POST \
      '$url/lcm/lcops/api/v2/environments' \
      -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \
      -H 'Content-Type: application/json' \
      -d '{
         "environmentName": "vrops_import_env",
         "infrastructure": {
          "properties": {
            "dataCenterVmid": "ee6ce426-ca13-4e56-ad9e-c34a4d3d90c2",
            "regionName": "default",
            "zoneName": "default",
            "vCenterName": "",
            "vCenterHost": "",
            "vcUsername": "",
            "vcPassword": "",
            "acceptEULA": "false",
            "enableTelemetry": "true",
            "adminEmail": "[email protected]",
            "defaultPassword": "",
            "certificate": "",
            "cluster": "",
            "storage": "",
            "folderName": "",
            "resourcePool": "",
            "diskMode": "",
            "network": "",
            "masterVidmEnabled": "false",
            "dns": "",
            "domain": "",
            "gateway": "",
            "netmask": "",
            "searchpath": "",
            "timeSyncMode": "host",
            "ntp": "",
            "isDhcp": "false"
          }
        },
        "products": [
          {
            "id": "vrops",
            "version": "8.0.1",
            "properties": {
              "vropsMasterNodeIP": "10.196.57.68",
             "vCenterList": "[
               {
                 "vCenterHost":"vc1.sqa.local",
                 "vcUsername":"[email protected]",
                 "vcPassword":"locker:password:ad82417e-ebc1-46ed-860f-a28110e15bbf:vc1pwd"
               },
               {
                 "vCenterHost":"vc2.sqa.local",
                 "vcUsername":"[email protected]",
                 "vcPassword":"locker:password:77cd2f8b-91cb-493b-97de-74faf531710f:vc2pwd"
               },
               {
                 "vCenterHost":\"vc3.sqa.local",
                 "vcUsername":"[email protected]",
                 "vcPassword":"locker:password:d308d033-03fb-45eb-a3a7-f37d8e83908c:vc3pwd"
               }
             ]",
              "vropsAdminPassword": "locker:password:81fb3628-bdad-c6032ee9c5bb:VMware1!",
              "rootPassword": "locker:password:1fb3628-bdad-41d9-af91-c5bb:VMware1!",
              "isImport": "true"
            },
            "clusterVIP": {
              "clusterVips": []
            },
            "nodes": []
          }
        ]  
      }' | jq "."
    The request triggers the API. The response shows the request ID.
    {
        "requestId":"1dac194a-6e1f-4772-a97d-af300ad5086c"
    }
  2. Track your request.
    curl -X GET '$url /lcm/request/api/v2/requests/$requestId' -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' | jq "."
    The request might take some time. After completion, the product is imported in vRealize Suite Lifecycle Manager.
    ...
    },
      "outputMap": {},
      "state": "COMPLETED",
      "executionId": "61274f3c-20cc-47a1-90ec-130635edb7d1",
    ...
  3. To verify that vRealize Operations Manager has been imported, list all environments.
    curl -X GET '$url/lcm/lcops/api/v2/environments' -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' | jq "."
    A snippet of the response shows the vRealize Operations Manager product that you imported.
          {
            "id": "vrops",
            "version": "8.0.1",
            "patchHistory": null,
            "snapshotHistory": null,
            "logHistory": null,
            "clusterVIP": null,
            "nodes": [
              {
                "type": "remotecollector",
                "properties": {
                  "vmName": "vrops-remotecollector",
                  "hostName": "sqa.local",
                  "deployOption": "smallrc",
                  "ip": "4.4.4.4",
                  "gateway": "2.2.2.2",
                  "domain": "2.2.2.2",
                  "searchpath": "2.2.2.2",
                  "dns": "10.141.66.213",
                  "netmask": "2.2.2.2",
                  "extendedStorage": "",
                  "timeZone": "",
                  "ntp": "",
                  "vCenterHost": "lcm-vc1.sqa.local",
                  "cluster": "Datacenter-01#Cluster-01",
                  "resourcePool": "",
                  "folderName": "",
                  "network": "dvs-55-Network-314b11d9-c958-4aa2-af98-cd5439a970d7",
                  "storage": "ISCSI-15TB-02",
                  "diskMode": "thin",
                  "contentLibraryItemId": "",
                  "vCenterName": "lcm-vc1",
                  "vcUsername": "[email protected]",
                  "vcPassword": "locker:password:4984d8e4-825b-4694-99cf-db80b41b5ac2:vc-password"
                }
              },
              {
                "type": "master",
                "properties": {
                  "vmName": "mastervmname",
                  "hostName": "lcm-12-33.sqa.local",
                  "ip": "10.196.12.33"
                }
              },
              {
                "type": "replica",
                "properties": {
                  "vmName": "replicavmname",
                  "hostName": "lcm-12-34.sqa.local",
                  "ip": "10.196.12.34"
                }
              },
              {
                "type": "data",
                "properties": {
                  "vmName": "datavmname",
                  "hostName": "lcm-12-35.sqa.local",
                  "ip": "10.196.12.35"
                }
              }
            ] 
          }
        ],      
        "properties": {
            "licenseRef": "locker:license:eab62-bc21-643cf0b9cafa:license",
            "certificate": "locker:certificate:f4e98b983:vmware",
            "productPassword": "locker:password:d21-d9de2c10:VMware1!",
            "disableTls": "",
            "timeSyncMode": "ntp",
            "masterVidmEnabled": false,
            "ntp": "ntp1.eng.vmware.com",
            "affinityRule": false,
            "configureAffinitySeparateAll": "true",
            "deployOption": "large"
          },

What to do next

If the deployment request succeeds, the product is imported. However, if the deployment request fails, diagnose the problem before retrying your request. See Retry an Install or Import Request vRealize Suite Lifecycle Manager API.