|
1 | 1 | ---
|
2 |
| -title: Create a lab in Azure DevTest Labs by using an Azure Resource Manager template |
3 |
| -description: Use an Azure Resource Manager (ARM) template to create a lab that has a virtual machine in Azure DevTest Labs. |
| 2 | +title: Create labs from ARM templates |
| 3 | +titleSuffix: Azure DevTest Labs |
| 4 | +description: Create labs with virtual machines in Azure DevTest Labs by using Azure Resource Manager (ARM) templates. |
4 | 5 | ms.topic: quickstart
|
5 | 6 | ms.author: rosemalcolm
|
6 | 7 | author: RoseHJM
|
7 | 8 | ms.custom: subject-armqs, mode-arm, devx-track-arm-template, UpdateFrequency2
|
8 |
| -ms.date: 09/30/2023 |
| 9 | +ms.date: 06/14/2024 |
| 10 | + |
| 11 | +#customer intent: As a developer, I want to use ARM templates in Azure DevTest Labs so that I can create labs with virtual machines. |
9 | 12 | ---
|
10 | 13 |
|
11 |
| -# Quickstart: Use an ARM template to create a lab in DevTest Labs |
| 14 | +# Quickstart: Use ARM templates to create labs in Azure DevTest Labs |
12 | 15 |
|
13 |
| -This quickstart uses an Azure Resource Manager (ARM) template to create a lab in Azure DevTest Labs that has one Windows Server 2019 Datacenter virtual machine (VM) in it. |
| 16 | +In this quickstart, you use an Azure Resource Manager (ARM) template to create a lab in Azure DevTest Labs that has one Windows Server 2019 Datacenter virtual machine (VM) in it. |
14 | 17 |
|
15 |
| -In this quickstart, you take the following actions: |
| 18 | +[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)] |
16 | 19 |
|
17 |
| -> [!div class="checklist"] |
18 |
| -> * Review the ARM template. |
19 |
| -> * Deploy the ARM template to create a lab and VM. |
20 |
| -> * Verify the deployment. |
21 |
| -> * Clean up resources. |
| 20 | +DevTest Labs can use ARM templates for many tasks, from creating and provisioning labs to adding users. This quickstart uses the [Creates a lab with a claimed VM](https://azure.microsoft.com/resources/templates/dtl-create-lab-windows-vm-claimed) ARM template from the [Azure Quickstart Templates gallery](/samples/browse/?expanded=azure&products=azure-resource-manager). |
22 | 21 |
|
23 | 22 | ## Prerequisites
|
24 | 23 |
|
25 |
| -If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin. |
| 24 | +- If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin. |
26 | 25 |
|
27 |
| -## Review the template |
| 26 | +## Review template resources |
28 | 27 |
|
29 |
| -[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)] |
| 28 | +The **Creates a lab with a claimed VM** ARM template defines the following resource types: |
30 | 29 |
|
31 |
| -DevTest Labs can use ARM templates for many tasks, from creating and provisioning labs to adding users. This quickstart uses the [Creates a lab with a claimed VM](https://azure.microsoft.com/resources/templates/dtl-create-lab-windows-vm-claimed) ARM template from the [Azure Quickstart Templates gallery](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Devtestlab). The template defines the following resource types: |
| 30 | +- [Microsoft.DevTestLab/labs](/azure/templates/microsoft.devtestlab/labs?pivots=deployment-language-arm-template): Creates the lab resource. |
| 31 | +- [Microsoft.DevTestLab/labs/virtualnetworks](/azure/templates/microsoft.devtestlab/labs/virtualnetworks?pivots=deployment-language-arm-template): Creates a virtual network for the lab. |
| 32 | +- [Microsoft.DevTestLab/labs/virtualmachines](/azure/templates/microsoft.devtestlab/labs/virtualmachines?pivots=deployment-language-arm-template): Creates the VM for the lab. |
32 | 33 |
|
33 |
| -- [Microsoft.DevTestLab/labs](/azure/templates/microsoft.devtestlab/labs) creates the lab. |
34 |
| -- [Microsoft.DevTestLab/labs/virtualnetworks](/azure/templates/microsoft.devtestlab/labs/virtualnetworks) creates a virtual network. |
35 |
| -- [Microsoft.DevTestLab/labs/virtualmachines](/azure/templates/microsoft.devtestlab/labs/virtualmachines) creates the lab VM. |
| 34 | +The _azuredeploy.json_ template file defines the following schema: |
36 | 35 |
|
37 | 36 | :::code language="json" source="~/quickstart-templates/quickstarts/microsoft.devtestlab/dtl-create-lab-windows-vm-claimed/azuredeploy.json":::
|
38 | 37 |
|
39 |
| -The [Azure Quickstart Templates gallery](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Devtestlab) and [Azure Quickstart Templates public GitHub repository](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devtestlab) have several other DevTest Labs ARM quickstart templates. |
40 |
| - |
41 |
| -The [Azure Lab Services Community public GitHub repository](https://github.com/Azure/azure-devtestlab/tree/master) also has many DevTest Labs [artifacts](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts), [environments](https://github.com/Azure/azure-devtestlab/tree/master/Environments), [PowerShell scripts](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts), and [quickstart ARM templates](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/QuickStartTemplates) you can use or customize for your needs. |
| 38 | +More templates for Azure DevTest Labs are available in the [Azure Quickstart Templates gallery](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Devtestlab) and [Azure Quickstart Templates public GitHub repository](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.devtestlab). The [Azure Lab Services Community public GitHub repository](https://github.com/Azure/azure-devtestlab/tree/master) offers many DevTest Labs resources. You can find [artifacts](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts), [environments](https://github.com/Azure/azure-devtestlab/tree/master/Environments), [PowerShell scripts](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts), and [quickstart ARM templates](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/QuickStartTemplates) that you can use and customize for your scenario. |
42 | 39 |
|
43 | 40 | ## Deploy the template
|
44 | 41 |
|
| 42 | +The following steps deploy the ARM template and create a DevTest Labs VM: |
| 43 | + |
45 | 44 | 1. Select the following **Deploy to Azure** button to sign in to the Azure portal and open the quickstart ARM template:
|
46 | 45 |
|
47 |
| - :::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.devtestlab%2Fdtl-create-lab-windows-vm-claimed%2Fazuredeploy.json"::: |
| 46 | + :::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Image of a button with the label Deploy to Azure, which deploys the ARM template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.devtestlab%2Fdtl-create-lab-windows-vm-claimed%2Fazuredeploy.json"::: |
48 | 47 |
|
49 |
| -1. On the **Creates a lab in Azure DevTest Labs with a claimed VM** screen, complete the following items: |
| 48 | +1. On the **Creates a lab in Azure DevTest Labs with a claimed VM** pane, configure the following settings: |
50 | 49 |
|
51 |
| - - **Resource group**: Select an existing resource group from the dropdown list, or create a new resource group so it's easy to clean up later. |
52 |
| - - **Region**: If you created a new resource group, select a location for the resource group and lab. |
| 50 | + - **Resource group**: Select an existing resource group from the dropdown list, or create a new resource group. |
| 51 | + - **Region**: If you create a new resource group, select a location for the resource group and lab. |
53 | 52 | - **Lab Name**: Enter a name for the new lab.
|
54 | 53 | - **Vm Name**: Enter a name for the new VM.
|
| 54 | + - **Vm Size**: Select a size for the new VM. |
55 | 55 | - **User Name**: Enter a name for the user who can access the VM.
|
56 | 56 | - **Password**: Enter a password for the VM user.
|
57 | 57 |
|
58 |
| -1. Select **Review + create**, and when validation passes, select **Create**. |
| 58 | +1. Select **Review + create**, and after validation passes, select **Create**. |
59 | 59 |
|
60 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/deploy-template-page.png" alt-text="Screenshot of the Create a lab page."::: |
| 60 | + :::image type="content" source="./media/create-lab-windows-vm-template/deploy-template.png" border="false" alt-text="Screenshot of the configuration page for a new VM based on the Creates a lab in Azure DevTest Labs with a claimed VM template." lightbox="./media/create-lab-windows-vm-template/deploy-template-large.png"::: |
61 | 61 |
|
62 |
| -1. During the deployment, you can select the **Notifications** icon at the top of the screen to see deployment progress on the template **Overview** page. Deployment, especially creating a VM, takes a while. |
| 62 | +1. During deployment, you can monitor the deployment progress on the template **Overview** page: |
| 63 | + |
| 64 | + :::image type="content" source="./media/create-lab-windows-vm-template/monitor-deployment.png" border="false" alt-text="Screenshot that shows the deployment in progress for the new lab and claimed VM on the template Overview page." lightbox="./media/create-lab-windows-vm-template/monitor-deployment-large.png"::: |
| 65 | + |
| 66 | + > [!NOTE] |
| 67 | + > The process to deploy a new lab with claimed VM can take a long time. |
63 | 68 |
|
64 | 69 | ## Validate the deployment
|
65 | 70 |
|
66 |
| -1. When the deployment is complete, select **Go to resource group** from the template **Overview** page or from **Notifications**. |
| 71 | +1. When the deployment completes, select **Go to resource group** from the template **Overview** page or from the Azure portal **Notifications**: |
67 | 72 |
|
68 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/navigate-resource-group.png" alt-text="Screenshot that shows deployment complete and the Go to resource group button."::: |
| 73 | + :::image type="content" source="./media/create-lab-windows-vm-template/open-resource-group.png" alt-text="Screenshot that shows deployment complete and the Go to resource group option."::: |
69 | 74 |
|
70 |
| -1. The **Resource group** page lists the resources in the resource group, including your lab and its dependent resources like virtual networks and VMs. Select the **DevTest Lab** resource to go to the lab's **Overview** page. |
| 75 | +1. The **Resource group** page lists the resources in the resource group, including the new lab and its dependent resources like virtual networks and VMs. To open the lab **Overview** page, select the **DevTest Lab** resource for your new lab in list: |
71 | 76 |
|
72 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/resource-group-overview.png" alt-text="Screenshot of resource group overview."::: |
| 77 | + :::image type="content" source="./media/create-lab-windows-vm-template/open-lab.png" alt-text="Screenshot that shows how to access the new lab on the resource group Overview page." lightbox="./media/create-lab-windows-vm-template/open-lab-large.png"::: |
73 | 78 |
|
74 |
| -1. On the lab **Overview** page, you can see the VM under **My virtual machines**. |
| 79 | +1. On the lab **Overview** page, you can see the new VM under **My virtual machines**: |
75 | 80 |
|
76 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/lab-home-page.png" alt-text="Screenshot that shows the lab Overview page with the virtual machine."::: |
| 81 | + :::image type="content" source="./media/create-lab-windows-vm-template/lab-virtual-machine.png" alt-text="Screenshot that shows the new virtual machine for the newly deployed lab." lightbox="./media/create-lab-windows-vm-template/lab-virtual-machine-large.png"::: |
77 | 82 |
|
78 | 83 | > [!NOTE]
|
79 |
| -> The deployment also creates a resource group for the VM. The resource group contains VM resources like the IP address, network interface, and disk. The resource group appears in your subscription's **Resource groups** list with the name **\<lab name>-\<vm name>-\<numerical string>**. |
| 84 | +> The deployment also creates a resource group for the VM. The resource group contains VM resources like the IP address, network interface, and disk. The VM resource group appears in your subscription's **Resource groups** list with the name _\<lab name>-\<vm name>-\<numerical string>_. |
80 | 85 |
|
81 | 86 | ## Clean up resources
|
82 | 87 |
|
83 |
| -When you're done using these lab resources, delete them to avoid further charges. You can't delete a resource group that has a lab in it, so delete the lab first: |
| 88 | +When you're done with the lab resources, delete them to avoid further charges. Before you can delete the resource group, you must first delete the lab. |
84 | 89 |
|
85 |
| -1. On the lab overview page, select **Delete** from the top menu. |
| 90 | +1. Go to the lab **Overview** page and select **Delete**: |
86 | 91 |
|
87 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/portal-lab-delete.png" alt-text="Screenshot of lab delete button."::: |
| 92 | + :::image type="content" source="./media/create-lab-windows-vm-template/delete-lab.png" alt-text="Screenshot that shows how to delete a lab in the Azure portal."::: |
88 | 93 |
|
89 |
| -1. On the **Are you sure you want to delete it** page, enter the lab name, and then select **Delete**. |
| 94 | +1. On the confirmation page, enter the lab name, and select **Delete**. |
90 | 95 |
|
91 |
| - During the deletion, you can select **Notifications** at the top of your screen to view progress. Deleting the lab takes a while. |
| 96 | + During the deletion, you can select **Notifications** at the top of your screen to view progress. |
| 97 | + |
| 98 | + > [!NOTE] |
| 99 | + > Deleting the lab can take several minutes. |
92 | 100 |
|
93 |
| -You can now delete the resource group that contained the lab, which deletes all resources in the resource group. |
| 101 | + After you delete the lab, you can delete the resource group that contained the lab, which deletes all other resources in the resource group. |
94 | 102 |
|
95 |
| -1. Select the resource group that contained the lab from your subscription's **Resource groups** list. |
| 103 | +1. Go to your subscription's **Resource groups** list. |
96 | 104 |
|
97 |
| -1. At the top of the page, select **Delete resource group**. |
| 105 | +1. Select the resource group that contained the lab. |
98 | 106 |
|
99 |
| -1. On the **Are you sure you want to delete "\<resource group name>"** page, enter the resource group name, and then select **Delete**. |
| 107 | +1. At the top of the page, select **Delete resource group**. |
100 | 108 |
|
101 |
| -## Next steps |
| 109 | +1. On the confirmation page, enter the resource group name, and then select **Delete**. |
102 | 110 |
|
103 |
| -In this quickstart, you created a lab that has a Windows VM. To learn how to connect to and manage lab VMs, see the next tutorial: |
| 111 | +## Related content |
104 | 112 |
|
105 |
| -> [!div class="nextstepaction"] |
106 |
| -> [Tutorial: Work with lab VMs](tutorial-use-custom-lab.md) |
| 113 | +- [Tutorial: Work with lab VMs](tutorial-use-custom-lab.md) |
0 commit comments