You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Connect to your virtual network in Azure Lab Services | Microsoft Docs
3
-
description: Learn how to connect your virtual network with another network. For example, connect your on-premises organization/university network with Lab's virtual network in Azure.
3
+
description: Learn how to connect a lab to one of your networks.
4
4
ms.topic: how-to
5
-
ms.date: 11/11/2021
5
+
ms.date: 2/11/2022
6
6
---
7
7
8
8
# Connect to your virtual network in Azure Lab Services
9
9
10
-
This article provides information about connecting a lab plan to your virtual network.
Some organizations have advanced network requirements and configurations, such as network traffic control, ports management, access to resources in an internal network, etc., that they want to apply to labs.
12
+
This article provides information about connecting a [lab plan](tutorial-setup-lab-plan.md)to your virtual network.
13
13
14
-
In the Azure Lab Services [January 2022 Update (preview)](lab-services-whats-new.md), customers have the option to take full control of the network for the labs using virtual network (VNet) injection. Instead of peering to your virtual network, as was done in previous versions, you can now tell us which virtual network to use, and we’ll inject the necessary resources into your network.
14
+
Some organizations have advanced network requirements and configurations that they want to apply to labs. For example, network requirements can include a network traffic control, ports management, access to resources in an internal network, etc.
15
+
16
+
In the Azure Lab Services [January 2022 Update (preview)](lab-services-whats-new.md), customers may take control of the network for the labs using virtual network (VNet) injection. You can now tell us which virtual network to use, and we’ll inject the necessary resources into your network. VNet injection replaces the [peering to your virtual network](how-to-connect-peer-virtual-network.md), as was done in previous versions.
15
17
16
18
With VNet injection, you can connect to on premise resources such as licensing servers and use user defined routes (UDRs).
17
19
18
20
## Overview
19
21
20
-
You can bring your own virtual network to your lab plan when you create the lab plan.
22
+
You can connect to your own virtual network to your lab plan when you create the lab plan.
21
23
22
24
> [!IMPORTANT]
23
25
> VNet injection must be configured when creating a lab plan. It can't be added later.
24
26
25
27
Before you configure VNet injection for your lab plan:
26
28
27
-
- You must create a virtual network. See [Create a virtual network](/azure/virtual-network/quick-create-portal).
28
-
- The virtual network must be in the same region as the lab plan.
29
-
- Create a subnet for the virtual network and delegate it to **Microsoft.LabServices/labplans**. See [Add or remove a subnet delegation](/azure/virtual-network/manage-subnet-delegation).
29
+
-[Create a virtual network](/azure/virtual-network/quick-create-portal). The virtual network must be in the same region as the lab plan.
30
+
-[Create a subnet](/azure/virtual-network/virtual-network-manage-subnet) for the virtual network.
31
+
-[Create a network security group (NSG)](/azure/virtual-network/manage-network-security-group) and apply it to the subnet.
32
+
-[Delegate the subnet](#delegate-the-virtual-network-subnet-for-use-with-a-lab-plan) to **Microsoft.LabServices/labplans**.
30
33
31
-
Certain on-premises networks are connected to Azure Virtual Network either through [ExpressRoute](../expressroute/expressroute-introduction.md) or [Virtual Network Gateway](../vpn-gateway/vpn-gateway-about-vpngateways.md). These services must be set up outside of Azure Lab Services. To learn more about connecting an on-premises network to Azure using ExpressRoute, see [ExpressRoute overview](../expressroute/expressroute-introduction.md). For on-premises connectivity using a Virtual Network Gateway, the gateway, specified virtual network, and the lab plan must all be in the same region.
34
+
Certain on-premises networks are connected to Azure Virtual Network either through [ExpressRoute](../expressroute/expressroute-introduction.md) or [Virtual Network Gateway](../vpn-gateway/vpn-gateway-about-vpngateways.md). These services must be set up outside of Azure Lab Services. To learn more about connecting an on-premises network to Azure using ExpressRoute, see [ExpressRoute overview](../expressroute/expressroute-introduction.md). For on-premises connectivity using a Virtual Network Gateway, the gateway, specified virtual network, network security group, and the lab plan all must be in the same region.
32
35
33
36
> [!NOTE]
34
37
> If your school needs to perform content filtering, such as for compliance with the [Children's Internet Protection Act (CIPA)](https://www.fcc.gov/consumers/guides/childrens-internet-protection-act), you will need to use 3rd party software. For more information, read guidance on [content filtering with Lab Services](./administrator-guide.md#content-filtering).
35
38
36
39
## Delegate the virtual network subnet for use with a lab plan
37
40
38
-
After you create a subnet for your virtual network, you must the delegate the subnet for use with a lab plan in Azure Lab Services.
41
+
After you create a subnet for your virtual network, you must [delegate the subnet](/azure/virtual-network/subnet-delegation-overview) for use with Azure Lab Services.
39
42
40
43
Only one lab plan at a time can be delegated for use with one subnet.
41
44
42
-
1. In the Virtual Network page, select **Subnets**.
45
+
1. Create a [virtual network](/azure/virtual-network/manage-virtual-network), [subnet](/azure/virtual-network/virtual-network-manage-subnet), and [network security group (NSG)](/azure/virtual-network/manage-network-security-group) if not done already.
46
+
1. Open the **Subnets** page for your virtual network.
47
+
1. Select the subnet you wish to delegate to Lab Services to open the property window for that subnet.
48
+
1. For the **Delegate subnet to a service** property, select **Microsoft.LabServices/labplans**. Select **Save**.
43
49
44
-
2. Open an existing subnet. Or, create a new subnet first. Then, open the existing subnet.
50
+
:::image type="content" source="./media/how-to-connect-vnet-injection/delegate-subnet-for-azure-lab-services.png" alt-text="Screenshot of properties windows for subnet. The Delegate subnet to a service property is highlighted and set to Microsoft dot Lab Services forward slash lab plans.":::
51
+
1. For the **Network security group** property, select the NSG you created earlier.
45
52
46
-
3. In **Delegate subnet to a service** and then select **Microsoft.LabServices/labplans**.
53
+
> [!WARNING]
54
+
> An NSG is required to allow access to the template and lab VMs. For more information about Lab Services architecture, see [Architecture Fundamentals in Azure Lab Services](classroom-labs-fundamentals.md).
47
55
48
-
:::image type="content" source="./media/how-to-connect-vnet-injection/delegate-subnet-for-azure-lab-services.png" alt-text="Delegate a subnet":::
56
+
:::image type="content" source="./media/how-to-connect-vnet-injection/subnet-select-nsg.png" alt-text="Screenshot of properties windows for subnet. The Network security group property is highlighted.":::
49
57
50
-
4. Save the subnet and verify that the lab plan service appears in the **Delegated to** column.
58
+
1. Verify the lab plan service appears in the **Delegated to** column. Verify the NSG appears in the **Security group** column.
:::image type="content" source="./media/how-to-connect-vnet-injection/delegated-subnet.png" alt-text="Screenshot of list of subnets for a virtual network. The Delegated to and Security group columns are highlighted.":::
53
61
54
-
## Add the virtual network at the time of lab plan creation
62
+
## Connect the virtual network during lab plan creation
55
63
64
+
1. Sign in to the [Azure portal](https://portal.azure.com).
65
+
1. Select **Create a resource** in the upper left-hand corner of the Azure portal.
66
+
1. Search for **lab plan**. (**Lab plan (preview)** can also be found under the **DevOps** category.)
67
+
1. Enter required information on the **Basics** tab of the **Create a lab plan** page. For more information, see [Tutorial: Create a lab plan with Azure Lab Services](tutorial-setup-lab-plan.md).
56
68
1. From the **Basics** tab of the **Create a lab plan** page, select **Next: Networking** at the bottom of the page.
57
-
2. To host on a virtual network, select**Enable advanced networking**.
69
+
1. Select**Enable advanced networking**.
58
70
59
-
1. For **Virtual network**, select an existing virtual network for the lab network. For a virtual network to appear in this list, it must be in the same region as the lab plan. For more information, see [Connect to your virtual network](how-to-connect-vnet-injection.md).
60
-
2. Specify an existing **subnet** for VMs in the lab. For a subnet to appear in this list, it must be delegated for use with lab plans when you configure the subnet for the virtual network. For more information, see [Add a virtual network subnet](/azure/virtual-network/virtual-network-manage-subnet).
71
+
1. For **Virtual network**, select an existing virtual network for the lab network. For a virtual network to appear in this list, it must be in the same region as the lab plan.
72
+
2. Specify an existing **subnet** for VMs in the lab. For subnet requirements, see [Delegate the virtual network subnet for use with a lab plan](#delegate-the-virtual-network-subnet-for-use-with-a-lab-plan).
61
73
62
-
:::image type="content" source="./media/how-to-manage-lab-plans/create-lab-plan-advanced-networking.png" alt-text="Create lab plan -> Networking":::
74
+
:::image type="content" source="./media/how-to-connect-vnet-injection/create-lab-plan-advanced-networking.png" alt-text="Screenshot of the Networking tab of the Create a lab plan wizard.":::
63
75
64
76
Once you have a lab plan configured with advanced networking, all labs created with this lab plan use the specified subnet.
65
77
66
-
## Configure the subnet after the lab plan is created
67
-
68
-
Once you delegate a subnet for use with Azure Lab Services, the subnet is locked and you can't configure its settings.
69
-
70
-
So, if you need to make changes to the subnet, first delete the lab, then delete the subnet. Create a new subnet with the desired properties.
71
-
72
78
## Known issues
73
79
74
80
- Deleting your virtual network or subnet will cause the lab to stop working
@@ -79,6 +85,6 @@ So, if you need to make changes to the subnet, first delete the lab, then delete
79
85
80
86
See the following articles:
81
87
82
-
-[Attach a compute gallery to a lab](how-to-attach-detach-shared-image-gallery.md)
83
-
-[View firewall settings for a lab](how-to-configure-firewall-settings.md)
84
-
-[Configure other settings for a lab](how-to-configure-auto-shutdown-lab-plans.md)
88
+
-As an admin, [attach a compute gallery to a lab plan](how-to-attach-detach-shared-image-gallery.md).
89
+
-As an admin, [configure automatic shutdown settings for a lab plan](how-to-configure-auto-shutdown-lab-plans.md).
90
+
-As an admin, [add lab creators to a lab plan](add-lab-creator.md).
0 commit comments