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
- Limitations and preconditions for onboarding an Azure VM
- To determine external ID for Azure Resource Manager VM
- To onboard existing VMs using REST API
- To validate onboarded VMs
- Related topics
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.
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.
- 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.
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:
- Log on to Azure portal.
- Click Virtual machines tab.
- Select the virtual machine name for which you want to determine the external ID.
- Click Properties.
- 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.
- Generate Authentication Token to communicate with the BMC Platform Manager.
(For Azure Resource Manager) Obtain the following details from the Azure portal:
- actualVMname
- virtualnetworkname
(For Azure Service Manager) Obtain the following details from the Azure portal:
- cloudservicename
- deploymentname
- actualVMname
- Obtain the GUID of the Azure Provider using the BMC.CLOUD:BMC_Provider form:
- http://midtierHostname:portNumber/arsys/forms/BMCARSystemHostname/BMC.CLOUD:BMC_Provider
- 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. - 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. - 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. - 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. - Identify the reconciliationID of the service offering instance. It contains the details of the service blueprint and tags mapped to LDC.
- 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
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.
Copy the ServerObject data from the output and replace that information in the Format 1 json file, as shown in ServiceOfferingInstance-onboard-request.
To validate onboarded VMs
- 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:
- Click the Servers tab and select the onboarded VM to view the details, as shown in the following figure:
Related topics