Deploy the Azure U-Series Appliance Using ARM Template

You can use the Azure Resource Manager (ARM) template to help automate creating your U-Series Appliance. You can use the template in the following ways:

  • Use the template and JSON parameters provided in the code block below to create two separate JSON files and use PowerShell or Azure CLI scripting to execute them.
  • You can use the template in the Azure portal with the Create with Template option and upload the JSON file to the portal. This gives the user minimal parameters, assuming defaults to some of the Azure Resource properties.

You can add your new U-Series Appliance to an existing virtual network (V-Net) or create a V-Net.

Key points to consider:

  • Licensing is applied after the U-Series Appliance is created and is not part of the ARM template.
  • When using this ARM template using Azure Portal with the Create with custom Template option, use the same resource group for both the virtual machine and virtual network.

ARM Template

This section assumes you have knowledge about Azure ARM templates and Microsoft Azure Cloud.

For more information on Azure templates, please see Tutorial: Deploy a local ARM template.

The following parameters are part of the ARM template. There are different areas to can enter the parameters depending on how you launch the ARM template.

  • vmName: This is the name for the VM and is usually the same as the U-Series Appliance name configured during setup.
  • vmSize: Azure sizing for the virtual machine. The default is Standard_D2s_v3.
  • Admin Username: The credential for the administrator account.
  • Admin Password: The password for the administrator account.
  • vNet New or Existing: Specify whether to create a new or existing virtual network for the VM.
  • Virtual Network Name: The name of the new or existing virtual network.
  • Virtual Network Resource Group: The name of the new or existing resource group for the virtual network.
  • Subnet name: Name of the subnet in the virtual network you want to use.
  • DNS Name: Unique DNS Name for the Public IP used to access the virtual machine.
  • Network Security Group Name ('nsgName'): Name of the new or existing NSG.

To deploy the SQL Free image, you must change a couple of lines in the JSON file.

From:

"imageReference": {
"publisher": "beyondtrust",
"offer": "beyondinsight",
"sku": "u-series",
"version": "latest"

To:

"imageReference": {
"publisher": "beyondtrust",
"offer": "uvm-sf",
"sku": "u-series_sf",
"version": "latest"
Template JSON

  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "vmName": {
      "type": "string",
      "defaultValue": "btuseries",
      "metadata": {
        "description": "Name of the VM"
      }
    },
    "vmSize": {
      "type": "string",
      "defaultValue": "Standard_DS4_v2",
      "metadata": {
        "description": "Size of the VM"
      }
    },
    "adminUsername": {
      "type": "string",
      "metadata": {
        "description": "VM Admin User Name"
      }
    },
    "adminPassword": {
      "type": "string",
      "metadata": {
        "description": "VM Admin Password"
      }
    },
    "vNetNewOrExisting": {
      "type": "string",
      "defaultValue": "new",
      "allowedValues": [
        "new",
        "existing"
      ],
      "metadata": {
        "description": "Specify whether to create a new or existing virtual network for the VM."
      }
    },
    "virtualNetworkName": {
      "type": "string",
      "defaultValue": "",
      "metadata": {
        "description": "Name of the new/existing VNET"
      }
    },
    "virtualNetworkResourceGroup": {
      "type": "string",
      "defaultValue": "",
      "metadata": {
        "description": "Name of the new/existing VNET resource group"
      }
    },
    "subnetName": {
      "type": "string",
      "defaultValue": "",
      "metadata": {
        "description": "Name of the subnet in the virtual network you want to use"
      }
    },
    "dnsNameForPublicIP": {
      "type": "string",
      "defaultValue": "",
      "metadata": {
        "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
      }
    },
    "nsgName": {
      "defaultValue": "",
      "type": "string",
      "metadata": {
        "description": "Network Security Group"
      }
    },
    "osDiskType": {
      "type": "string",
      "defaultValue": "Premium_LRS",
      "metadata": {
        "description": "OS Disk Type"
      }
    },
    "location": {
      "type": "string",
      "defaultValue": "eastus",
      "metadata": {
        "description": "Location for all resources."
      }
    }
  },
  "variables": {
    "diagStorageAccountName": "[concat(uniquestring(resourceGroup().id), 'specvm')]",
    "subnetRef": "[resourceId(parameters('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'),  parameters('subnetName'))]",
    "nicName": "nic",
    "publicIPAddressName": "publicIp"
  },
  "resources": [
      {
          "condition": "[equals(parameters('vNetNewOrExisting'), 'new')]",
          "type": "Microsoft.Network/networkSecurityGroups",
          "apiVersion": "2020-11-01",
          "name": "[parameters('nsgName')]",
          "location": "eastus",
          "properties": {
              "securityRules": []
          }
      },
    {
      "condition": "[equals(parameters('vNetNewOrExisting'), 'new')]",
      "apiVersion": "2018-10-01",
      "type": "Microsoft.Network/virtualNetworks",
      "name": "[parameters('virtualNetworkName')]",
      "location": "[parameters('location')]",
      "properties": {
        "addressSpace": {
          "addressPrefixes": [
            "10.0.0.0/16"
          ]
        },
        "subnets": [
          {
            "name": "[parameters('subnetName')]",
            "properties": {
              "addressPrefix": "10.0.0.0/24"
            }
          }
        ]
      }
    },
{
      "type": "Microsoft.Storage/storageAccounts",
      "name": "[variables('diagStorageAccountName')]",
      "apiVersion": "2018-07-01",
      "location": "[parameters('location')]",
      "sku": {
        "name": "Standard_LRS"
      },
      "kind": "Storage",
      "properties": {}
    },
    {
      "apiVersion": "2018-10-01",
      "type": "Microsoft.Network/publicIPAddresses",
      "name": "[variables('publicIPAddressName')]",
      "location": "[parameters('location')]",
      "tags": {
        "displayName": "PublicIPAddress"
      },
      "properties": {
        "publicIPAllocationMethod": "Dynamic",
        "dnsSettings": {
          "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
        }
      }
    },
    {
      "apiVersion": "2018-10-01",
      "type": "Microsoft.Network/networkInterfaces",
      "name": "[variables('nicName')]",
      "location": "[parameters('location')]",
      "dependsOn": [
        "[variables('publicIPAddressName')]",
        "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('nsgName'))]"
      ],
      "tags": {
        "displayName": "NetworkInterface"
      },
      "properties": {
        "ipConfigurations": [
          {
            "name": "ipconfig1",
            "properties": {
              "privateIPAllocationMethod": "Dynamic",
              "publicIPAddress": {
                "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
              },
              "subnet": {
                "id": "[variables('subnetRef')]"
              }
            }
          }
        ],
        "networkSecurityGroup": {
          "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('nsgName'))]"
        }
      }
    },
    {
      "apiVersion": "2018-10-01",
      "type": "Microsoft.Compute/virtualMachines",
      "name": "[parameters('vmName')]",
      "location": "[parameters('location')]",
      "tags": {
        "displayName": "VirtualMachine"
      },
      "dependsOn": [
        "[variables('nicName')]"
      ],
      "plan": {
        "name": "u-series",
        "publisher": "beyondtrust",
        "product": "beyondinsight"
      },
      "properties": {
        "hardwareProfile": {
          "vmSize": "[parameters('vmSize')]"
        },
        "storageProfile": {
          "osDisk": {
                "createOption": "FromImage",
                "managedDisk": {
                    "storageAccountType": "[parameters('osDiskType')]"
                }
            },
            "imageReference": {
                "publisher": "beyondtrust",
                "offer": "beyondinsight",
                "sku": "u-series",
                "version": "latest"
            }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
            }
          ]
        },
        "osProfile": {
            "computerName": "[parameters('vmName')]",
            "adminUsername": "[parameters('adminUsername')]",
            "adminPassword": "[parameters('adminPassword')]",
            "windowsConfiguration": {
                "enableAutomaticUpdates": true,
                "provisionVmAgent": true
            }
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true,
            "storageUri": "[reference(variables('diagStorageAccountName')).primaryEndpoints.blob]"
          }
        }
      }
    }
  ]
}