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
Copy file name to clipboardExpand all lines: articles/load-testing/how-to-test-private-endpoint.md
+32-47Lines changed: 32 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,13 @@ services: load-testing
6
6
ms.service: load-testing
7
7
ms.author: nicktrog
8
8
author: ntrogh
9
-
ms.date: 11/04/2022
9
+
ms.date: 05/12/2023
10
10
ms.topic: how-to
11
-
ms.custom: references_regions
12
11
---
13
12
14
13
# Test private endpoints by deploying Azure Load Testing in an Azure virtual network
15
14
16
-
In this article, learn how to test private application endpoints with Azure Load Testing. You'll create an Azure Load Testing resource and enable it to generate load from within your virtual network (VNET injection).
15
+
In this article, learn how to test private application endpoints with Azure Load Testing. You create an Azure Load Testing resource and enable it to generate load from within your virtual network (VNET injection).
17
16
18
17
This functionality enables the following usage scenarios:
19
18
@@ -29,74 +28,54 @@ The following diagram provides a technical overview:
29
28
30
29
When you start the load test, Azure Load Testing service injects the following Azure resources in the virtual network that contains the application endpoint:
31
30
32
-
- The test engine virtual machines. These VMs will invoke your application endpoint during the load test.
31
+
- The test engine virtual machines. These VMs invoke your application endpoint during the load test.
33
32
- A public IP address.
34
33
- A network security group (NSG).
35
34
- An Azure Load Balancer.
36
35
37
-
These resources are ephemeral and exist only during the load test run. If you restrict access to your virtual network, you need to [configure your virtual network](#configure-your-virtual-network) to enable communication between these Azure Load Testing and the injected VMs.
36
+
These resources are ephemeral and exist only during the load test run. If you restrict access to your virtual network, you need to [configure your virtual network](#configure-virtual-network) to enable communication between these Azure Load Testing and the injected VMs.
38
37
39
38
## Prerequisites
40
39
41
-
- An existing virtual network and a subnet to use with Azure Load Testing.
42
-
- The virtual network must be in the same subscription and the same region as the Azure Load Testing resource.
43
-
- The virtual network address range cannot overlap with 172.29.0.0/30, the address range that Azure Load Testing uses.
44
-
- You require the [Network Contributor](/azure/role-based-access-control/built-in-roles#network-contributor) role, or a parent of this role, on the virtual network. See [Check access for a user to Azure resources](/azure/role-based-access-control/check-access) to verify your permissions.
40
+
- Your Azure account has the [Network Contributor](/azure/role-based-access-control/built-in-roles#network-contributor) role, or a parent of this role, on the virtual network. See [Check access for a user to Azure resources](/azure/role-based-access-control/check-access) to verify your permissions.
45
41
- The subnet you use for Azure Load Testing must have enough unassigned IP addresses to accommodate the number of load test engines for your test. Learn more about [configuring your test for high-scale load](./how-to-high-scale-load.md).
46
42
- The subnet shouldn't be delegated to any other Azure service. For example, it shouldn't be delegated to Azure Container Instances (ACI). Learn more about [subnet delegation](/azure/virtual-network/subnet-delegation-overview).
47
43
- Azure CLI version 2.2.0 or later (if you're using CI/CD). Run `az --version` to find the version that's installed on your computer. If you need to install or upgrade the Azure CLI, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
48
44
49
-
## Configure your virtual network
45
+
## Configure virtual network
50
46
51
-
To test private endpoints, you need an existing Azure virtual network. Your virtual network should have at least one subnet, and allow access for traffic coming from the Azure Load Testing service.
47
+
To test private endpoints, you connect Azure Load Testing to an Azure virtual network. The virtual network should have at least one subnet, and allow outbound traffic to the Azure Load Testing service.
52
48
53
-
### Create a subnet
54
-
55
-
When you deploy Azure Load Testing in your virtual network, it's recommended to use separate subnets for Azure Load Testing and for the application endpoint. This approach enables you to configure network traffic access policies specifically for each purpose. Learn more about how to [add a subnet to a virtual network](/azure/virtual-network/virtual-network-manage-subnet#add-a-subnet).
49
+
If you don't have a virtual network yet, follow these steps to [create an Azure virtual network in the Azure portal](/azure/virtual-network/quick-create-portal).
56
50
57
-
### Configure traffic access
58
-
59
-
Azure Load Testing requires both inbound and outbound access for the injected VMs in your virtual network. If you plan to restrict traffic access to your virtual network, or if you're already using a network security group, configure the network security group for the subnet in which you deploy the load test.
51
+
> [!IMPORTANT]
52
+
> The virtual network must be in the same subscription and the same region as the load testing resource.
60
53
61
-
1. Go to the [Azure portal](https://portal.azure.com).
54
+
### Create a subnet
62
55
63
-
1. If you don't have an NSG yet, follow these steps to [create a network security group](/azure/virtual-network/manage-network-security-group#create-a-network-security-group).
56
+
When you deploy Azure Load Testing in your virtual network, it's recommended to use separate subnets for Azure Load Testing and for the application endpoint. This approach enables you to configure network traffic access policies specifically for each purpose. Learn more about how to [add a subnet to a virtual network](/azure/virtual-network/virtual-network-manage-subnet#add-a-subnet).
64
57
65
-
Create the NSG in the same region as your virtual network, and then associate it with your subnet.
58
+
### (Optional) Configure traffic rules
66
59
67
-
1. Search for and select your network security group.
60
+
Azure Load Testing requires that the injected VMs in your virtual network are allowed outbound access to the Azure Load Testing service. By default, when you create a virtual network, outbound access is already permitted.
68
61
69
-
<!-- TODO: add screenshot of portal -->
62
+
If you plan to further restrict access to your virtual network with a network security group, or if you already have a network security group, you need to configure an outbound security rule to allow traffic from the test engine VMs to the Azure Load Testing service.
70
63
71
-
1. Select **Inbound security rules** in the left navigation.
64
+
To configure outbound access for Azure Load Testing:
72
65
73
-
1.Select **+ Add**, to add a new inbound security rule. Enter the following information to create a new rule, and then select **Add**.
66
+
1.Sign into the [Azure portal](https://portal.azure.com).
74
67
75
-
| Field | Value |
76
-
| ----- | ----- |
77
-
|**Source**|*Service Tag*|
78
-
|**Source service tag**|*BatchNodeManagement*|
79
-
|**Source port ranges**|*\**|
80
-
|**Destination**|*Any*|
81
-
|**Destination port ranges**|*29876-29877*|
82
-
|**Name**|*batch-node-management-inbound*|
83
-
|**Description**|*Create, update, and delete of Azure Load Testing compute instances.*|
68
+
1. Go to your network security group.
84
69
85
-
1. Add a second inbound security rule using the following information:
70
+
If you don't have an NSG yet, follow these steps to [create a network security group](/azure/virtual-network/manage-network-security-group#create-a-network-security-group).
86
71
87
-
| Field | Value |
88
-
| ----- | ----- |
89
-
|**Source**|*Service Tag*|
90
-
|**Source service tag**|*AzureLoadTestingInstanceManagement*|
91
-
|**Source port ranges**|*\**|
92
-
|**Destination**|*Any*|
93
-
|**Destination port ranges**|*8080*|
94
-
|**Name**|*azure-load-testing-inbound*|
95
-
|**Description**|*Create, update, and delete of Azure Load Testing compute instances.*|
72
+
Create the NSG in the same region as your virtual network, and then associate it with your subnet.
96
73
97
74
1. Select **Outbound security rules** in the left navigation.
98
75
99
-
1. Select **+ Add**, to add a new outbound security rule. Enter the following information to create a new rule, and then select **Add**.
76
+
:::image type="content" source="media/how-to-test-private-endpoint/network-security-group-overview.png" alt-text="Screenshot that shows the network security group overview page in the Azure portal, highlighting Outbound security rules.":::
77
+
78
+
1. Select **+ Add**, to add a new outbound security rule. Enter the following information to create a new rule.
100
79
101
80
| Field | Value |
102
81
| ----- | ----- |
@@ -107,6 +86,8 @@ Azure Load Testing requires both inbound and outbound access for the injected VM
107
86
|**Name**|*azure-load-testing-outbound*|
108
87
|**Description**|*Used for various operations involved in orchestrating a load tests.*|
109
88
89
+
1. Select **Add** to add the outbound security rule to the network security group.
90
+
110
91
## Configure your load test script
111
92
112
93
The test engine VMs, which run the JMeter script, are injected in the virtual network that contains the application endpoint. You can now refer directly to the endpoint in the JMX file by using the private IP address or use [name resolution in your network](/azure/virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances).
@@ -227,7 +208,7 @@ The subnet you're using for the load test isn't in the `Succeeded` state and isn
227
208
az network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet
228
209
```
229
210
230
-
1. Resolve any issues with the subnet. If you've just created the subnet, verify the state again after a few minutes.
211
+
1. Resolve any issues with the subnet. If you have just created the subnet, verify the state again after a few minutes.
231
212
232
213
1. Alternately, select another subnet for the load test.
233
214
@@ -277,7 +258,7 @@ The route table attached to the subnet isn't in the `Succeeded` state.
277
258
az network route-table show -g MyResourceGroup -n MyRouteTable
278
259
```
279
260
280
-
1. Resolve any issues with the route table. If you've just created the route table or subnet, verify the state again after a few minutes.
261
+
1. Resolve any issues with the route table. If you have just created the route table or subnet, verify the state again after a few minutes.
281
262
282
263
1. Alternately, select another route table.
283
264
@@ -324,7 +305,7 @@ The load test engine instances couldn't be deployed due to an error in the subne
324
305
az network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet
325
306
```
326
307
327
-
1. Resolve any issues with the subnet. If you've just created the subnet, verify the state again after a few minutes.
308
+
1. Resolve any issues with the subnet. If you have just created the subnet, verify the state again after a few minutes.
328
309
329
310
1. If the problem persists, [open an online customer support request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest).
330
311
@@ -336,6 +317,10 @@ The subnet you use for Azure Load Testing must have enough unassigned IP address
336
317
337
318
Follow these steps to [update the subnet settings](/azure/virtual-network/virtual-network-manage-subnet#change-subnet-settings) and increase the IP address range.
338
319
320
+
### Starting the load test fails with `Management Lock is enabled on Resource Group of VNET (ALTVNET015)`
321
+
322
+
If there is a lock on the resource group that contains the virtual network, the service can't inject the test engine virtual machines in your virtual network. Remove the management lock before running the load test. Learn how to [configure locks in the Azure portal](/azure/azure-resource-manager/management/lock-resources?tabs=json#configure-locks).
323
+
339
324
## Next steps
340
325
341
326
- Learn more about the [scenarios for deploying Azure Load Testing in a virtual network](./concept-azure-load-testing-vnet-injection.md).
0 commit comments