Skip to content

Commit b5df4cc

Browse files
authored
Merge pull request #237954 from ntrogh/alt-vnet-comms-reversal
[Azure Load Testing] Update VNET injection for reversed comms
2 parents 888ef82 + 72a1c90 commit b5df4cc

File tree

4 files changed

+32
-47
lines changed

4 files changed

+32
-47
lines changed

articles/load-testing/how-to-test-private-endpoint.md

Lines changed: 32 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ services: load-testing
66
ms.service: load-testing
77
ms.author: nicktrog
88
author: ntrogh
9-
ms.date: 11/04/2022
9+
ms.date: 05/12/2023
1010
ms.topic: how-to
11-
ms.custom: references_regions
1211
---
1312

1413
# Test private endpoints by deploying Azure Load Testing in an Azure virtual network
1514

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

1817
This functionality enables the following usage scenarios:
1918

@@ -29,74 +28,54 @@ The following diagram provides a technical overview:
2928

3029
When you start the load test, Azure Load Testing service injects the following Azure resources in the virtual network that contains the application endpoint:
3130

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.
3332
- A public IP address.
3433
- A network security group (NSG).
3534
- An Azure Load Balancer.
3635

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

3938
## Prerequisites
4039

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.
4541
- 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).
4642
- 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).
4743
- 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).
4844

49-
## Configure your virtual network
45+
## Configure virtual network
5046

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

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

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.
6053
61-
1. Go to the [Azure portal](https://portal.azure.com).
54+
### Create a subnet
6255

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

65-
Create the NSG in the same region as your virtual network, and then associate it with your subnet.
58+
### (Optional) Configure traffic rules
6659

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

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

71-
1. Select **Inbound security rules** in the left navigation.
64+
To configure outbound access for Azure Load Testing:
7265

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

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

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

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

9774
1. Select **Outbound security rules** in the left navigation.
9875

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

10180
| Field | Value |
10281
| ----- | ----- |
@@ -107,6 +86,8 @@ Azure Load Testing requires both inbound and outbound access for the injected VM
10786
| **Name** | *azure-load-testing-outbound* |
10887
| **Description**| *Used for various operations involved in orchestrating a load tests.* |
10988

89+
1. Select **Add** to add the outbound security rule to the network security group.
90+
11091
## Configure your load test script
11192

11293
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
227208
az network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet
228209
```
229210
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.
231212
232213
1. Alternately, select another subnet for the load test.
233214
@@ -277,7 +258,7 @@ The route table attached to the subnet isn't in the `Succeeded` state.
277258
az network route-table show -g MyResourceGroup -n MyRouteTable
278259
```
279260
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.
281262
282263
1. Alternately, select another route table.
283264
@@ -324,7 +305,7 @@ The load test engine instances couldn't be deployed due to an error in the subne
324305
az network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet
325306
```
326307
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.
328309
329310
1. If the problem persists, [open an online customer support request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest).
330311
@@ -336,6 +317,10 @@ The subnet you use for Azure Load Testing must have enough unassigned IP address
336317
337318
Follow these steps to [update the subnet settings](/azure/virtual-network/virtual-network-manage-subnet#change-subnet-settings) and increase the IP address range.
338319
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+
339324
## Next steps
340325
341326
- Learn more about the [scenarios for deploying Azure Load Testing in a virtual network](./concept-azure-load-testing-vnet-injection.md).
-29.6 KB
Loading
-29.6 KB
Loading
151 KB
Loading

0 commit comments

Comments
 (0)