Manage Azure DevTest Labs formulas

A formula in Azure DevTest Labs is a list of default property values used to create a virtual machine (VM). When creating a VM from a formula, the default values can be used as-is, or modified. Like custom images and Marketplace images, formulas provide a mechanism for fast VM provisioning. Similar to custom images, formulas enable you to create a base image from a VHD file. The base image can then be used to provision a new VM. To help decide which is right for your particular environment, refer to the article, Comparing custom images and formulas in DevTest Labs.

This article illustrates how to create a formula from either a base (custom image, Marketplace image, or another formula) or an existing VM. This article also guides you through managing existing formulas.

Create a formula

Anyone with DevTest Labs Users permissions is able to create VMs using a formula as a base. There are two ways to create formulas:

  • From a base - Use when you want to define all the characteristics of the formula.
  • From an existing lab VM - Use when you want to create a formula based on the settings of an existing VM.

For more information about adding users and permissions, see Add owners and users in Azure DevTest Labs.

Create a formula from a base

The following steps guide you through the process of creating a formula from a custom image, Marketplace image, or another formula.

  1. Sign in to the Azure portal.

  2. Select All Services, and then select DevTest Labs from the list.

  3. From the list of labs, select the desired lab.

  4. On the lab's blade, select Formulas (reusable bases).

    Formula menu

  5. On the Formulas blade, select + Add.

    Add a formula

  6. On the Choose a base blade, select the base (custom image, Marketplace image, or formula) from which you want to create the formula.

    Base list

  7. On the Create formula blade, specify the following values:

    • Formula name - Enter a name for your formula. This value is displayed in the list of base images when you create a VM. The name is validated as you type it, and if not valid, a message indicates the requirements for a valid name.
    • Description - Enter a meaningful description for your formula. This value is available from the formula's context menu when you create a VM.
    • User name - Enter a user name that is granted administrator privileges.
    • Password - Enter - or select from the dropdown - a value that is associated with the secret (password) that you want to use for the specified user. For more information about the secrets, see Azure DevTest Labs: Personal secret store.
    • Virtual machine disk type - Specify either HDD (hard-disk drive) or SSD (solid-state drive) to indicate which storage disk type is allowed for the virtual machines provisioned using this base image.
    • ** Virtual machine size** - Select one of the predefined items that specify the processor cores, RAM size, and the hard drive size of the VM to create.
    • Artifacts - Select to open the Add artifacts blade, in which you select and configure the artifacts that you want to add to the base image. For more information about artifacts, see Create custom artifacts for your Azure DevTest Labs virtual machine.
    • Advanced settings - Select to open the Advanced blade where you configure the following settings:
      • Virtual network - Specify the desired virtual network.
      • Subnet - Specify the desired subnet.
      • IP address configuration - Specify if you want the Public, Private, or Shared IP addresses. For more information about shared IP addresses, see Understand shared IP addresses in Azure DevTest Labs.
      • Make this machine claimable - Making a machine "claimable" means that it will not be assigned ownership at the time of creation. Instead lab users will be able to take ownership ("claim") the machine in the lab's blade.
    • Image - This field displays name of the base image you selected on the previous blade.

      Create formula

  8. Select Create to create the formula.

  9. When the formula has been created, it displays in the list on the Formulas blade.

Create a formula from a VM

The following steps guide you through the process of creating a formula based on an existing VM.

Note

To create a formula from a VM, the VM must have been created after March 30, 2016.

  1. Sign in to the Azure portal.
  2. Select All Services, and then select DevTest Labs from the list.
  3. From the list of labs, select the desired lab.
  4. On the lab's Overview blade, select the VM from which you wish to create the formula.

    Labs VMs

  5. On the VM's blade, select Create formula (reusable base).

    Create formula

  6. On the Create formula blade, enter a Name and Description for your new formula.

    Create formula blade

  7. Select OK to create the formula.

Modify a formula

To modify a formula, follow these steps:

  1. Sign in to the Azure portal.
  2. Select All Services, and then select DevTest Labs from the list.
  3. From the list of labs, select the desired lab.
  4. On the lab's blade, select Formulas (reusable bases).

    Formula menu

  5. On the Lab formulas blade, select the formula you wish to modify.
  6. On the Update formula blade, make the desired edits, and select Update.

Delete a formula

To delete a formula, follow these steps:

  1. Sign in to the Azure portal.
  2. Select All Services, and then select DevTest Labs from the list.
  3. From the list of labs, select the desired lab.
  4. On the lab Settings blade, select Formulas.

    Formula menu

  5. On the Lab formulas blade, select the ellipsis to the right of the formula you wish to delete.

    Formula menu

  6. On the formula's context menu, select Delete.

    Formula context menu

  7. Select Yes to the deletion confirmation dialog.

Get started with Azure DevTest Labs

New to Azure? Create a free Azure account.

Already on Azure? Get started with your first lab in DevTest Labs.

Get started with Azure DevTest Labs in minutes

Next steps

Once you have created a formula for use when creating a VM, the next step is to add a VM to your lab.