Tutorial: Set up a lab by using Azure DevTest Labs
In this tutorial, you create a lab by using the Azure portal. A lab admin sets up a lab in an organization, creates VMs in the lab, and configures policies. Lab users (for example: developer and testers) claim VMs in the lab, connect to them, and use them.
In this tutorial, you do the following actions:
- Create a lab
- Add virtual machines (VM) to the lab
- Add a user to the Lab User role
If you don't have an Azure subscription, create a free account before you begin.
Create a lab
The following steps illustrate how to use the Azure portal to create a lab in Azure DevTest Labs.
Sign in to the Azure portal.
From the main menu on the left side, select Create a resource (at the top of the list), point to Developer tools, and click DevTest Labs.
In the Create a DevTest Lab window, do the following actions:
For Lab name, enter a name for the lab.
For Subscription, select the subscription in which you want to create the lab.
For Resource group, select Create new, and enter a name for the resource group.
For Location, select the location/region in which you want the lab to be created.
Select Pin to dashboard. After you create the lab, the lab shows up in the dashboard.
Confirm that the lab is created successfully by looking at the notifications. Select Go to resource.
Confirm that you see the DevTest Lab page for your lab.
Add a VM to the lab
On the DevTest Lab page, select + Add on the toolbar.
On the Choose a base page, search with a keyword (for example: Windows, Ubuntu), and select one of the base images in the list.
On the Virtual machine page, do the following actions:
For Virtual machine name, enter a name for the virtual machine.
For User name, enter a name for the user that has access to the virtual machine.
For Password, enter the password for the user.
Select Advanced settings tab.
For Make this machine claimable, select Yes.
Confirm that the instance count is set to 1. If you set it to 2, 2 VMs are created with names:
<base image name>00' and <base image name>01. For example:
You see the status of the VM in the list of Claimable virtual machines list. Creation of the virtual machine may take approximately 25 minutes. The VM is created in a separate Azure resource group, whose name starts with the name of the current resource group that has the lab. For example, if the lab is in
labrg, the VM may be created in the resource group
After the VM is created, you see it in the list of Claimable virtual machines in the list.
On the Advanced Settings page, you can configure public, private or a shared IP address for the VM. When the shared IP is enabled, Azure DevTest Labs automatically enables RDP for Windows VMs and SSH for Linux VMs. If you create VMs with public IP addresses, RDP and SSH are enabled without any changes from DevTest Labs.
Add a user to the Lab User role
Select Configuration and policies in the left menu.
Select Access control (IAM) from the menu, and select + Add role assignment on the toolbar.
On the Add permissions page, do the following actions:
For Role, select DevTest Labs User.
Select the user you want to add.
Clean up resources
The next tutorial shows how a lab user can claim and connect to a VM in the lab. If you don't want to do that tutorial, and clean up the resources created as part of this tutorial, follow these steps:
In the Azure portal, select Resource groups in the menu.
Select your resource group in which you created the lab.
Select Delete resource group from the toolbar. Deleting a resource group deletes all the resources in the group including the lab.
Repeat these steps to delete the additional resource group created for you with the name
<your resource group name><random numbers>. For example:
splab3988722144001. The VMs are created in this resource group rather than in the resource group in which the lab exists.
In this tutorial, you created a lab with a VM and gave a user access to the lab. To learn about how to access the lab as a lab user, advance to the next tutorial: