Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Onboarding existing Azure VMs


This topic describes how to use the BMC Cloud Lifecycle Management QuickStart and REST API to onboard existing Azure VMs. This topic includes the following sections:


Overview of the onboard process

BMC Cloud Lifecycle Management QuickStart and REST API capability lets you identify existing virtual machines (VMs) in the Microsoft Azure portal and import them into BMC Cloud Lifecycle Management so they each become a service offering instance (SOI). During this process, you identify a tenant and user who function as the owner of the SOIs, and you provide information about the service you want to associate with the Azure VMs. 

Information

For onboarding existing Azure VMs using the Quickstart utility, see Onboarding-existing-VMs. For details on using the Quickstart utility, see Using-Quick-Start.

You onboard existing virtual machines (VMs) by using the ServiceOfferingInstance onboard request. Before you onboard an existing VM, you must ensure that the VM is enrolled in BMC Server Automation and complies with the constraints of the onboard request.

The following checklist can help you ensure that the VM is set up correctly in BMC Server Automation and that the input parameters for the API request are correct.

Limitations and preconditions for onboarding an Azure VM

Note the following limitations when onboarding an Azure Service Manager VM:

  • You can onboard an Azure VM of Standard tier only because the current release does not support the Basic tier Azure VM onboarding. See Microsoft Azure Virtual Machines Pricing for Standard and Basic tier details of compute instances.
  • Cloud service having more than one VM cannot be onboarded.
  • VMs created in an Azure region cannot be onboarded; only the VMs created in Affinity Groups or Virtual Networks in Azure can be onboarded.
  • You may expect incorrect quota calculations after performing Add Server TRO operation on an onboarded VM, if the PDC entry specified in the service blueprint mismatches with the OS image of the onboarded VM or is not available in the Azure cloud.

    Note

    If the PDC entry specified in the service blueprint mismatches with the OS image of the onboarded VM, then  Add Server TRO operation on an onboarded VM will add a server based on the PDC entry specified in the service blueprint and not a clone of the onboarded VM.

  • Load balancers, network path, availability sets, and pre-installed software of a VM will not be onboarded using the VM Onboard feature.

Note the following limitations when onboarding an Azure Resource Manager VM:

  • Cloud service having more than one VM cannot be onboarded. This is a limitation only from UI , REST API can still be leveraged to onboard multiple VMs.
  • Load balancers, network path, availability sets, and pre-installed software of a VM will not be onboarded using the VM Onboard feature.

    The virtual network associated to the VM must be onboarded in BMC Cloud Lifecycle Management as Logical Hosting Environment.


Note the following preconditions for onboarding an Azure VM:

✅️

Item to check

 

Is the Azure Provider registered in BMC Cloud Lifecycle Management?

 

Is the service catalog containing the service blueprint available in BMC Cloud Lifecycle Management?

 

Is the image from which the VM is created in Azure and to be onboarded available in BMC Cloud Lifecycle Management and selected in the Azure service blueprint?

 

Are the BMC Cloud Lifecycle Management tags and Service Governor correctly applied or mapped in the Azure Logical Data Center or Azure Virtual Network and the Azure service blueprint?

 

Is the VM to be onboarded based on a single-tier blueprint?

Note: The current release supports the onboarding of existing Azure VMs based on a single-tier service blueprint.

 

Is the VM to be onboarded powered on?

 

Does the service offering that you want to use for the onboard operation exist?

 

Does the logical hosting environment that you want to use for the onboard operation exist?

To determine external ID for Azure Resource Manager VM

New in 4.6.06Perform the following steps to determine the external ID for Azure Resource Manager VM:

  1. Log on to Azure portal.
  2. Click Virtual machines tab.
  3. Select the virtual machine name for which you want to determine the external ID.
  4. Click Properties.
  5. Copy the value from the Resource ID field. For example, /subscriptions/5b7f81f4-e104-4710-aeaf-3bec1e0364a2/resourceGroups/RGcustnew/providers/Microsoft.Compute/virtualMachines/test1-1

To onboard existing VMs using REST API

Complete this procedure to learn the parameters you must enter when onboarding VMs through a ServiceOfferingInstance onboard request, and how to apply the parameters when making the request.

  1. Generate Authentication Token to communicate with the BMC Platform Manager.
  2. (For Azure Resource Manager) Obtain the following details from the Azure portal:

    1. actualVMname
    2. virtualnetworkname

    (For Azure Service Manager) Obtain the following details from the Azure portal:

    1. cloudservicename
    2. deploymentname
    3. actualVMname

  3. Obtain the GUID of the Azure Provider using the BMC.CLOUD:BMC_Provider form:
  4. http://midtierHostname:portNumber/arsys/forms/BMCARSystemHostname/BMC.CLOUD:BMC_Provider
  5. Open the BMC_ConcreteCollection form at http://midtierHostname:portNumber/arsys/forms/BMCARSystemHostname/BMC.CORE:BMC_ConcreteCollection and obtain the instance ID of the container.
    This ID is used as the LogicalHostingEnvironmentID value in the ServiceOfferingInstance onboard request.
  6. Identify the tenant of the service offering instance.
    This tenant is used as the tenant value in the ServiceOfferingInstance onboard request, and can be identified in the BMC Cloud Lifecycle Management Tenant Management workspace.
  7. Identify the instance name of the service offering instance.
    This name is used as the name value in the ServiceOfferingInstance onboard request, and can be any name.
  8. Identify the owner of the service offering instance.
    This owner is used as the owner value in the ServiceOfferingInstance onboard request, and can be identified in the BMC Cloud Lifecycle Management Tenant Management workspace.
  9. Identify the reconciliationID of the service offering instance. It contains the details of the service blueprint and tags mapped to LDC. 
  10. If you are using Format 2 to onboard servers in BMC Server Automation, complete the following steps:If you are using Format 1 to onboard servers in BMC Server Automation, use the following URI  
    1. in a REST client, run an http://PlatformManagerHost:portNumber/csm/computecontainer/search request using the following body to return the ServerObject values for the VMs that you want to onboard:

      {
       "timeout": -1,
       "preCallout": "",
       "postCallout": "",
       "callbackURL": "",
       "operationParams": [
          {
           "name": "criteria",
           "type": "com.bmc.cloud.model.beans.QuerySelect",
           "multiplicity": "1",
           "value": {
             "cloudClass": "com.bmc.cloud.model.beans.QuerySelect",
             "fromClass": "com.bmc.cloud.model.beans.ComputeContainer",
             "children": [
                {
                 "operator": "AND",
                 "guid": "539bdf9c-653e-42c2-bb4a-849e8503d3e3",
                 "cloudClass": "com.bmc.cloud.model.beans.QueryLogical",
                 "children": [
                    {
                     "cloudClass": "com.bmc.cloud.model.beans.QuerySimpleCondition",
                     "children": [
                        {
                         "cloudClass": "com.bmc.cloud.model.beans.QueryPropertyReference",
                         "references": [
                           "NAME"
                          ],
                         "guid": "539bdf9c-653e-42c2-bb4a-849e8503d3e3"
                        },
                        {
                         "cloudClass": "com.bmc.cloud.model.beans.QueryLiteral",
                         "type": "java.lang.String",
                         "values": [
                           "a"
                          ],
                         "guid": "539bdf9c-653e-42c2-bb4a-849e8503d3e3"
                        }
                      ],
                     "operator": "LIKE",
                     "guid": "539bdf9c-653e-42c2-bb4a-849e8503d3e3"
                    },
                    {
                     "cloudClass": "com.bmc.cloud.model.beans.QuerySimpleCondition",
                     "children": [
                        {
                         "cloudClass": "com.bmc.cloud.model.beans.QueryPropertyReference",
                         "references": [
                           "LHE"
                          ],
                         "guid": "993d2dc3-05fb-4777-9c6d-ed0d1193bd42"
                        },
                        {
                         "cloudClass": "com.bmc.cloud.model.beans.QueryLiteral",
                         "type": "java.lang.String",
                         "values": [
                           "993d2dc3-05fb-4777-9c6d-ed0d1193bd42"
                          ],
                         "guid": "539bdf9c-653e-42c2-bb4a-849e8503d3e3"
                        }
                      ],
                     "operator": "LIKE",
                     "guid": "539bdf9c-653e-42c2-bb4a-849e8503d3e3"
                    }
                  ]
                }
              ],
             "guid": "539bdf9c-653e-42c2-bb4a-849e8503d3e3"
            }
          },
          {
           "multiplicity": "1",
           "name": "isOnboarded",
           "value": false,
           "type": "java.lang.Boolean"
          },
          {
           "multiplicity": "1",
           "name": "providerURI",
           "value": "/provider/1c870e3e-e44c-44be-89be-5d47f518c5c0",
           "type": "java.lang.String"
          },
          {
           "name": "orderBy",
           "value": "guid",
           "type": "java.lang.String",
           "multiplicity": "1"
          },
          {
           "name": "pageSize",
           "value": 1000,
           "type": "java.lang.Integer",
           "multiplicity": "1"
          },
          {
           "name": "pageNo",
           "value": 0,
           "type": "java.lang.Integer",
           "multiplicity": "1"
          }
        ]


      The [expand] macro is a standalone macro and it cannot be used inline.

    2. Copy the ServerObject data from the output and replace that information in the Format 1 json file, as shown in ServiceOfferingInstance-onboard-request.

      Note

      You might need to modify some data from the output before copying the output. See the comments in the example output for details.

To validate onboarded VMs

  1. Navigate to the My Services Console and click the Services tab to view the resource details of the cloud service for the onboarded VM, as shown in the following figure:

    QSAzVM9.png
  2. Click the Servers tab and select the onboarded VM to view the details, as shown in the following figure:

    QSAzVM10.png

Related topics

Onboarding-existing-VMs

Onboarding-existing-VMs-checklist

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*