Automating the creation of virtual machines and storage accounts
Before you begin
Make sure that an administrator has configured the Microsoft Azure connector.
Create VM element properties
A Create VM element creates a virtual machine in Microsoft Azure.
The following video (2:49) explains how to automate the task of creating a virtual machine in Microsoft Azure:
The following table describes the Create VM input properties:
Property | Description |
---|---|
Connection ID | Connection ID of the Microsoft Azure connector. |
User Name | User login name for the virtual machine that you want to create. |
Password | Password for the virtual machine. The password can be 8 to 123 characters long, and must meet any three of the following requirements:
|
Vm Name | Name of the virtual machine. The value must be 1 to 15 characters with no special characters. |
(Optional) Region | Name of the region in which you want to create the virtual machine. If you do not specify a region, the region configured in the Azure connector is used. For information about supported regions, see Microsoft Azure regions. |
Resource Group | Name of the resource group to which the virtual machine belongs. |
Vm Size | Size of the virtual machine. |
Primary Network | Network address space of the virtual machine. |
Os Type | External ID of a service imported from the Microsoft Azure that is mapped to the process. Important:
|
USER_BY | Login name of the virtual machine requestor. |
(Optional) Is Existing Resource Group | This value specifies whether the virtual machine belongs to an existing resource group. You can specify the value as True or False. Important: If you specify the Is Existing Resource Group as True, you must also specify the Existing Primary Network Resource Group, Existing Primary Network Name, and Existing Primary Network Subnet values. |
(Optional) Is Existing Group | This value specifies whether the virtual machine belongs to an existing resource group. You can specify the value as True or False. |
(Optional) Existing Primary Network Resource Group | Name of the resource group of primary network that you want to use. |
(Optional) Existing Primary Network Name | Name of the existing network that you want to add to the virtual machine. |
(Optional) Existing Primary Network Subnet | Name of the associated virtual network subnet. |
(Optional) Existing Primary Network Interface Resource Group | Name of the resource group of the network interface that you want to use. Important: If you specify the Existing Primary Network Interface Resource Group value, you must also specify the Existing Primary Network Interface Name value. |
(Optional) Existing Primary Network Interface Name | Name of the network interface that connects the IP address with the network. |
(Optional) Image Publisher | Name of the organization that provides a virtual machine image in the Azure Marketplace, that you want to use. |
(Optional) Image Offer | Name of a group of related images created by the image publisher. |
(Optional) Image Sku | Instance of an image offer such as a major release of an image distribution. |
(Optional) Image Version | Version number of an image SKU. |
(Optional) Custom Image ID | ID of the image that you want to use. |
(Optional) Image URL | Location of the image. |
The following table describes the Create VM output properties:
Property | Description | Example |
---|---|---|
IP | IP address of the provisioned virtual machine. | 192.158. 1.3 |
Status | Current status of a virtual machine such as Running, Deallocating, and Stopped. | Running |
User Name | User login name of the virtual machine. | Allen |
User Password | Login password of the virtual machine. | <User password> |
Create Storage Account Service element properties
A Create Storage Account Service element creates a storage account in Microsoft Azure.
The following table describes the Create Storage Account Service input properties:
Property | Description |
---|---|
Connection Id | Connection ID of the Microsoft Azure connector. |
Resource Group | Name of the resource group to which the storage account belongs. |
Storage Account Name | Name of the storage account that you want to create. The name must meet the following requirements:
|
(Optional) Region | Name of the region in which you want to create the storage account. If you do not specify a region, the region configured in the Azure connector is used. |
USER_BY | Login name of the storage account requestor. |
(Optional) Is Existing Resource Group | This value specifies whether the storage account belongs to an existing resource group. You can specify the value as True or False. |
(Optional) Is Existing Group | This value specifies whether the storage account belongs to an existing resource group. You can specify the value as True or False. |
Authorized Network Name | Name of the authorized network that you want to use. Important: You can create a storage account only on the virtual networks that are authorized networks for storage account creation. |
Authorized Network Subnet | Name of the associated authorized network subnet. |
Authorized Network Resource Group | Name of the authorized network resource group. |
Authorized Ip Address | IP address of the authorized network. |
Authorized Ip Address Range | IP address range of the authorized network. |
The following table describes the Create Storage Account Service input properties:
Property | Description | Example |
---|---|---|
Account Name | Name of the storage account. | mystorageaccount |
Key 1 | Key 1 of the storage account. | 6HUgdtEBmTrG3nKXsT6oNccgtQA7rnFJ8lhPgCwSXjIUlJe3gFC+dzhZAlxoUxAzvIASFYXKflNhi29O/1k7/g== |
Key 2 | Key 2 of the storage account. | cpaQtiTly9b1gVLTRjjfdRa+zTz7uJcFodh5LO2ePxuFd5AFzhlb57P1Tgn5UiP+ZBkvzv+ceGeWQ9GCYaXOWQ== |
To create a process to create a virtual machine or storage account
- Log in to BMC Helix Innovation Studio.
- Navigate to the Workspace tab, and select the application in which you want to create a process.
- In the application, select Processes, and click New.
The system opens Process designer. - In the Process designer, drag the element to the canvas based on the action that you want to perform in Microsoft Azure:
- To create a virtual machine, drag the Create VM element to the canvas.
- To create a storage account, drag the Create Storage Account Service element to the canvas.
- In the element Properties pane, enter the property values.
- If required, add the other process elements and specify the flow of execution that you want to create for your business logic.
- Save the process.
Data lookups and Azure Resource Graph queries
You can use data lookups and Azure Resource Graph queries with the Create VM element to select a value from the list of available values to specify the input properties. You can use Azure Resource Graph queries as queryable datasets for all the resources that are available in the Azure Resource Graph Explorer. The following image shows an example of a Resource Graph Explorer:
Consider the following points while using Azure Resource Graph:
- Azure Resource Graph lookups are recognizable by their names that contain slashes (/). For example, "microsoft.compute/disks".
- All the data lookups on the Azure Resource Graph require the following qualification criteria:
"Subcription ID" is <subcription ID> The subscription ID that you define in the Azure connector configuration is not used as the default subscription ID. Use the subscription ID available in the Azure dashboard with a question that lists the subscriptions. For example, use the Subscriptions map-to-form data lookup. If you do not specify a subscription ID, other qualification filters are ignored, and the lookup data is blank. For more information about data lookups, see Creating selection menus for question responses.
- You can use the Azure Resource Graph lookups for the ID, Name, Type, Tenant ID, Location, Subcription ID, and Managed by parameters. Do not use the Azure Resource Graph lookups for Resource Group, SKU, Plan, Properties, Tags, Identity, Zones, and Extended Location parameters.
- You can use the Azure Resource Graph resource lookups by applying filters based on the attributes specific to Azure resources.
- The Azure Resource Graph lookups return API values that are not formatted values. For example, for Subscription ID, the value returned is the subscription GUID.
Learn about Azure Resource Graph at Azure Resource Graph.
Example: Automating virtual machine creation in Azure
Ajay is an application business analyst in Calbro Services. He wants to automate the task of creating a virtual machine in Microsoft Azure so that he can reduce the manual efforts of agents who are assigned to user requests of virtual machine creation. To automate the task, Ajay creates a process. He uses the Create VM element to create a virtual machine in Azure and uses the Send Virtual Machine Creation Email element to notify the virtual machine details to the user.
Ajay performs the following actions to create the process to automate the creation of a virtual machine:
- Create the process as shown in the following image:
- Add the process properties as shown in the following image:
- Add the Create VM element properties as shown in the following image:
- Add Send Virtual Machine Creation Email element properties as shown in the following image:
- Save the process.
Example: Automating storage account creation in Azure
Ajay is an application business analyst in Calbro Services. He wants to automate the task of creating a storage account in Microsoft Azure. To automate the task, Ajay creates a process. He uses the Create Storage Account Service element to create a storage account in Azure and the Send Azure Storage Creation Email element to notify the storage account details to the user.
Ajay performs the following actions to create the process to automate the creation of a storage account:
- Create the process as shown in the following image:
- Add the process properties as shown in the following image:
- Add the Create Storage Account Service element properties as shown in the following image:
- Add the Send Azure Storage Creation Email element properties as shown in the following image:
- Save the process.
Example: Using lookups to specify Create VM element input properties
Ajay is an application business analyst at Calbro Services. Calbro Services uses BMC Helix Digital Workplace Advanced application to manage user service requests. Ajay automates the task of creating a virtual machine in Azure. He creates a process to automate the task and uses the process as a workflow in a service in BMC Helix Digital Workplace Advanced. While adding a questionnaire for the service, Ajay wants to use lookups to populate answers in the questionnaire. When a user uses the service to submit a virtual machine creation request, the user can specify the answers by selecting a value from the list of available values.
Ajay performs the following actions to use lookups in the questionnaire:
In the Question Designer of the service, add the user-generated questions of Lookup type in the following sequence:
Lookup
Details
subscriptionID
region
imagePublisher
imageOffer
imageSKU
imageVersion
vmSize
resourceGroupName
Map the Azure Resource Graph query to the Question Values field.
virtualNetwork
subnet
- Save the questionnaire.
Learn about how to create questionnaires at Creating service questionnaires.