To create a lab in Azure DevTest Labs, follow these steps.
In the Azure portal, search for and select DevTest Labs.
On the DevTest Labs page, select Create.
On the Create Devtest Lab page, on the Basic Settings tab, provide the following information:
Setting
Value
Subscription
Change the subscription if you want to use a different subscription for the lab.
Resource group
Select an existing resource group from the dropdown list, or select Create new to create a new resource group so it's easy to delete later.
Lab name
Enter a name for the lab.
Location
If you're creating a new resource group, select an Azure region for the resource group and lab.
Artifacts storage account access
You can configure whether the lab uses a User-assigned Managed Identity or a Shared Key to access the lab storage account. To use a User-assigned Managed Identity, select the appropriate managed identity from the list, otherwise select the Storage Account Shared Key option from the list.
Optionally, select the Auto-shutdown, Networking, or Tags tabs at the top of the page, and customize those settings. You can also apply or change most of these settings after lab creation.
After you complete all settings, select Review + create at the bottom of the page.
If the settings are valid, Succeeded appears at the top of the Review + create page. Review the settings, and then select Create.
Tip
Select Download a template for automation at the bottom of the page to view and download the lab configuration as an Azure Resource Manager (ARM) template. You can use the ARM template to create more labs.
After the creation process finishes, from the deployment notification, select Go to resource.
On the new lab's Overview page, select Add on the toolbar.
On the Choose a base page, select Windows Server 2019 Datacenter as a Marketplace image for the VM. Some of the following options might be different if you use a different image.
On the Basic Settings tab of the Create lab resource screen, provide the following information:
Setting
Value
Virtual machine name
Keep the autogenerated name, or enter another unique VM name.
User name
Keep the autogenerated user name, or enter another user name to grant administrator privileges on the VM.
Use a saved secret
You can select this checkbox to use a secret from Azure Key Vault instead of a password to access the VM. For more information, see Store secrets in a key vault. For this tutorial, don't select the checkbox.
Password
If you don't use a secret, enter a VM password between 8 and 123 characters long.
Save as default password
Select this checkbox to save the password in the Key Vault associated with the lab.
Virtual machine size
Keep the default value for the base, or select Change Size to select a different size.
Hibernation
Select Enabled to enable hibernation for this virtual machine, or select Disabled to disable hibernation for this virtual machine. If you enable Hibernation, you also must select Public IP in the Advanced settings as Private and Shared IP are currently not supported if Hibernation is enabled.
OS disk type
Keep the default value for the base, or select a different option from the dropdown list.
The default is No, to keep the VM creator as the owner of the VM. For this tutorial, select Yes, so that another lab user can claim the VM after creation. For more information, see Create and manage claimable VMs.
Number of instances
To create more than one VM with this configuration, enter the number of VMs to create.
View ARM template
Select to view and save the VM configuration as an Azure Resource Manager (ARM) template. You can use the ARM template to deploy new VMs with Azure PowerShell.
After you configure all settings, on the Basic Settings tab of the Create lab resource screen, select Create.
During VM deployment, you can select the Notifications icon at the top of the screen to see progress. Creating a VM takes a while.
From the lab Overview page, you can select Claimable virtual machines in the left navigation to see the VM listed on the Claimable virtual machines page. Select Refresh if the VM doesn't appear. To take ownership of a VM in the claimable list, see Use a claimable VM.
Copy the lab URL from your browser, and then share it with your lab users.
Note
If a lab user is an external user who has a Microsoft account, but who is not a member of your organization's Active Directory instance, the user might see an error message when they try to access the shared link. If an external user sees an error message, ask the user to first select their name in the upper-right corner of the Azure portal. Then, in the Directory section of the menu, the user can select the directory where the lab exists.
Clean up resources
Use this lab for the next tutorial, Access a lab in Azure DevTest Labs. When you're done using the lab, delete it and its resources to avoid further charges.
On the lab Overview page, select Delete from the top menu.
On the Are you sure you want to delete it page, enter the lab name, and then select Delete.
During the deletion process, you can select Notifications at the top of your screen to view progress. Deleting a lab can take a while.
If you created the lab in an existing resource group, deleting the lab removes all of the lab resources.
If you created a resource group for the lab, you can now delete that resource group. You can't delete a resource group that has a lab in it. Deleting the resource group that contained the lab deletes all resources in the resource group. To delete the resource group:
Select the resource group that contained the lab from your subscription's Resource groups list.
At the top of the page, select Delete resource group.
On the Are you sure you want to delete "<resource group name>" page, enter the resource group name, and then select Delete.
Next steps
To learn how to access the lab and VMs as a lab user, go on to the next tutorial:
Learn how to use the Azure portal to add a virtual machine (VM) to a lab in Azure DevTest Labs. Configure basic settings, artifacts, and advanced settings.