Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can configure Managed DevOps Pools agents to run in an isolated virtual network or in an existing virtual network. This article describes how to configure your pool to run agents in your virtual network.
Choose your network type
Managed DevOps Pools supports two types of networking configurations:
- Isolated virtual network: Each pool gets its own isolated virtual network that's created and managed by the Managed DevOps Pools service.
- Agents injected into existing virtual network: You can bring your own virtual network and subnet. All virtual machines created for the pool will use that subnet, and no other resources will be able to use the subnet. You might want to add agents from Managed DevOps Pools to your own virtual network for scenarios such as:
- Your continuous integration and continuous delivery (CI/CD) agents need to access resources that are only available in your company network through a service like Azure ExpressRoute.
- Your CI/CD agents need to access resources that are isolated to private endpoints.
- You want to network isolate your CI/CD infrastructure by bringing your own virtual network with company-specific firewall rules.
- Any other unique use cases that can't be achieved by out-of-the-box Managed DevOps Pools networking features.
Isolated virtual network
By default, all pools use a Microsoft-provided virtual network, which restricts all inbound traffic and has the following outbound traffic configuration options.
- Default outbound access connectivity is the current default, which allows all outbound traffic using a Microsoft-provided IP address. Default outbound access for VMs in Azure is scheduled to be retired. When default outbound access is retired, pools will be configured with one static IP address by default.
- Instead of using default outbound access, you can configure your pool to use up to 16 static outbound IP addresses. Managed DevOps Pools will create a NAT gateway in the same region as your pool to provide the IP addresses. This configuration enables you to allowlist specific IP addresses on external services that your pipelines need to access.
- The NAT gateway incurs additional Azure costs. You can model how much it will cost by using the Azure cost calculator. For more information, see Azure NAT Gateway pricing.
Important
If you modify the static IP address count after the pool is created, the IP addresses are subject to change, and you'll need to obtain the new IP addresses and update your allowlist on external services after the update operation completes.
To configure IP Address Settings when creating a pool, go to the Networking tab. To update an existing pool, go to Settings > Networking.
Choose None for Route through public IP addresses to use default outbound access.
Choose Microsoft Provided IPs to configure static outbound IP addresses and specify the number of static IP addresses you want to use. Managed DevOps Pools creates a NAT gateway for you and manages the IP addresses.
Note
There is a known issue: if your pool is configured with a managed identity, API calls won't return the ipAddresses property unless the DevOpsInfrastructure service principal is assigned the Managed Identity Operator role on the managed identity. For detailed steps, see Assign Azure roles by using the Azure portal.
Granting this role is not required for the static IP addresses to be functional. Without this role assignment, you can still find the assigned IP addresses by viewing them on the Networking page in the Azure portal.
Agents injected into existing virtual network
You can configure your pool's agents to use your virtual network by using the following steps:
- Create or bring your virtual network and subnet.
- Delegate the subnet to
Microsoft.DevOpsInfrastructure/pools. - Associate the subnet with your pool.
The preceding steps delegate the subnet for exclusive access by the pool. Other pools or resources can't use the subnet.
A pool can use multiple subnets to connect multiple pools to the same virtual network. Each subnet is delegated and associated with its own pool.
Create or bring your virtual network and subnet
The subnet must have enough address space to accommodate the maximum pool size of the pool that you want to associate (including the five IP addresses that Azure reserves in the subnet).
If you're using ExpressRoute, you need to allow writes by temporarily dropping or changing the management lock on the resource group.
Important
The pool and virtual network must be in the same region. Otherwise, you get an error similar to the following when you try to create the pool or update the network configuration: "Virtual network MDPVN is in region eastus, but pool mdpnonprodsub is in region australiaeast. These must be in the same region."
Managed DevOps Pools uses the 172.17.0.0/16 IP address range for its internal operations. Don't choose this range for your VNET. If your VNET connects to other networks that use this rage, such as private endpoints, avoid using the range 172.17.0.0/16 for your endpoints. If your pipelines fail with errors like "dial tcp 172.17.x.x:443: connect: no route to host", check to see if your environment has private endpoints or other networks using the 172.17.0.0/16 range.
Grant Reader and Network Contributor access to the DevOpsInfrastructure service principal
Ensure that the DevOpsInfrastructure principal has Reader and Network Contributor access on the virtual network.
Instead of using built-in roles, you can create a custom role that has the following permissions:
Microsoft.Network/virtualNetworks/*/readMicrosoft.Network/virtualNetworks/subnets/join/actionMicrosoft.Network/virtualNetworks/subnets/serviceAssociationLinks/validate/actionMicrosoft.Network/virtualNetworks/subnets/serviceAssociationLinks/writeMicrosoft.Network/virtualNetworks/subnets/serviceAssociationLinks/delete
Make a custom role for the Service Association Link access. You can create an example role at the resource group or subscription level on the Access Control tab, as shown in the following example.
Check the principal access for DevOpsInfrastructure
Select Access control (IAM) for the virtual network, and then select Check access.
Search for and select DevOpsInfrastructure.
Verify that you have Reader level access. Verify that
Microsoft.Network/virtualNetworks/subnets/join/action,Microsoft.Network/virtualNetworks/subnets/serviceAssociationLinks/validate/action, andMicrosoft.Network/virtualNetworks/subnets/serviceAssociationLinks/writeaccess is assigned. Your custom role should appear here.
If the DevOpsInfrastructure principal doesn't have those permissions, add them. Select Access control (IAM) for the virtual network, and then select Grant access to this resource.
Delegate the subnet to Microsoft.DevOpsInfrastructure/pools
In the portal, open Subnet properties and select Microsoft.DevOpsInfrastructure/pools under Subnet Delegation. Select Save.
This process delegates the subnet for exclusive access for the pool. Other pools or resources can't use the subnet. To connect multiple pools to the same virtual network, you must use multiple subnets. Each subnet must be delegated and associated with its own pool. You can find more information on subnet delegation in this overview of subnet delegation.
After you delegate the subnet to Microsoft.DevOpsInfrastructure/pools, you can update the pool to use the subnet.
Associate the subnet with your pool
To create a new pool, go to the Networking tab. To update an existing pool, go to Settings > Networking, and then select Agents injected into existing virtual network > Configure.
Select the Subscription, Virtual Network, and Subnet values that you delegated to
Microsoft.DevOpsInfrastructure/pools, and then select Ok.
After the network update finishes, the newly created resource in the pool will use the delegated subnet.
Important
Don't put a Delete lock on the virtual network when you update your pools. During a pool update operation, Managed DevOps Pools creates a service association link on the subnet. If an update fails, Managed DevOps Pools attempts to clean the service association link, but if there's a Delete lock, you get an InUseSubnetCannotBeDeleted error. Managed DevOps Pools isn't able to delete the service association link, which leaves the subnet in a locked state (unable to be deleted). To resolve the issue, remove the Delete lock and retry the update operation.
For more information, see Things to consider before you apply locks to your Azure resources.
Restrict outbound connectivity
If you have systems in place on your network (for example, network security groups or firewalls) that restrict outbound connectivity, you need to add certain endpoints to an allowlist to fully support Managed DevOps Pools. These endpoints are divided into globally required endpoints (necessary on any machine using Managed DevOps Pools) and endpoints that you need for certain scenarios. All endpoints are HTTPS, unless otherwise stated.
- Required endpoints for starting Managed DevOps Pools
- Required Azure DevOps endpoints
- Required endpoints for Linux machines
- Azure-related endpoints
- Akamai CDN delivery IPs
Required endpoints for starting Managed DevOps Pools
If you don't add these endpoints to an allowlist, machines fail to come online as part of the Managed DevOps Pools service, and you can't run pipelines on the pool:
*.prod.manageddevops.microsoft.com: Managed DevOps Pools endpoint used to communicate with the Managed DevOps Pools service.rmprodbuilds.azureedge.net: Used to download the Managed DevOps Pools worker binaries and startup scripts. The agent portion of the worker binaries is downloaded fromrm-agent.prod.manageddevops.microsoft.com(formerly downloaded fromagent.prod.manageddevops.microsoft.com), which is covered by the previous required*.prod.manageddevops.microsoft.comentry.*.queue.core.windows.net: Worker queue for communicating with the Managed DevOps Pools service.
Required Azure DevOps endpoints
Allow the endpoints documented in Azure DevOps allowed domain URLs. That article defines the Azure DevOps networking requirements, including endpoints used by agents and pipeline features.
If you block required endpoints, agents might fail to start or connect to Azure DevOps, or pipeline operations might fail.
Managed DevOps Pools agents are self-hosted Azure Pipelines agents. For the URLs an agent uses to register with Azure DevOps and run jobs, see Azure Pipelines self-hosted agents.
Important
For artifact uploads and downloads, allow *.vsblob.visualstudio.com. Don't replace this wildcard with your organization name. Artifact traffic uses both organization-specific and service-instance hostnames, so an organization-specific firewall rule alone doesn't cover all required traffic.
A successful connection to an organization-specific hostname doesn't establish wildcard coverage. Allowlisting only hostnames observed in previous traffic can miss required destinations as the service changes.
Required endpoints for Linux machines
These endpoints are required to spin up Ubuntu machines, but aren't necessary if a pool is only using Windows. When you set up the Azure DevOps task agent, required packages are added and an apt-get command is run. This process fails if the following endpoints aren't added to an allowlist.
azure.archive.ubuntu.com: Provisioning Linux machines. This endpoint is HTTP (port 80), not HTTPS (port 443).www.microsoft.com: Provisioning Linux machines.security.ubuntu.com: Provisioning Linux machines.packages.microsoft.com: Provisioning Linux machines.ppa.launchpad.net: Provisioning some specific Linux distributions.dl.fedoraproject.org: Provisioning certain Linux distributions.
Azure-related endpoints
Azure virtual machines (VMs) might route traffic to certain Azure features through your subnet. For these requests, you can route requests directly through Azure, or enable access through your network.
Configure Azure traffic to run through service endpoints:
You can route traffic directly through Azure to avoid adding throughput to your network security groups or firewalls. You don't need to add the domains listed in the following option to an allowlist.
For example, you can use the data disk feature to involve network calls to Azure Storage. When you enable Microsoft.Storage service endpoint on your network, traffic routes directly through Azure, which avoids your network rules and reduces load.
To avoid routing traffic through service endpoints, add the
md-*.blob.storage.azure.netdomain to your allowlist. This domain is required for configuring a data disk.
Akamai CDN delivery IPs
On May 1, 2025, Azure DevOps CDN assets transitioned to a solution served by Akamai and Azure Front Door. Ensure that your network has outbound access to Akamai IP ranges. For more information, see:
- CDN domain URL change for agents in pipelines
- Azure CDN from Edgio retirement FAQ
- Akamai TechDocs: Origin IP access control list
If you configure your Azure DevOps pipeline to run inside a container, you need to also add the source of the container image (Docker or Azure Container Registry) to an allowlist.
Sanity check endpoint connectivity
Run the following script on a resource in your subnet to check TCP connectivity to selected hostnames and ports that Managed DevOps Pools agents use to start, connect to Azure DevOps, and run jobs. The script also checks Azure, Managed DevOps Pools, and Linux provisioning targets.
A successful result applies only to the tested hostnames and ports. It doesn't establish TLS, authentication, application, or pipeline functionality, or confirm that your firewall allows every required endpoint.
Important
Run this script on a resource in your subnet, such as a VM or container, to test the network path from that subnet to the hostnames and ports included in the script.
This script tests selected hostnames, not every required endpoint. Review Azure DevOps allowed domain URLs for Azure DevOps requirements.
Some hostnames tested by the script are organization-specific. A successful test to an organization-specific hostname doesn't prove connectivity to every hostname covered by a wildcard rule. Keep all wildcard rules required by the documentation, regardless of the script results.
The artifact check tests only {organization}.vsblob.visualstudio.com. It doesn't validate connectivity to service-instance hostnames under *.vsblob.visualstudio.com. Allow the wildcard domain even if the organization-specific check succeeds, and verify artifact uploads and downloads from a pipeline running in the pool.
The regional queue and control-plane targets are illustrative examples, not a complete list. A failed connection to a sample regional target doesn't necessarily mean your pool is misconfigured.
If you're configuring a data disk, you must allow list the md-*.blob.storage.azure.net domain. The script doesn't check connectivity to this domain. For more information, see Azure-related endpoints.
To run the script with PowerShell Core, or PowerShell 5 or later, save the following script as ValidateMDPEndpoints.ps1. Run the following PowerShell command: .\ValidateMDPEndpoints.ps1 -organization "<your-organization>".
Review the connectivity requirements in Azure DevOps allowed domain URLs, Required endpoints for starting Managed DevOps Pools, Azure-related endpoints, and Akamai CDN delivery IPs. To test additional endpoints, add specific hostnames or URLs to the script. Don't add wildcard patterns or IP address ranges as test targets. Review the corresponding firewall rules separately.
# ValidateMDPEndpoints.ps1
param (
[Parameter(Mandatory = $true)]
[string]$organization
)
$azureDevOpsUris = @(
"https://dev.azure.com",
"https://vssps.dev.azure.com",
"https://vsrm.dev.azure.com",
"https://management.azure.com",
"https://login.microsoftonline.com",
"https://graph.microsoft.com",
"https://aadcdn.msftauth.net",
"https://${organization}.visualstudio.com",
"https://${organization}.vsrm.visualstudio.com",
"https://${organization}.vstmr.visualstudio.com",
"https://${organization}.pkgs.visualstudio.com",
"https://${organization}.vssps.visualstudio.com",
"https://download.agent.dev.azure.com"
)
$azureDevOpsArtifactsUris = @(
"https://${organization}.vsblob.visualstudio.com"
)
$managedDevOpsPoolsControlPlaneUris = @(
# Illustrative queue target under *.queue.core.windows.net
"https://rmprodeus2defaultcq.queue.core.windows.net",
# Managed DevOps Pools worker download target
"rm-agent.prod.manageddevops.microsoft.com",
# Illustrative control-plane target under *.prod.manageddevops.microsoft.com
"default.eus2.prod.manageddevops.microsoft.com"
)
$linuxAgentsUris = @(
"http://azure.archive.ubuntu.com",
"https://www.microsoft.com",
"https://security.ubuntu.com",
"https://packages.microsoft.com",
"https://ppa.launchpad.net",
"https://dl.fedoraproject.org"
)
function Test-EndpointCollection {
param (
[string[]]$Uris
)
$unreachableUris = @()
foreach ($uri in $Uris) {
try {
$uriWithScheme = if ($uri -match "^https?://") { $uri } else { "https://$uri" }
$parsedUri = [System.Uri]$uriWithScheme
$connection = Test-NetConnection -ComputerName $parsedUri.Host -Port $parsedUri.Port -WarningAction SilentlyContinue
if (-not $connection.TcpTestSucceeded) {
$unreachableUris += $uri
}
} catch {
$unreachableUris += $uri
}
}
return $unreachableUris
}
$azureDevOpsUnreachableUris = @(Test-EndpointCollection -Uris $azureDevOpsUris)
if ($azureDevOpsUnreachableUris.Count -eq 0) {
Write-Output "TCP connectivity succeeded for all tested Azure DevOps and Azure hostnames and ports."
} else {
Write-Output "TCP connectivity was not established for the following tested Azure DevOps and Azure targets:"
$azureDevOpsUnreachableUris | ForEach-Object { Write-Output $_ }
}
$azureDevOpsArtifactsUnreachableUris = @(Test-EndpointCollection -Uris $azureDevOpsArtifactsUris)
if ($azureDevOpsArtifactsUnreachableUris.Count -eq 0) {
Write-Output "TCP connectivity to the tested organization-specific artifact hostname and port succeeded."
} else {
Write-Output "TCP connectivity to the tested organization-specific artifact hostname and port was not established."
$azureDevOpsArtifactsUnreachableUris | ForEach-Object { Write-Output $_ }
}
Write-Output "This check does not validate connectivity to all hostnames under *.vsblob.visualstudio.com."
Write-Output "For artifact uploads and downloads, allow the wildcard domain even if this check succeeds."
$managedDevOpsPoolsUnreachableUris = @(Test-EndpointCollection -Uris $managedDevOpsPoolsControlPlaneUris)
if ($managedDevOpsPoolsUnreachableUris.Count -eq 0) {
Write-Output "TCP connectivity succeeded for all tested Managed DevOps Pools hostnames and ports."
} else {
Write-Output "TCP connectivity was not established for the following tested Managed DevOps Pools targets:"
$managedDevOpsPoolsUnreachableUris | ForEach-Object { Write-Output $_ }
}
Write-Output "Regional queue and control-plane targets are examples. A failed sample target does not necessarily mean your pool is misconfigured."
$linuxAgentsUnreachableUris = @(Test-EndpointCollection -Uris $linuxAgentsUris)
if ($linuxAgentsUnreachableUris.Count -eq 0) {
Write-Output "TCP connectivity succeeded for all tested Linux provisioning hostnames and ports."
} else {
Write-Output "TCP connectivity was not established for the following tested Linux provisioning targets. Disregard if you use only Windows agents:"
$linuxAgentsUnreachableUris | ForEach-Object { Write-Output $_ }
}
Write-Output "TCP connectivity checks completed for the listed targets."
Write-Output "These checks do not establish TLS, authentication, application, or pipeline functionality."
Write-Output "They do not validate wildcard firewall rules, IP address ranges, or all required endpoints."
Write-Output "Successful tests to organization-specific hostnames do not prove wildcard coverage or replace required wildcard firewall rules."
Write-Output "Review the documented Azure DevOps and Managed DevOps Pools networking requirements separately."
Write-Output "https://aka.ms/mdp-network-outbound-connectivity"
Configure the Azure DevOps agent to run behind a proxy
If you configured a proxy service on your image and want the workloads that run on your pool to run behind this proxy, the recommended approach is to add the following environment variables on your image:
VSTS_AGENT_INPUT_PROXYURL: The URL of the configured proxy to run behind.VSTS_AGENT_INPUT_PROXYUSERNAME: The username needed to use the proxy.VSTS_AGENT_INPUT_PROXYPASSWORD: The password to use the proxy.
For Windows, these environment variables should be system environment variables. For Linux, these variables should be in the /etc/environment file. If you set these system variables incorrectly or without a configured proxy service on the image, provisioning of new agents fails with network connectivity issues.
If you're migrating from Azure Virtual Machine Scale Sets agents and are already using the proxy environment variables on your image, you shouldn't need to make any changes. This process is described in Azure Virtual Machine Scale Set agents: Customize pipeline agent configuration.
If you use an image that doesn't have the environment variables set, set a tag named MdpProxyUri on the pool specifying the proxy URL.
Note
If the proxy doesn't allowlist the required endpoints for Managed DevOps Pools or otherwise blocks traffic, the Managed DevOps Pool provisioning fails. For more information on required endpoints, see Restrict outbound connectivity.