|
1 | 1 | ---
|
2 |
| -title: Configure a virtual network |
3 |
| -description: Learn how to configure an existing virtual network and subnet to use for creating virtual machines in Azure DevTest Labs. |
| 2 | +title: Add and configure virtual network |
| 3 | +titleSuffix: Azure DevTest Labs |
| 4 | +description: Learn how to add and configure an existing virtual network and subnet to use for creating virtual machines in Azure DevTest Labs. |
4 | 5 | ms.topic: how-to
|
5 | 6 | ms.author: rosemalcolm
|
6 | 7 | author: RoseHJM
|
7 |
| -ms.date: 09/30/2023 |
| 8 | +ms.date: 06/02/2024 |
8 | 9 | ms.custom: UpdateFrequency2
|
| 10 | + |
| 11 | +#customer intent: As a developer, I want to add and configure virtual networks and subnets in Azure DevTest Labs so I can use them to create virtual machines. |
9 | 12 | ---
|
10 | 13 |
|
11 |
| -# Add a virtual network in Azure DevTest Labs |
| 14 | +# Add virtual network in Azure DevTest Labs |
12 | 15 |
|
13 | 16 | In this article, you learn how to add a virtual network to a lab, and configure it for creating lab virtual machines (VMs).
|
14 | 17 |
|
15 |
| -Azure DevTest Labs creates a new virtual network for each lab. If you have another virtual network, such as one configured with Azure ExpressRoute or site-to-site virtual private network (VPN), you can add it to your lab. You can then create lab VMs in that virtual network. |
| 18 | +Azure DevTest Labs creates a new virtual network for each lab. If you have an existing virtual network, such as one configured with Azure ExpressRoute or site-to-site virtual private network (VPN), you can add this network to your lab. You can then create lab VMs in that virtual network. |
16 | 19 |
|
17 | 20 | ## Add a virtual network to a lab
|
18 | 21 |
|
19 |
| -To add a configured virtual network and subnet to a lab, take the following steps: |
| 22 | +To add a configured virtual network and subnet to a lab, follow these steps: |
| 23 | + |
| 24 | +1. In the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040), go to your lab resource. |
20 | 25 |
|
21 |
| -1. In the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040), on the **Overview** page for your lab, select **Configuration and policies** from the left navigation. |
| 26 | +1. On the **Overview** page, expand the **Settings** section on the left menu, and select **Configuration and policies**: |
22 | 27 |
|
23 |
| - :::image type="content" source="./media/devtest-lab-configure-vnet/policies-menu.png" alt-text="Screenshot that shows the Configuration and policies menu for a lab."::: |
| 28 | + :::image type="content" source="./media/devtest-lab-configure-vnet/policies-menu.png" alt-text="Screenshot that shows how to select the Configuration and policies option for a lab in the Azure portal." border="false" lightbox="./media/devtest-lab-configure-vnet/policies-menu.png"::: |
24 | 29 |
|
25 |
| -1. On the **Configuration and policies** page, in the left navigation under **External resources**, select **Virtual networks**. |
| 30 | + The **Activity log** view opens for the lab where you can review configuration and policies settings. |
26 | 31 |
|
27 |
| -1. The **Virtual networks** page shows the lab's current virtual networks. Select **Add**. |
| 32 | +1. On the left menu, expand the **External resources** section, and select **Virtual networks** to view the lab's current virtual networks. |
| 33 | + |
| 34 | +1. On the **Virtual networks** page, select **Add**: |
28 | 35 |
|
29 |
| - :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnet-add.png" alt-text="Screenshot that shows a lab's Virtual networks page with Add selected."::: |
| 36 | + :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnet-add.png" alt-text="Screenshot that shows how to add a new virtual network for a lab in the Azure portal." lightbox="./media/devtest-lab-configure-vnet/lab-settings-vnet-add.png"::: |
30 | 37 |
|
31 |
| -1. On the **Virtual network** page, select **Select virtual network**. |
| 38 | +1. On the **Virtual network** page, choose the **Select virtual network** option: |
32 | 39 |
|
33 |
| - :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnets-vnet1.png" alt-text="Screenshot that shows Select virtual network selected on the Virtual network page."::: |
| 40 | + :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnet-select.png" alt-text="Screenshot that shows to choose the Select virtual network option on the Virtual network page." lightbox="./media/devtest-lab-configure-vnet/lab-settings-vnet-select.png"::: |
34 | 41 |
|
35 |
| -1. The **Choose virtual network** page appears, showing all virtual networks in the subscription that are in the same region as the lab. Select the virtual network you want to add. |
| 42 | +1. The **Choose virtual network** page shows all virtual networks in the subscription that are in the same region as the lab. Select the virtual network that you want to add to your lab: |
36 | 43 |
|
37 |
| - :::image type="content" source="./media/devtest-lab-configure-vnet/choose-virtual-network.png" alt-text="Screenshot that shows the Choose virtual network page with a list of virtual networks."::: |
| 44 | + :::image type="content" source="./media/devtest-lab-configure-vnet/choose-virtual-network.png" alt-text="Screenshot that shows the Choose virtual network page with a list of available virtual networks for the lab." lightbox="./media/devtest-lab-configure-vnet/choose-virtual-network.png"::: |
38 | 45 |
|
39 |
| -1. The virtual network you chose shows on the **Virtual network** page. Select **Save**. |
| 46 | +1. The virtual network that you select appears on the **Virtual network** page. Select **Save** to add the virtual network to your lab: |
40 | 47 |
|
41 |
| -1. The virtual network appears in the list on the lab's **Virtual networks** page. When the **Status** shows as **Ready**, select the new virtual network. |
| 48 | + :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnet-save.png" alt-text="Screenshot that shows how to save the selected virtual network to your lab in the Azure portal." lightbox="./media/devtest-lab-configure-vnet/lab-settings-vnet-save.png"::: |
42 | 49 |
|
43 |
| - :::image type="content" source="./media/devtest-lab-configure-vnet/lab-subnet.png" alt-text="Screenshot that shows the added virtual network on the lab's Virtual networks page."::: |
| 50 | +1. The added virtual network appears in the list for the lab on the **Virtual networks** page. When the **Status** for the new virtual network shows as **Ready**, select the network: |
44 | 51 |
|
45 |
| -1. The **Virtual network** page shows the subnets for the virtual network. Select a subnet to configure. |
| 52 | + :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnet-ready.png" alt-text="Screenshot that shows how to select the added virtual network on the lab's Virtual networks page when the statue is ready." lightbox="./media/devtest-lab-configure-vnet/lab-settings-vnet-ready.png"::: |
46 | 53 |
|
47 |
| -1. On the **Lab Subnet** pane, select **Yes** or **No** under the following options: |
| 54 | +1. The **Virtual network** page shows the subnets for the new virtual network. Select a subnet to configure: |
48 | 55 |
|
49 |
| - - **Use in virtual machine creation** to allow or disallow VM creation in the subnet. |
50 |
| - - **Enable shared public IP** to enable or disable a [shared public IP address](devtest-lab-shared-ip.md). |
51 |
| - - **Allow public IP creation** to allow or disallow creating public IP addresses in the subnet. |
| 56 | + :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnet-subnet.png" alt-text="Screenshot that shows how to select the subnet for the new virtual network for the lab." lightbox="./media/devtest-lab-configure-vnet/lab-settings-vnet-subnet.png"::: |
52 | 57 |
|
53 |
| -1. Under **Maximum virtual machines per user**, enter the maximum number of VMs each user can create in the subnet. If you don't want to restrict the number of VMs, leave this field blank. |
| 58 | +1. On the **Lab Subnet** pane, configure the following options: |
54 | 59 |
|
55 |
| -1. Select **Save**. |
| 60 | + - **Use in virtual machine creation**: Allow or disallow virtual machine (VM) creation in the subnet. |
| 61 | + - **Enable shared public IP**: Enable or disable a [shared public IP address](devtest-lab-shared-ip.md). |
| 62 | + - **Allow public IP creation**: Allow or disallow creating public IP addresses in the subnet. |
| 63 | + - **Maximum virtual machines per user**: Specify the maximum number of VMs each user can create in the subnet. If you don't want to restrict the number of VMs, leave this field blank. |
56 | 64 |
|
57 |
| - :::image type="content" source="./media/devtest-lab-configure-vnet/lab-settings-vnets-vnet2.png" alt-text="Screenshot that shows the settings for the Lab subnet pane."::: |
| 65 | +1. On the **Lab Subnet** pane, select **Save**. The **Virtual network** page refreshes to show the configured subnet for the virtual network. |
58 | 66 |
|
59 |
| -1. On the **Virtual network** page, select **Save** again. |
| 67 | +1. On the **Virtual network** page, select **Save** to apply the virtual network subnet changes to your lab. |
60 | 68 |
|
61 | 69 | ## Create VMs in a virtual network
|
62 | 70 |
|
63 |
| -If you allowed VM creation in one of the subnets, you can now create lab VMs in the added virtual network. |
| 71 | +When you allow VM creation in a subnet, you can create lab VMs in the added virtual network with these steps: |
| 72 | + |
| 73 | +1. Add a lab VM and select a VM base by following the instructions in [Create and add virtual machines](devtest-lab-add-vm.md). |
64 | 74 |
|
65 |
| -1. Follow the instructions at [Create and add virtual machines](devtest-lab-add-vm.md) to add a lab VM and select a VM base. |
66 | 75 | 1. On the **Create lab resource** screen, select the **Advanced settings** tab.
|
67 |
| -1. Select the drop-down arrow in the **Virtual network** field, and select the virtual network you added. |
68 |
| -1. If necessary, select the drop-down arrow in the **Subnet Selector** field, and select the subnet you want. |
69 |
| -1. Proceed with VM creation. |
70 | 76 |
|
71 |
| -## Next steps |
| 77 | +1. Expand the **Virtual network** dropdown list and select the virtual network you added. |
| 78 | + |
| 79 | +1. As necessary, expand the **Subnet Selector** dropdown list and select the desired subnet. |
| 80 | + |
| 81 | +1. Continue with creating the VM. |
| 82 | + |
| 83 | +## Related content |
72 | 84 |
|
73 |
| -- For more information about how to set up, use, and manage virtual networks, see the [Azure virtual network documentation](../virtual-network/index.yml). |
74 |
| -- You can deploy [Azure Bastion](https://azure.microsoft.com/services/azure-bastion) in a new or existing virtual network to enable browser connection to your lab VMs. For more information, see [Enable browser connection to DevTest Labs VMs with Azure Bastion](enable-browser-connection-lab-virtual-machines.md). |
| 85 | +- [Azure virtual network documentation](../virtual-network/index.yml) |
| 86 | +- [Enable browser connection to DevTest Labs VMs with Azure Bastion](enable-browser-connection-lab-virtual-machines.md) |
0 commit comments