Create a Batch account with the Azure portal

Learn how to create an Azure Batch account in the Azure portal, and choose the account properties that fit your compute scenario. Learn where to find important account properties like access keys and account URLs.

For background about Batch accounts and scenarios, see the feature overview.

Create a Batch account

Note

When creating a Batch account, you can choose between two pool allocation modes: user subscription and Batch service. For most cases, you should use the default Batch service mode, in which pools are allocated behind the scenes in Azure-managed subscriptions. In the alternative user subscription mode, Batch VMs and other resources are created directly in your subscription when a pool is created. User subscription mode is required if you want to create Batch pools using Azure Reserved VM Instances. To create a Batch account in user subscription mode, you must also register your subscription with Azure Batch, and associate the account with an Azure Key Vault.

  1. Sign in to the Azure portal.

  2. Click New > Compute > Batch Service.

    Batch in the Marketplace

  3. Enter New Batch account settings. See the following details.

    Create a Batch account

    a. Account name: The name you choose must be unique within the Azure region where the account is created (see Location below). The account name can contain only lowercase characters or numbers, and must be 3-24 characters in length.

    b. Subscription: The subscription in which to create the Batch account. If you have only one subscription, it is selected by default.

    c. Resource group: Select an existing resource group for your new Batch account, or optionally create a new one.

    d. Location: The Azure region in which to create the Batch account. Only the regions supported by your subscription and resource group are displayed as options.

    e. Storage account (optional): An Azure Storage account that you associate with your Batch account. This is recommended for most Batch accounts. For storage account options in Batch, see the Batch feature overview. In the portal, select an existing storage account, or optionally create a new one.

    Create a storage account

    f. Pool allocation mode: For most scenarios, accept the default Batch service.

  4. Click Create to create the account.

View Batch account properties

Once the account has been created, click the account to access its settings and properties. You can access all account settings and properties by using the left menu.

Batch account page in Azure portal

  • Batch account name, URL, and keys: When you develop an application with the Batch APIs, you need an account URL and key to access your Batch resources. (Batch also supports Azure Active Directory authentication.)

    To view the Batch account access information, click Keys.

    Batch account keys in Azure portal

  • To view the name and keys of the storage account associated with your Batch account, click Storage account.

  • To view the resource quotas that apply to the Batch account, click Quotas. For details, see Batch service quotas and limits.

Additional configuration for user subscription mode

If you choose to create a Batch account in user subscription mode, perform the following additional steps before creating the account.

Allow Azure Batch to access the subscription (one-time operation)

When creating your first Batch account in user subscription mode, you need to register your subscription with Batch. (If you previously did this, skip to the next section.)

  1. Sign in to the Azure portal.

  2. Click More Services > Subscriptions, and click the subscription you want to use for the Batch account.

  3. In the Subscription page, click Access control (IAM) > Add.

    Subscription access control

  4. On the Add permissions page, select the Contributor role, search for the Batch API. Search for each of these strings until you find the API:

    1. MicrosoftAzureBatch.
    2. Microsoft Azure Batch. Newer Azure AD tenants may use this name.
    3. ddbf3205-c6bd-46ae-8127-60eb93363864 is the ID for the Batch API.
  5. Once you find the Batch API, select it and click Save.

    Add Batch permissions

Create a key vault

In user subscription mode, an Azure key vault is required that belongs to the same resource group as the Batch account to be created. Make sure the resource group is in a region where Batch is available and which your subscription supports.

  1. In the Azure portal, click New > Security > Key Vault.

  2. In the Create Key Vault page, enter a name for the key vault, and create a resource group in the region you want for your Batch account. Leave the remaining settings at default values, then click Create.

When creating the Batch account in user subscription mode, use the resource group for the key vault, specify User subscription as the pool allocation mode, and select the key vault.

Other Batch account management options

In addition to using the Azure portal, you can create and manage Batch accounts with tools including the following:

Next steps

  • See the Batch feature overview to learn more about Batch service concepts and features. The article discusses the primary Batch resources such as pools, compute nodes, jobs, and tasks, and provides an overview of the service's features for large-scale compute workloads.
  • Learn the basics of developing a Batch-enabled application using the Batch .NET client library or Python. These introductory articles guide you through a working application that uses the Batch service to execute a workload on multiple compute nodes, and includes using Azure Storage for workload file staging and retrieval.