|
1 | 1 | ---
|
2 |
| -title: Enable browser connection on Azure DevTest Labs virtual machines |
3 |
| -description: DevTest Labs now integrates with Azure Bastion, as an owner of the lab you can enable accessing all lab virtual machines through a browser. |
| 2 | +title: Enable browser connection to Azure DevTest Labs virtual machines |
| 3 | +description: Integrate Azure Bastion with DevTest Labs to enable accessing lab virtual machines (VMs) through a browser. |
4 | 4 | ms.topic: how-to
|
5 |
| -ms.date: 10/28/2021 |
| 5 | +ms.date: 11/02/2021 |
6 | 6 | ---
|
7 | 7 |
|
8 |
| -# Enable browser connection on Azure DevTest Labs virtual machines |
| 8 | +# Enable browser connection to DevTest Labs VMs |
9 | 9 |
|
10 |
| -DevTest Labs integrates with [Azure Bastion](../bastion/index.yml), which enables you to connect to your virtual machines through a browser. You first need to enable browser connections to lab virtual machines. |
| 10 | +Azure DevTest Labs integrates with [Azure Bastion](../bastion/index.yml) to allow connecting to lab virtual machines (VMs) through a browser. As a lab owner, you can enable browser access to all your lab VMs through Azure Bastion. |
11 | 11 |
|
12 |
| -As an owner of a lab, you can enable accessing all lab virtual machines through a browser. You don't need another client, agent, or piece of software. Azure Bastion provides secure and seamless RDP/SSH connectivity to your virtual machines directly in the Azure portal over TLS. When you connect via Azure Bastion, your virtual machines don't need a public IP address. For more information, see [What is Azure Bastion?](../bastion/bastion-overview.md) |
| 12 | +Azure Bastion provides secure and seamless remote desktop protocol (RDP) and secure shell (SSH) connectivity over transport layer security (TLS), directly from the Azure portal. You don't need any other client, agent, or software to connect to your lab VMs through your browser. Your VMs don't need public IP addresses. |
13 | 13 |
|
14 |
| -In this guide, you'll enable browser connections to lab virtual machines. |
| 14 | +This article covers two different ways to enable Azure Bastion browser connectivity to DevTest Labs VMs: |
| 15 | + |
| 16 | +- You can create a new Azure Bastion-enabled virtual network for your lab and its VMs. |
| 17 | +- You can deploy Azure Bastion in your existing lab virtual network. |
15 | 18 |
|
16 | 19 | ## Prerequisites
|
17 | 20 |
|
18 |
| -- A lab in [Azure DevTest Labs](./devtest-lab-overview.md). |
| 21 | +- Have or [create a lab](tutorial-create-custom-lab.md#create-a-lab) in DevTest Labs. |
| 22 | +- To use Azure Bastion browser access, lab users must have **Reader** role on the Azure Bastion host and on the lab virtual network that has Azure Bastion configured. |
| 23 | + |
| 24 | +## Option 1: Connect a lab to an Azure Bastion-enabled virtual network |
| 25 | + |
| 26 | +First, create a new virtual network with an Azure Bastion subnet and another subnet in it. An Azure Bastion subnet doesn't allow creating non-Azure Bastion resources in it, so you need the other subnet for creating lab VMs. |
| 27 | + |
| 28 | +1. In the Azure portal, search for and select **virtual networks**. |
| 29 | +1. Select **+ Create** at the top of the **Virtual networks** page. |
| 30 | +1. On the **Create virtual network** screen, enter a **Name** for the new virtual network, and select the same **Subscription**, **Resource group**, and **Region** as your lab. |
| 31 | +1. Select **Next: IP Addresses**. |
| 32 | +1. On the **IP Addresses** tab, there's already one subnet, **default**. Select **Add subnet**. |
| 33 | +1. On the **Add subnet** pane, enter *AzureBastionSubnet* under **Name**. |
| 34 | +1. Under **Subnet address range**, enter an address range that's within the virtual network's address space but doesn't overlap with the default subnet. If necessary, you can add new address spaces in the blank fields on the **Create virtual network** page. |
| 35 | +1. Select **Add**. |
| 36 | + |
| 37 | +  |
19 | 38 |
|
20 |
| -- Your lab's virtual network configured with Bastion. See [Create an Azure Bastion host](../bastion/tutorial-create-host-portal.md) for steps on adding Bastion. |
| 39 | +1. Select **Review + create**, and when validation passes, select **Create**. |
| 40 | +1. Once the new virtual network is created, go to its page, select **Subnets** in the left navigation, and confirm that there are two subnets, **default** and **AzureBastionSubnet**. |
21 | 41 |
|
22 |
| -- The lab user needs to be a member of the **Reader** role on the Bastion host and the virtual network that has Bastion configured. |
| 42 | +  |
23 | 43 |
|
24 |
| -## Add virtual network to lab |
| 44 | +Next, connect your lab to the new virtual network: |
25 | 45 |
|
26 |
| -1. Sign in to the [Azure portal](https://portal.azure.com). |
| 46 | +1. From your lab **Overview** page, select **Configuration and policies** in the left navigation. |
| 47 | +1. On the **Configuration and policies** page, select **Virtual networks** under **External resources** in the left navigation. |
| 48 | +1. On the **Configuration and policies | Virtual networks** page, select **Add** at the top. |
| 49 | +1. On the **Virtual network** page, select **Select virtual network**. |
| 50 | +1. On the **Choose virtual network** page, select the Azure Bastion-enabled virtual network you just created. |
| 51 | +1. Select **Save** at the top of the **Virtual network** page. |
| 52 | +1. On the **Configuration and policies | Virtual networks** page, remove any previous virtual network from the lab. Select **...** next to that virtual network, select **Delete**, and then select **Yes**. |
27 | 53 |
|
28 |
| -1. Navigate to your lab in **DevTest Labs**. |
| 54 | +  |
29 | 55 |
|
30 |
| -1. Under **Settings**, select **Configuration and policies**. |
| 56 | +Enable VM creation in the non-Azure Bastion subnet: |
31 | 57 |
|
32 |
| - :::image type="content" source="./media/enable-browser-connection-lab-virtual-machines/portal-lab-configurations-policies.png" alt-text="Screenshot of configurations and policies."::: |
| 58 | +1. On the **Configuration and policies | Virtual networks** page, select the Azure Bastion-enabled virtual network. |
| 59 | +1. On the **Virtual network** page, make sure that both the **AzureBastionSubnet** subnet and the **default** subnet appear. If you don't see both subnets, close and reopen the page. |
| 60 | +1. Select the **default** subnet. |
| 61 | +1. On the **Lab Subnet** screen, under **Use in virtual machine creation**, select **Yes**, and then select **Save**. You can now create VMs in the default subnet of your lab virtual network. |
33 | 62 |
|
34 |
| -1. On the **Configuration and policies** page, under **External resources**, select **Virtual networks**. |
| 63 | +  |
35 | 64 |
|
36 |
| -1. Select your Bastion configured virtual network. |
| 65 | +## Option 2: Deploy Azure Bastion in a lab's existing virtual network |
37 | 66 |
|
38 |
| - :::image type="content" source="./media/enable-browser-connection-lab-virtual-machines/virtual-network-added.png" alt-text="Screenshot of added virtual network."::: |
| 67 | +First, create a new Azure Bastion subnet in your lab's existing virtual network: |
39 | 68 |
|
40 |
| -1. On the **Virtual network** page, select the subnet for VMs, not **AzureBastionSubnet**. |
| 69 | +1. In the Azure portal, search for and select **Virtual networks**. |
| 70 | +1. Select your lab's existing virtual network from the list on the **Virtual networks** page. |
| 71 | +1. On the virtual network page, select **Subnets** in the left navigation, |
| 72 | +1. On the **Subnets** page, select **+ Subnet** on the top menu. |
| 73 | +1. On the **Add Subnet screen**, enter *AzureBastionSubnet* under **Name**. |
| 74 | +1. Under **Subnet address range**, enter an address range that's within the virtual network's address space, but doesn't overlap with the existing lab subnet. |
| 75 | + >[!TIP] |
| 76 | + >You might have to cancel out of this dialog, select **Address space** in the virtual network's left navigation, and create a new address space for the subnet. |
| 77 | +1. Select **Save**. |
41 | 78 |
|
42 |
| -1. On the **Lab Subnet** section, for the **Use in virtual machine creation** option, select **Yes**. Then select **Save**. |
| 79 | +  |
43 | 80 |
|
44 |
| - :::image type="content" source="./media/enable-browser-connection-lab-virtual-machines/allow-subnet-use.png" alt-text="Screenshot of selection for allow subnet use option."::: |
| 81 | +Next, deploy the Azure Bastion host in the new Azure Bastion subnet: |
45 | 82 |
|
46 |
| -1. On the **Virtual network** page, select **Save**. You'll then be returned to the **Virtual networks** section of **Configuration and policies**. |
| 83 | +1. In the Azure portal, search for and select **Bastions**. |
| 84 | +1. On the **Bastions** page, select **+ Create** at the top. |
| 85 | +1. On the **Create a Bastion** page, enter a **Name**, and select the same **Subscription**, **Resource group**, and **Region** as your lab. |
| 86 | +1. Under **Virtual networks**, select your lab's virtual network from the dropdown list, and make sure **AzureBastionSubnet** is selected under **Subnet**. |
| 87 | +1. Select **Review + create**, and when validation passes, select **Create**. |
47 | 88 |
|
48 |
| -## Enable browser connection |
| 89 | +  |
49 | 90 |
|
50 |
| -Once you have a Bastion configured virtual network inside the lab, as a lab owner, you can enable browser connect to lab virtual machines. |
| 91 | +## Connect to lab VMs through Azure Bastion |
51 | 92 |
|
52 |
| -These steps continue immediately from the prior section. |
| 93 | +Once you deploy Azure Bastion in your lab virtual network, enable browser connections for the lab: |
53 | 94 |
|
54 |
| -1. Under **Settings**, select **Browser connect**. |
| 95 | +1. On the lab **Overview** page, select **Configuration and policies**, and then select **Browser connect** under **Settings**. |
| 96 | +1. On the **Browser connect** page, select **On**. |
| 97 | +1. Select **Save** at the top of the page. |
55 | 98 |
|
56 |
| -1. Under the **Browser access to virtual machines** section, select **Yes** for **Browser connect**. Then select **Save**. |
| 99 | +  |
57 | 100 |
|
58 |
| - :::image type="content" source="./media/enable-browser-connection-lab-virtual-machines/enable-browser-connect.png" alt-text="Screenshot of enabling browser connect option."::: |
| 101 | +To connect to a lab VM through Azure Bastion: |
59 | 102 |
|
60 |
| -## Next Steps |
| 103 | +1. Select a lab VM from **My virtual machines** on the lab **Overview** page. |
| 104 | +1. At the top of the VM's page, select **Browser connect**. |
| 105 | +1. In the **Browser connect** pane, enter your VM's username and password, and select **Connect**. |
61 | 106 |
|
62 |
| -See the following article to learn how to connect to your VMs using a browser: [Connect to your virtual machines through a browser](connect-virtual-machine-through-browser.md) |
| 107 | +## Next steps |
| 108 | +- [What is Azure Bastion?](../bastion/bastion-overview.md) |
| 109 | +- [Add a VM to your lab](devtest-lab-add-vm.md) |
0 commit comments