Add a virtual network in Azure DevTest Labs

In this article, you learn how to add a virtual network to a lab, and configure it for creating lab virtual machines (VMs).

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.

Add a virtual network to a lab

To add a configured virtual network and subnet to a lab, take the following steps:

  1. In the Azure portal, on the Overview page for your lab, select Configuration and policies from the left navigation.

    Screenshot that shows the Configuration and policies menu for a lab.

  2. On the Configuration and policies page, in the left navigation under External resources, select Virtual networks.

  3. The Virtual networks page shows the lab's current virtual networks. Select Add.

    Screenshot that shows a lab's Virtual networks page with Add selected.

  4. On the Virtual network page, select Select virtual network.

    Screenshot that shows Select virtual network selected on the Virtual network page.

  5. 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.

    Screenshot that shows the Choose virtual network page with a list of virtual networks.

  6. The virtual network you chose shows on the Virtual network page. Select Save.

  7. 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.

    Screenshot that shows the added virtual network on the lab's Virtual networks page.

  8. The Virtual network page shows the subnets for the virtual network. Select a subnet to configure.

  9. On the Lab Subnet pane, select Yes or No under the following options:

    • Use in virtual machine creation to allow or disallow VM creation in the subnet.
    • Enable shared public IP to enable or disable a shared public IP address.
    • Allow public IP creation to allow or disallow creating public IP addresses in the subnet.
  10. 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.

  11. Select Save.

    Screenshot that shows the settings for the Lab subnet pane.

  12. On the Virtual network page, select Save again.

Create VMs in a virtual network

If you allowed VM creation in one of the subnets, you can now create lab VMs in the added virtual network.

  1. Follow the instructions at Create and add virtual machines to add a lab VM and select a VM base.
  2. On the Create lab resource screen, select the Advanced settings tab.
  3. Select the drop-down arrow in the Virtual network field, and select the virtual network you added.
  4. If necessary, select the drop-down arrow in the Subnet Selector field, and select the subnet you want.
  5. Proceed with VM creation.

Next steps