|
1 | 1 | ---
|
2 |
| -title: Create a lab using Azure DevTest Labs and Azure Resource Manager template |
| 2 | +title: Create a lab in Azure DevTest Labs by using an Azure Resource Manager template |
3 | 3 | description: In this quickstart, you create a lab in Azure DevTest Labs by using an Azure Resource Manager template (ARM template). A lab admin sets up a lab, creates VMs in the lab, and configures policies.
|
4 | 4 | ms.topic: quickstart
|
5 | 5 | ms.custom: subject-armqs
|
6 |
| -ms.date: 06/26/2020 |
| 6 | +ms.date: 10/15/2021 |
7 | 7 | ---
|
8 | 8 |
|
9 |
| -# Quickstart: Set up a lab by using Azure DevTest Labs ARM template |
10 |
| -In this quickstart, you create a lab with a Windows Server 2019 Datacenter VM by using an Azure Resource Manager template (ARM template). |
| 9 | +# Quickstart: Use an ARM template to create a lab in DevTest Labs |
| 10 | + |
| 11 | +In this quickstart, you use an Azure Resource Manager template (ARM template) to create a lab in Azure DevTest Labs. The lab contains a Windows Server 2019 Datacenter virtual machine (VM). |
11 | 12 |
|
12 | 13 | [!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)]
|
13 | 14 |
|
14 | 15 | In this quickstart, you do the following actions:
|
15 | 16 |
|
16 | 17 | > [!div class="checklist"]
|
17 |
| -> * Review the template |
18 |
| -> * Deploy the template |
19 |
| -> * Verify the template |
20 |
| -> * Cleanup resources |
21 |
| -
|
22 |
| -If your environment meets the prerequisites and you're familiar with using ARM templates, select the **Deploy to Azure** button. The template will open in the Azure portal. |
23 |
| - |
24 |
| -[](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%2Fazuredeploy.json) |
| 18 | +> * Review the template. |
| 19 | +> * Deploy the template. |
| 20 | +> * Verify the deployment. |
| 21 | +> * Clean up resources. |
25 | 22 |
|
26 | 23 | ## Prerequisites
|
27 | 24 |
|
28 | 25 | If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
|
29 | 26 |
|
30 | 27 | ## Review the template
|
31 | 28 |
|
32 |
| -The template used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/dtl-create-lab-windows-vm/). |
| 29 | +This quickstart uses the [Creates a lab in Azure DevTest Labs with a Windows Server VM](https://azure.microsoft.com/resources/templates/dtl-create-lab-windows-vm/) template. The template defines the following resources: |
| 30 | + |
| 31 | +- [Microsoft.DevTestLab/labs](/azure/templates/microsoft.devtestlab/labs) |
| 32 | +- [Microsoft.DevTestLab labs/virtualnetworks](/azure/templates/microsoft.devtestlab/labs/virtualnetworks) |
| 33 | +- [Microsoft.DevTestLab labs/virtualmachines](/azure/templates/microsoft.devtestlab/labs/virtualmachines) |
33 | 34 |
|
34 | 35 | :::code language="json" source="~/quickstart-templates/quickstarts/microsoft.devtestlab/dtl-create-lab-windows-vm/azuredeploy.json":::
|
35 | 36 |
|
36 |
| -The resources defined in the template include: |
| 37 | +For more ARM template samples, see [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Devtestlab). |
| 38 | + |
| 39 | +## Deploy the template |
37 | 40 |
|
38 |
| -- [**Microsoft.DevTestLab/labs**](/azure/templates/microsoft.devtestlab/labs) |
39 |
| -- [**Microsoft.DevTestLab labs/virtualnetworks**](/azure/templates/microsoft.devtestlab/labs/virtualnetworks) |
40 |
| -- [**Microsoft.DevTestLab labs/virtualmachines**](/azure/templates/microsoft.devtestlab/labs/virtualmachines) |
| 41 | +1. Select the following **Deploy to Azure** button to use the ARM template. The template opens the lab creation screen in the Azure portal: |
41 | 42 |
|
42 |
| -To find more template samples, see [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Devtestlab). |
| 43 | + [](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%2Fazuredeploy.json) |
43 | 44 |
|
44 |
| -## Deploy the template |
45 |
| -To run the deployment automatically, click the following button. |
| 45 | +1. On the **Creates a lab in Azure DevTest Labs with a Windows Server VM** screen, fill out the following items: |
46 | 46 |
|
47 |
| -[](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%2Fazuredeploy.json) |
| 47 | + - **Resource group**, create a new resource group so it's easy to clean up later. |
| 48 | + - **Region**, select a location for the resource group. |
| 49 | + - **Lab Name**, enter a name for the new lab instance. |
| 50 | + - **Vm Name**, enter a name for the VM to create. |
| 51 | + - **User Name**, enter a name for the user who can access the VM. |
| 52 | + - **Password**, enter a password for the user. |
48 | 53 |
|
49 |
| -1. Create a **new resource group** so that it's easy to clean up later. |
50 |
| -1. Select a **location** for the resource group. |
51 |
| -1. Enter a **name for the lab**. |
52 |
| -1. Enter a **name for the VM**. |
53 |
| -1. Enter a **user name** who can access the VM. |
54 |
| -1. Enter **password** for the user. |
55 |
| -1. Select **I agree to the terms and conditions stated above**. |
56 |
| -1. Then, select **Purchase**. |
| 54 | +1. Select **Review + create**, and when validation passes, select **Create**. |
57 | 55 |
|
58 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/deploy-template-page.png" alt-text="Deploy Template page"::: |
| 56 | + :::image type="content" source="./media/create-lab-windows-vm-template/deploy-template-page.png" alt-text="Screenshot of the Create a lab page."::: |
59 | 57 |
|
60 | 58 | ## Validate the deployment
|
61 |
| -1. Select **Notifications** at the top to see the status of the deployment, and click **Deployment in progress** link. |
| 59 | +1. During the deployment, you can select **Notifications** at the top of your screen, and select **Deployment in progress** to see the deployment **Overview** page. Deployment, especially creating a VM, takes a while. |
| 60 | + |
| 61 | + :::image type="content" source="./media/create-lab-windows-vm-template/deployment-notification.png" alt-text="Screenshot showing the deployment in progress."::: |
| 62 | + |
| 63 | +1. When the deployment is complete, select **Go to resource group** to go to the resource group for your lab. |
| 64 | + |
| 65 | + :::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."::: |
62 | 66 |
|
63 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/deployment-notification.png" alt-text="Deployment notification"::: |
64 |
| -2. On the **Deployment - Overview** page, wait until the deployment is complete. This operation (especially, creating a VM) takes some time to complete. Then, select your **Go to resource group** or the **name of the resource group** as shown in the following image: |
| 67 | +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 your **DevTest Lab** resource to go to your lab's **Overview** page. |
65 | 68 |
|
66 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/navigate-resource-group.png" alt-text="Navigate to resource group"::: |
67 |
| -3. On the **Resource group** page, you see the list of resources in the resource group. Confirm that you see your lab of type: `DevTest Lab` in the resources. You also see the dependent resources such as virtual network and virtual machine in the resource group. |
| 69 | +1. On your lab's **Overview** page, select **Claimable virtual machines**. |
68 | 70 |
|
69 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/resource-group-home-page.png" alt-text="Resource group's home page"::: |
70 |
| -4. Select your lab from the list of resource to see the home page for your lab. Confirm that you see the Windows Server 2019 Datacenter VM in the **My virtual machines** list. In the following image, the **Essentials** section is minimized. |
| 71 | + :::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 Claimable virtual machines link."::: |
71 | 72 |
|
72 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/lab-home-page.png" alt-text="Home page for the lab"::: |
| 73 | +1. On the **Claimable virtual machines** page, select the **More options** ellipsis next to the VM, and select **Claim machine**. |
73 | 74 |
|
74 |
| - > [!IMPORTANT] |
75 |
| - > Keep this page open and follow instructions in the next section to clean up resources to avoid costs for running the lab and the VM on Azure. If you want to go through the next tutorial to test accessing the VM in the lab, clean up resources after you go through that tutorial. |
| 75 | + :::image type="content" source="./media/create-lab-windows-vm-template/claim-vm.png" alt-text="Screenshot that shows the Claimable virtual machines page with the Claim machine option."::: |
| 76 | + |
| 77 | +1. On the lab **Overview** page, confirm that the VM appears under **My virtual machines** with status **Starting**. Wait for the status to change to **Running**. |
| 78 | + |
| 79 | + :::image type="content" source="./media/create-lab-windows-vm-template/lab-vm.png" alt-text="Screenshot that shows the lab Overview page with the V M listed."::: |
76 | 80 |
|
77 | 81 | ## Clean up resources
|
78 | 82 |
|
79 |
| -1. First, delete the lab so that you can delete the resource group. You won't be able to delete the resource group with a lab in it. To delete the lab, select **Delete** on the toolbar. |
| 83 | +Delete the quickstart resources to avoid charges for running the lab and VM on Azure. If you plan to go through the next tutorial to access the VM in the lab, you can clean up the resources after you finish that tutorial. |
80 | 84 |
|
81 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/delete-lab-button.png" alt-text="Delete lab button"::: |
82 |
| - 2. On the confirmation page, type the **lab name**, and select **Delete**. |
83 |
| - 3. Wait until the lab is deleted. Select the **bell** icon to see notification from the delete operation. This process takes some time. Confirm the lab deletion, and then select the **resource group** on the breadcrumb menu. |
84 |
| - |
85 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/confirm-lab-deletion.png" alt-text="Confirm deletion of VM in notifications"::: |
86 |
| - 1. On the **Resource group** page, select **Delete resource group** from the toolbar. On the confirmation page, type the **resource group name**, and select **Delete**. Check the notifications to confirm that the resource group is deleted. |
| 85 | +You can't delete a resource group with a lab in it. First delete the lab so you can delete the resource group. |
| 86 | + |
| 87 | +1. From the lab's home page, select **Delete** on the toolbar. |
| 88 | + |
| 89 | + :::image type="content" source="./media/create-lab-windows-vm-template/delete-lab-button.png" alt-text="Screenshot that shows the Delete button on the lab home page."::: |
| 90 | + |
| 91 | +1. On the confirmation page, type the lab name, and then select **Delete**. |
| 92 | + |
| 93 | +1. During the deletion, you can select **Notifications** at the top of your screen to view progress. Deleting the lab takes awhile. |
| 94 | + |
| 95 | +1. Once the lab is deleted, select the **Resource group** on the lab's home page. If the lab's home page is no longer available, search for **Resource groups** in the Azure search box, and then select the resource group that contained your lab. |
| 96 | + |
| 97 | + :::image type="content" source="./media/create-lab-windows-vm-template/confirm-lab-deletion.png" alt-text="Screenshot that shows deletion confirmation in notifications."::: |
| 98 | + |
| 99 | +1. On the **Resource group** page, select **Delete resource group** from the toolbar. On the confirmation page, type the resource group name, and select **Delete**. You can check notifications to confirm that the resource group is deleted. |
87 | 100 |
|
88 |
| - :::image type="content" source="./media/create-lab-windows-vm-template/delete-resource-group-button.png" alt-text="Delete resource group button"::: |
| 101 | + :::image type="content" source="./media/create-lab-windows-vm-template/delete-resource-group-button.png" alt-text="Screenshot that shows the Delete resource group button."::: |
89 | 102 |
|
90 | 103 | ## Next steps
|
91 |
| -In this quickstart, you created a lab with a VM. To learn about how to access the lab, advance to the next tutorial: |
| 104 | +In this quickstart, you created a lab that has a VM. To learn how to access the lab and VM, advance to the next tutorial: |
92 | 105 |
|
93 | 106 | > [!div class="nextstepaction"]
|
94 | 107 | > [Tutorial: Access the lab](tutorial-use-custom-lab.md)
|
0 commit comments