本文介绍如何配置托管 DevOps 池实例的基本设置。
概述
若要查看池设置的概述,请转到 “概述”。
从 “概述”中,可以:
池设置
若要配置池,请转到“设置>池”。
若要配置池,请使用以下设置:
开发人员中心项目
为你的池选择开发人员中心项目实例。 (如果没有,可以在创建池时创建 开发人员中心 实例和 开发人员中心项目 实例。
该 devCenterProjectResourceId 属性指定 开发人员中心项目 实例。
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"location": "eastus",
"tags": {},
"properties": {
...
"devCenterProjectResourceId": "/subscriptions/subscription_id_placeholder/resourceGroups/fabrikam-managed-devops-pools/providers/Microsoft.DevCenter/projects/fabrikam-dev-center-project"
}
}
]
}
可以在 Azure 门户中,通过您的 devCenterProjectResourceId 实例概述页的 JSON 视图 来检索 值。 还可以使用 Azure CLI 查询项目以检索其 id 属性。
在以下示例中,devCenterProjectResourceId值是从资源组中名为fabrikam-dev-center-project的fabrikam-managed-devops-pools实例中检索的。
az devcenter admin project show --name fabrikam-dev-center-project --resource-group fabrikam-managed-devops-pools --query "id"
该devcenter-project-id参数在创建或更新池时指定开发人员中心项目实例。
az mdp pool create \
--devcenter-project-id /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/resourceGroupName/providers/Microsoft.DevCenter/projects/devCenterProjectName
# other parameters omitted for space
可以在 Azure 门户中,通过devcenter-project-id实例“概述”页面中的JSON 视图,检索开发人员中心项目实例的相关信息。 还可以使用 Azure CLI 查询项目以检索其 id 属性。
在以下示例中,从资源组中的名为开发人员中心项目的实例检索。
az devcenter admin project show --name fabrikam-dev-center-project --resource-group fabrikam-managed-devops-pools --query "id"
该 devCenterProjectResourceId 属性指定 开发人员中心项目 实例。
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
...
devCenterProjectResourceId: '/subscriptions/subscription_id_placeholder/resourceGroups/fabrikam-managed-devops-pools/providers/Microsoft.DevCenter/projects/fabrikam-dev-center-project'
}
}
可以在 Azure 门户中,通过devCenterProjectResourceId实例“概述”页面中的JSON 视图,检索开发人员中心项目实例的相关信息。 还可以使用 Azure CLI 查询项目以检索其 id 属性。
在以下示例中,从资源组中的名为开发人员中心项目的实例检索。
az devcenter admin project show --name fabrikam-dev-center-project --resource-group fabrikam-managed-devops-pools --query "id"
Azure DevOps 组织
如果为单个 Azure DevOps 组织配置了池,则可以在池设置中指定组织。
如果为多个组织配置了池,则池设置中不存在 Azure DevOps 组织 设置。 若要将池配置为可在多个组织中使用,请转到设置>安全性,并配置在多个组织中使用池。
可以使用下的列表在organizations部分中配置organizationProfile参数。
在以下示例中,配置了一个池用于单个组织中的所有项目,并设置了并行度为 4。 有关如何配置多个组织的示例,请参阅 在多个组织中使用资源池。
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"apiVersion": "2025-09-20",
"location": "eastus",
"properties": {
...
"organizationProfile": {
"organizations": [
{
"url": "https://dev.azure.com/fabrikam-tailspin",
"projects": [],
"parallelism": 4
}
]
}
}
}
]
}
可以使用 organization-profile 参数中的 organizations 列表配置Azure DevOps 组织值。
在以下示例中,配置了一个池用于单个组织中的所有项目,并设置了并行度为 4。 有关如何配置多个组织的示例,请参阅 在多个组织中使用资源池。
az mdp pool create \
--organization-profile organization-profile.json
# other parameters omitted for space
以下示例显示了organizationsorganization-profile.json文件中的列表。
{
"AzureDevOps": {
"organizations": [
{
"url": "https://dev.azure.com/fabrikam-tailspin",
"projects": [],
"parallelism": 4
}
],
"permissionProfile": {...}
}
}
可以使用下的列表在organizations部分中配置organizationProfile参数。
在以下示例中,配置了一个池用于单个组织中的所有项目,并设置了并行度为 4。
有关如何配置多个组织的示例,请参阅 在多个组织中使用资源池。
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
...
organizationProfile: {
organizations: [
{
url: 'https://dev.azure.com/fabrikam-tailspin'
projects: []
parallelism: 4
}
]
}
}
}
默认情况下,您的资源池在您指定的组织中的所有项目中可用。 若要将池限制为特定项目,请参阅 “安全设置:配置组织访问权限”。
最大代理数
指定可在池中同时预配的最大代理数。 例如,如果指定 最大代理 值 2,则可以同时运行最多两个代理。 如果排队的作业超过两个,则仅有两个代理运行作业,其他作业处于等待状态。
可以使用 “代理 ”窗格查看池中预配代理的当前状态和计数。
“代理”视图中的所有代理(除状态为返回状态的代理除外)在虚拟机资源上运行,并计入最大代理计数。
可以在现有池的“池设置”中配置“最大代理”值,并在创建池时在“基本信息”选项卡上配置最大值。
可以使用该属性配置maximumConcurrency值。
在以下示例中, 最大代理 值为 4.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"apiVersion": "2025-09-20",
"location": "eastus",
"properties": {
...
"maximumConcurrency": 4
}
}
]
}
可以在创建或maximum-concurrency池时使用参数配置最大代理值。
在以下示例中, 最大代理 值为 4.
az mdp pool create \
--maximum-concurrency 4
# other parameters omitted for space
可以使用该属性配置maximumConcurrency值。
在以下示例中, 最大代理 值为 4.
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
...
maximumConcurrency: 4
}
}
代理大小
代理大小设置指定用于托管托管 DevOps 池代理的Azure 虚拟机大小。 托管 DevOps 池通过使用 实例组合,每个池最多支持五种代理规格。
若要查看并选择Azure区域中可用的Azure虚拟机大小,请选择最多 5 个 SKU 大小。 具有可用托管 DevOps 池配额的代理种类(SKU)显示为 可用。 可以为标记为 “不可用”的 SKU 请求更多配额。 批准 “不可用 ”SKU 的配额请求后,它将被标记为 “可用”。 详细了解 托管 DevOps 池配额。
若要对代理大小重新排序,请按所需顺序使用句柄拖放它们。 排列顺序决定代理的预配优先级,位于最上方的大小具有最高优先级。
可以在 sku 部分中使用 fabricProfile 属性配置单个代理的大小。 在以下示例中, Standard_D2ads_v5 指定了 VM 大小。
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"apiVersion": "2025-09-20",
"location": "eastus",
"properties": {
...
"fabricProfile": {
"sku": {
"name": "Standard_D2ads_v5"
}
}
}
}
]
}
若要使用 实例组合,请指定 Mix 为 sku.name 值,并提供 VM vmSizes大小列表。 列表中的 VM 大小顺序决定了预配代理的优先级。
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"apiVersion": "2025-09-20",
"location": "eastus",
"properties": {
...
"fabricProfile": {
"sku": {
"name": "Mix",
"vmSizes": [
{
"name": "Standard_D2ads_v5"
},
{
"name": "Standard_D2ds_v5"
}
]
}
}
}
}
]
}
注意
实例组合在 API 版本 2026-06-02 或更高版本中可用。
创建或更新池时,可以在sku节中使用fabricProfile属性来配置代理大小。 在以下示例中, Standard_D2ads_v5 指定了 VM 大小。
az mdp pool create \
--fabric-profile fabric-profile.json
# other parameters omitted for space
以下示例显示了 sku 文件的 fabric-profile.json 部分。
{
"vmss": {
"sku": {
"name": "Standard_D2ads_v5"
},
"images": [...],
"osProfile": {...},
"storageProfile": {...}
}
}
若要为现有池配置实例组合,请调用 az resource update,指定 API 版本 或更高版本,将 设置为 ,并在 中提供 VM 大小。 VM 大小的顺序决定了预配代理的优先级。
az resource update \
--ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOpsInfrastructure/pools/{poolName}" \
--api-version "2026-06-02" \
--set properties.fabricProfile.sku='{"name":"Mix","vmSizes":[{"name":"Standard_D2ads_v5"},{"name":"Standard_D2ds_v5"}]}'
注意
实例组合在 API 版本 2026-06-02 或更高版本中可用。
可以在 sku 部分中使用 fabricProfile 属性配置单个代理的大小。 在以下示例中, Standard_D2ads_v5 指定了 VM 大小。
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
fabricProfile: {
...
sku: {
name: 'Standard_D2ads_v5'
}
}
}
}
若要使用 实例组合,请指定 Mix 为 sku.name 值,并提供 VM vmSizes大小列表。 列表中的 VM 大小顺序决定了预配代理的优先级。
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
fabricProfile: {
...
sku: {
name: 'Mix'
vmSizes: [
{
name: 'Standard_D2ads_v5'
}
{
name: 'Standard_D2ds_v5'
}
]
}
}
}
}
注意
实例组合在 API 版本 2026-06-02 或更高版本中可用。
实例混合
托管 DevOps 池每个池最多支持五种代理规格。 此功能使用 虚拟机规模集实例组合 功能。
若要使用托管 DevOps 池实例组合,请为池配置多个代理大小。 当你指定多个代理规格时,托管 DevOps 池会首先尝试预配一个采用池配置中第一个规格的代理。 如果该大小不可用,它将尝试列表中的下一个大小。 此分配策略映射到 优先实例 组合分配策略,以确定要预配的 VM 大小,池中的代理大小按池 设置中显示的顺序进行排名,这与它们在池的配置中列出的顺序相同。
在为池配置多个代理大小时,请牢记以下建议和要求。
-
建议
- 若要确保负载分布均衡,请使用具有类似 vCPU 和内存的 VM 大小。
- 为了获得一致的性能,请使用类似类型的 VM 大小(例如,都是 D 系列)。
-
要求
- 对于目标订阅和区域中的每个 VM 大小,必须有足够的配额。
- 最多可以指定五个 VM 大小。
- 支持的 VM 系列: A、 B、 D、 E 和 F 系列。
- 每个选定的 VM 大小都必须来自不同的 VM 系列。 例如,不能同时使用这两个
Standard_D8ads_v5Standard_D16ads_v5,因为它们都来自序列Dadsv5。 但是,可以使用这两个系列Standard_D8ads_v5Standard_D8ds_v5,因为它们属于不同的系列(Dadsv5和Ddsv5),并且具有一致的体系结构、存储和本地磁盘特征。 有关 VM 系列和大小的详细信息,请参阅Azure中虚拟机的大小:名称结构细分。
- 不能在同一实例组合中混用 VM 体系结构(例如 Arm64 和 x64)。
- 具有不同存储接口(SCSI 与 NVMe)的 VM 不能混用。
- 不能在同一实例组合中混合使用高级存储和非高级存储的 VM SKU。
- 所有 VM 必须共享相同的安全配置文件和本地磁盘配置。
使用 VM 大小名称结构 标识可能兼容的大小。 从属于不同 VM 系列的受支持产品系列中的规格开始,并优先选择与主要规格具有相同 vCPU 数量和功能字母标识的规格。 具体而言,请检查处理器指示器(a或p无指示器)、本地临时磁盘指示器(d)和高级存储指示器(s)。
VM 大小名称无法体现所有兼容性特征。 在添加大小之前,请查看其 VM 系列文档,并验证其体系结构、存储接口、高级存储功能、安全配置文件支持和本地磁盘配置是否与池中的其他大小兼容。 还可以使用Copilot来帮助生成和评估可能兼容的大小列表。
使用Copilot识别符合条件的 VM 大小
Copilot 对话助手 的以下示例提示可帮助你识别可能可与你的首选大小配对的 VM 大小。 将提示复制并粘贴到Copilot 对话助手,并将占位符替换为配置详细信息。
I want to configure a Managed DevOps Pools instance mix with the following settings:
- Primary VM size: [PRIMARY VM SIZE]
- Azure region: [AZURE REGION]
Identify up to four additional VM sizes that are eligible to pair with my primary VM size. Use only current official Microsoft Learn documentation, starting with these sources and following their links to the relevant VM family and series documentation:
- https://learn.microsoft.com/azure/virtual-machines/sizes/overview
- https://learn.microsoft.com/azure/virtual-machine-scale-sets/instance-mix-overview
Apply all of these requirements:
1. Use only VM sizes from the A, B, D, E, or F families.
2. Select each VM size from a different VM series, including a series different from the primary VM size and from every other suggested size.
3. Use the same architecture, storage interface, premium-storage capability, security-profile support, and local-disk configuration as the primary VM size.
4. Recommend no more than four additional sizes because a Managed DevOps Pools instance mix supports up to five sizes total.
Also apply the instance mix recommendations by preferring VM sizes with similar vCPU and memory specifications and of a similar type to the primary VM size.
Return a comparison table that shows the VM size, family, series, vCPUs, memory, architecture, storage interface, premium-storage capability, local-disk configuration, and security-profile support. Explain why each suggested size is eligible and rank the suggestions from best to worst match. Cite an official Microsoft Learn source for every technical claim. Don't assume that a size is available or that I have sufficient quota in my region. Clearly identify the regional availability and quota checks that I must perform separately. If you can't verify a requirement for a VM size, exclude that size.
Copilot 由 AI 提供支持,因此可能会带来意外和错误。 在 池设置 中验证每个建议的 VM 大小,并确认更新池之前是否有足够的配额。 有关详细信息,请参阅 Copilot 常规使用常见问题解答。
常见配额和容量问题
如果订阅容量不足,无法按指定的 Azure VM SKU 和最大代理数配置池,则会收到如下错误消息:
Cores needed to complete this request is 8, which exceeds the current limit of 0 for SKU family standardDDSv4Family in region eastus. Please choose a different region if possible, or request additional quota at https://portal.azure.com/#view/Microsoft_Azure_Support/NewSupportRequestV3Blade/issueType/quota/subscriptionId/subscription_id_placeholder/topicId/3eadc5d3-b59a-3658-d8c6-9c729ba35b97
要解决该问题,请参阅查看托管 DevOps 池配额。
并非所有 SKU 都支持全部的 Azure 区域。 如果收到类似SKU family <sku-family> is not available in location <region>的错误,请确保您所在地区支持该 SKU 的尺寸。 有关详细信息,请参阅 Azure 中虚拟机的大小以及可用产品(按区域列出)。
重要
Azure Pipelines 映像目前不支持 v6 和 v7 Azure VM 代理规格。 例如,如果选择具有Azure Pipelines图像的 Standard D2as v6,则会收到类似于 SkuNotCompatibleWithImageDiskControllerType: Incompatible DiskControllerType between Image(s) MMSWindows2025-g2 and Pool SKU Standard_D2as_v6. Select a different image or sku for pool mdp-11-21-2025. 的错误。
若要解决此问题,请选择不是 v6 或 v7 的其他代理大小。
OS 磁盘类型
托管 DevOps 池为 OS 磁盘提供以下磁盘类型:
默认 OS 磁盘类型为 Standard。 如果工作负荷的吞吐量超过标准层的水平,则可以通过升级到性能更高的磁盘类型来提升工作负荷的性能。 有关磁盘类型和性能的详细信息,请参阅 Azure 托管磁盘类型。
可以在现有池的池设置中配置 OS 磁盘类型。 创建池时,可以在“基本信息”选项卡上配置 OS 磁盘类型。
可以使用本节中的属性配置 osDiskStorageAccountTypestorageProfile。 选择Standard、StandardSSD或Premium。
在以下示例中,标准 OS 磁盘类型已指定:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"apiVersion": "2025-09-20",
"location": "eastus",
"properties": {
...
"storageProfile": {
"osDiskStorageAccountType": "Standard"
}
}
}
]
}
可以使用参数中节中的osDiskStorageAccountType属性配置 storageProfilefabric-profile。
选择Standard、StandardSSD或Premium。 在以下示例中, 指定了标准 OS 磁盘类型。
az mdp pool create \
--fabric-profile fabric-profile.json
# other parameters omitted for space
以下示例显示了 storageProfile 文件的 fabric-profile.json 部分。
{
"vmss": {
"sku": {...},
"images": [...],
"osProfile": {...},
"storageProfile": {
"osDiskStorageAccountType": "Standard",
"dataDisks": []
}
}
}
可以使用本节中的属性配置 osDiskStorageAccountTypestorageProfile。
选择Standard、StandardSSD或Premium。 在以下示例中, 指定了标准 OS 磁盘类型。
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
fabricProfile: {
...
storageProfile: {
osDiskStorageAccountType: 'Standard'
}
}
}
}
NVMe 临时磁盘路径
如果满足以下条件,托管 DevOps 池将在与池映像中的临时磁盘通信时自动启用 NVM Express (NVMe) 协议:
托管 DevOps 池对 NVMe 临时磁盘使用以下路径:
- Windows映像:
N:
- Linux 映像:
/mnt/azure_nvme_temp
注意
Managed DevOps 池将在后续更新中支持指定不同的 NVMe 临时磁盘路径。
映像
托管 DevOps 池提供多个 VM 映像选项,用于在池中运行管道。 您可以通过以下方式创建池:使用选定市场的虚拟机 (VM) 映像,在 Azure 计算库实例中使用您自己的自定义映像,或使用 Azure Pipelines 中由 Microsoft 托管代理使用的相同 Windows 和 Linux 映像。
重要
托管 DevOps 池现在提供 Azure Pipelines 映像的第 2 代版本,而原始第 1 代 Azure Pipelines 映像不再更新。
托管 DevOps 池建议将使用原始第 1 代 Azure Pipelines 映像的池迁移到第 2 代版本。 有关详细信息,请参阅 Azure Pipelines 第 2 代映像。
注意
以下映像已弃用,已删除。
- Azure Pipelines - Windows Server 2019
- Ubuntu 20.04
有关详细信息,请参阅托管 DevOps 池映像弃用计划。
可以将池配置为使用单个映像或多个映像。 还可以使用别名来配置管道以使用特定映像。 有关详细信息,请参阅配置托管 DevOps 池映像。
重要
如果池中有多个映像,并且未使用管道中的需求来指定映像,则管道会使用池中列出的第一个映像运行。 可以通过以下方式更改池中的映像顺序:
- 使用模板:更改
images部分中的fabricProfile列表中图像的顺序。
- 使用拖动:在 Azure 门户中对映像列表中的映像进行排序。
相关内容