Breyta

Deila með


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

Add a virtual network to a lab

To add a configured virtual network and subnet to a lab, follow these steps:

  1. In the Azure portal, go to your lab resource.

  2. On the Overview page, expand the Settings section on the left menu, and select Configuration and policies:

    Screenshot that shows how to select the Configuration and policies option for a lab in the Azure portal.

    The Activity log view opens for the lab where you can review configuration and policies settings.

  3. On the left menu, expand the External resources section, and select Virtual networks to view the lab's current virtual networks.

  4. On the Virtual networks page, select Add:

    Screenshot that shows how to add a new virtual network for a lab in the Azure portal.

  5. On the Virtual network page, choose the Select virtual network option:

    Screenshot that shows to choose the Select virtual network option on the Virtual network page.

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

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

  7. The virtual network that you select appears on the Virtual network page. Select Save to add the virtual network to your lab:

    Screenshot that shows how to save the selected virtual network to your lab in the Azure portal.

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

    Screenshot that shows how to select the added virtual network on the lab's Virtual networks page when the statue is ready.

  9. The Virtual network page shows the subnets for the new virtual network. Select a subnet to configure:

    Screenshot that shows how to select the subnet for the new virtual network for the lab.

  10. On the Lab Subnet pane, configure the following options:

    • Use in virtual machine creation: Allow or disallow virtual machine (VM) creation in the subnet.
    • Enable shared public IP: Enable or disable a shared public IP address.
    • Allow public IP creation: Allow or disallow creating public IP addresses in the subnet.
    • 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.
  11. On the Lab Subnet pane, select Save. The Virtual network page refreshes to show the configured subnet for the virtual network.

  12. On the Virtual network page, select Save to apply the virtual network subnet changes to your lab.

Create VMs in a virtual network

When you allow VM creation in a subnet, you can create lab VMs in the added virtual network with these steps:

  1. Add a lab VM and select a VM base by following the instructions in Create and add virtual machines.

  2. On the Create lab resource screen, select the Advanced settings tab.

  3. Expand the Virtual network dropdown list and select the virtual network you added.

  4. As necessary, expand the Subnet Selector dropdown list and select the desired subnet.

  5. Continue with creating the VM.