|
1 | 1 | ---
|
2 |
| -title: Configure a virtual network |
3 |
| -description: Learn how to configure an existing virtual network and subnet, and use them in a VM with Azure DevTest Labs |
| 2 | +title: Add and configure a virtual network for a lab |
| 3 | +description: Learn how to configure an existing virtual network and subnet to use for creating virtual machines in Azure DevTest Labs. |
4 | 4 | ms.topic: how-to
|
5 |
| -ms.date: 06/26/2020 |
| 5 | +ms.date: 02/15/2022 |
6 | 6 | ---
|
7 | 7 |
|
8 |
| -# Configure a virtual network in Azure DevTest Labs |
9 |
| -As explained in the article [Add a VM to a lab](devtest-lab-add-vm.md), when you create a VM in a lab, you can specify a configured virtual network. |
10 |
| -For example, you might need to access your corpnet resources from your VMs using the virtual network that was configured with ExpressRoute or site-to-site VPN. |
| 8 | +# Add a virtual network in Azure DevTest Labs |
11 | 9 |
|
12 |
| -This article explains how to add your existing virtual network into a lab's Virtual Network settings so that it is available to choose when creating VMs. |
| 10 | +Azure DevTest Labs creates a new virtual network for each lab. If you have another virtual network configured with Azure ExpressRoute or site-to-site VPN, you can add it to your lab. You can then create lab virtual machines (VMs) in that virtual network. This article explains how to add a virtual network to a lab and configure it for creating lab VMs. |
13 | 11 |
|
14 |
| -> [!NOTE] |
15 |
| -> To learn about costs associated with the Azure Virtual Network service, see [Pricing for Azure Virtual Network](../virtual-network/virtual-networks-overview.md#pricing). |
| 12 | +## Add a virtual network to a lab |
16 | 13 |
|
17 |
| -## Configure a virtual network for a lab using the Azure portal |
18 |
| -The following steps walk you through adding an existing virtual network (and subnet) to a lab so that it can be used when creating a VM in the same lab. |
| 14 | +To add a configured virtual network and subnet to a lab, take the following steps: |
19 | 15 |
|
20 |
| -1. Sign in to the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040). |
21 |
| -1. Select **All Services**, and then select **DevTest Labs** from the list. |
22 |
| -1. From the list of labs, select the desired lab. |
23 |
| -1. On the lab's main pane, select **Configuration and policies**. |
| 16 | +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. |
24 | 17 |
|
25 |
| -  |
26 |
| -1. In the **EXTERNAL RESOURCES** section, select **Virtual networks**. A list of virtual networks configured for the current lab is displayed as well as the default virtual network created for your lab. |
27 |
| -1. Select **+ Add**. |
28 |
| - |
29 |
| -  |
30 |
| -1. On the **Virtual network** pane, select **[Select virtual network]**. |
| 18 | + :::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."::: |
| 19 | + |
| 20 | +1. On the **Configuration and policies** page, in the left navigation under **External resources**, select **Virtual networks**. |
| 21 | + |
| 22 | +1. The **Virtual networks** page shows the lab's current virtual networks. Select **Add**. |
31 | 23 |
|
32 |
| -  |
33 |
| -1. On the **Choose virtual network** pane, select the desired virtual network. A list is displayed showing all of the virtual networks that are under the same region in the subscription as the lab. |
34 |
| -1. After selecting a virtual network, you are returned to the **Virtual network** pane. Select the subnet in the list at the bottom. |
| 24 | + :::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."::: |
| 25 | + |
| 26 | +1. On the **Virtual network** page, select **Select virtual network**. |
| 27 | + |
| 28 | + :::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."::: |
| 29 | + |
| 30 | +1. The **Choose virtual network** page shows all the virtual networks in the subscription that are in the same region as the lab. Select the virtual network you want to add. |
| 31 | + |
| 32 | + :::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."::: |
35 | 33 |
|
36 |
| -  |
37 |
| - |
38 |
| - The Lab Subnet pane is displayed. |
| 34 | +1. The **Virtual network** page shows the virtual network name you chose. Select **Save**. |
39 | 35 |
|
40 |
| -  |
41 |
| - |
42 |
| - - Specify a **Lab subnet name**. |
43 |
| - - To allow a subnet to be used in lab VM creation, select **Use in virtual machine creation**. |
44 |
| - - To enable a [shared public IP address](devtest-lab-shared-ip.md), select **Enable shared public IP**. |
45 |
| - - To allow public IP addresses in a subnet, select **Allow public IP creation**. |
46 |
| - - In the **Maximum virtual machines per user** field, specify the maximum VMs per user for each subnet. If you want an unrestricted number of VMs, leave this field blank. |
47 |
| -1. Select **OK** to close the Lab Subnet pane. |
48 |
| -1. Select **Save** to close the Virtual network pane. |
| 36 | +1. The chosen virtual network now appears in the list on the lab's **Virtual networks** page. Select the new network name. |
49 | 37 |
|
50 |
| -Now that the virtual network is configured, it can be selected when creating a VM. |
51 |
| - To see how to create a VM and specify a virtual network, refer to the article, [Add a VM to a lab](devtest-lab-add-vm.md). |
| 38 | +1. The **Virtual network** page shows the subnets for the virtual network. Select a subnet to configure. |
52 | 39 |
|
53 |
| -Azure's [Virtual Network Documentation](../virtual-network/index.yml) provides more information about how to use VNets, including how to set up and manage a VNet and connect it to your on-premises network. |
| 40 | +1. On the **Lab Subnet** pane, select **Yes** or **No** under the following options: |
54 | 41 |
|
55 |
| -[!INCLUDE [devtest-lab-try-it-out](../../includes/devtest-lab-try-it-out.md)] |
| 42 | + - **Use in virtual machine creation** to allow VM creation in the subnet. |
| 43 | + - **Enable shared public IP** to enable a [shared public IP address](devtest-lab-shared-ip.md). |
| 44 | + - **Allow public IP creation** to allow public IP addresses in the subnet |
| 45 | + |
| 46 | +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. |
| 47 | + |
| 48 | +1. Select **Save**. |
| 49 | + |
| 50 | + :::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."::: |
| 51 | + |
| 52 | +If you chose to allow VM creation in one of the subnets, you can now use the configured virtual network to [create lab VMs](devtest-lab-add-vm.md). |
| 53 | + |
| 54 | +## Add a virtual network during VM creation |
| 55 | + |
| 56 | +You can also specify a configured virtual network to use at the time you create a VM in a lab. For complete details and instructions, see [Create and add virtual machines](devtest-lab-add-vm.md). |
56 | 57 |
|
57 | 58 | ## Next steps
|
58 |
| -Once you have added the desired virtual network to your lab, the next step is to [add a VM to your lab](devtest-lab-add-vm.md). |
| 59 | + |
| 60 | +For information about how to set up, use, and manage virtual networks, see the [Azure virtual network documentation](/azure/virtual-network/index.yml). |
0 commit comments