在 Azure 虚拟桌面中创建租户和主机池(经典版)
重要
此内容适用于不支持 Azure 资源管理器 Azure 虚拟桌面对象的 Azure 虚拟桌面(经典)。 如果要尝试管理 Azure 资源管理器 Azure 虚拟桌面对象,请参阅本文
本文介绍初始设置 Azure 虚拟桌面租户和相关会话主机池基础结构期间的问题。
提供反馈
请访问 Azure 虚拟桌面技术社区,与产品团队和活动社区成员讨论 Azure 虚拟桌面服务。
获取 Windows 10 企业版多会话映像
若要使用 Windows 10 企业版多会话映像,请转到 Azure 市场,选择“入门>Microsoft Windows 10>”以及“Windows 10 企业版虚拟桌面,版本 1809”。
创建 Azure 虚拟桌面租户
本部分介绍创建 Azure 虚拟桌面租户时的潜在问题。
错误:AADSTS650052应用需要访问服务。
原始错误示例:
AADSTS650052 Message The app needs access to a service(\"{name}\") that your organization
\"{organization}\" has not subscribed to or enabled. Contact your IT Admin to review the
configuration of your service subscriptions.650052 Message The app needs access to a service
(\"{name}\") that your organization \"{organization}\" has not subscribed to or enabled.
Contact your IT Admin to review the configuration of your service subscriptions.
原因: Microsoft Entra 实例中未授予 Azure 虚拟桌面的许可。
修复:按照本指南 授予许可。
错误:用户无权查询管理服务
原始错误示例:
New-RdsTenant : User isn't authorized to query the management service.
ActivityId: ad604c3a-85c6-4b41-9b81-5138162e5559
Powershell commands to diagnose the failure:
Get-RdsDiagnosticActivities -ActivityId ad604c3a-85c6-4b41-9b81-5138162e5559
At line:1 char:1
+ New-RdsTenant -Name "testDesktopTenant" -AadTenantId "01234567-89ab-c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : FromStdErr: (Microsoft.RDInf...nt.NewRdsTenant:NewRdsTenant) [New-RdsTenant], RdsPowerSh
ellException
+ FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.RDInfra.RDPowershell.Tenant.NewRdsTenant
原因: 在他们的 Microsoft Entra ID 中尚未为已登录用户分配 TenantCreator 角色。
修复: 按照 Microsoft Entra 租户中的用户分配 TenantCreator 应用程序角色中的说明进行操作。 按照说明操作后,将有一名用户被分配到租户创建者角色。
创建 Azure 虚拟桌面会话主机虚拟机
可以通过多种方式创建会话主机 VM,但 Azure 虚拟桌面团队仅支持与 Azure 市场 产品/服务相关的 VM 预配问题。 有关详细信息,请参阅 使用 Azure 虚拟桌面的问题 - 预配主机池 Azure 市场产品/服务。
使用 Azure 虚拟桌面时遇到的问题 – 通过 Azure 市场提供的服务来预配主机池
Azure 虚拟桌面 – 预配主机池模板可从 Azure 市场获取。
错误:使用 GitHub 中的链接时,将显示消息“创建免费帐户”
原因 1: 帐户中没有用于登录到 Azure 的活动订阅,或者所使用的帐户无权查看订阅。
修复 1: 使用至少具有订阅中的参与者访问权限的帐户登录,该订阅是用于部署会话主机虚拟机的。
原因 2: 正在使用的订阅是 Microsoft 云解决方案提供商(CSP)租户的一部分。
修复 2: 转到 gitHub 位置,创建和预配新的 Azure 虚拟桌面主机池 并按照以下说明操作:
右键单击 Deploy to Azure,然后选择 复制链接地址。
打开 记事本 并粘贴链接。
在 #字符之前,插入 CSP 最终客户租户名称。
在浏览器中打开新链接,Azure 门户将加载模板。
Example: https://portal.azure.com/<CSP end customer tenant name> #create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure% 2FRDS-Templates%2Fmaster%2Fwvd-templates%2FCreate%20and%20provision%20WVD%20host%20pool%2FmainTemplate.json
错误:收到“模板部署无效”错误
在采取特定操作之前,需要检查活动日志以查看失败的部署验证的详细错误。
若要查看活动日志中的错误,请执行以下操作:
退出当前的 Azure 市场部署产品/服务。
在顶部搜索栏中,搜索并选择 活动日志。
找到名为 验证部署 的活动,该活动的状态为 失败 并选择活动。
选择 JSON,然后向下滚动到屏幕底部,直到看到“statusMessage”字段。
如果操作模板超出配额限制,可以执行以下操作之一来修复它:
- 使用首次使用的参数运行 Azure 市场,但这次使用的 VM 和 VM 核心更少。
- 打开浏览器中 statusMessage 字段中看到的链接,提交请求以增加指定 VM SKU 的 Azure 订阅配额。
Azure 资源管理器模板和 PowerShell Desired State Configuration (DSC) 错误
按照以下说明排查 Azure 资源管理器模板和 PowerShell DSC 部署失败的问题。
- 使用 查看部署操作来查看部署中的错误,使用 Azure 资源管理器。
- 如果部署中没有错误,请使用 查看活动日志,审核资源的操作。
- 识别错误后,请使用错误消息和中的资源,结合Azure资源管理器,排查常见的Azure部署错误,以解决此问题。
- 删除在上一部署期间创建的任何资源,然后重试部署模板。
错误:部署失败。...<主机名>/joindomain
原始错误示例:
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details.
Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\":
{\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.
\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing
extension 'joindomain'. Error message: \\\"Exception(s) occurred while joining Domain 'diamondsg.onmicrosoft.com'\\\".\"\r\n }\r\n ]\r\n }\r\n}"}]}
原因 1:提供用于将 VM 加入域的凭据 不正确。
修复 1: 看到 VM 的“凭据不正确”错误未加入到 会话主机 VM 配置中的域。
原因 2: 域名无法解析。
修复 2: 请参阅 错误:域名在 会话主机 VM 配置中无法解析。
原因 3: 虚拟网络 (VNET) DNS 配置设置为 默认。
若要解决此问题,请执行以下操作:
- 打开 Azure 门户,转到“虚拟网络”选项卡。
- 找到 VNET,然后选择 DNS 服务器。
- DNS 服务器菜单应显示在屏幕右侧。 在该菜单上,选择 自定义。
- 确保在“自定义”下列出的 DNS 服务器与您的域控制器或 Active Directory 域相匹配。 如果您没有看到 DNS 服务器,可以通过在“添加 DNS 服务器” 字段中输入其值来添加它。
错误:部署失败...\未授权
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"Unauthorized","message":"{\r\n \"Code\": \"Unauthorized\",\r\n \"Message\": \"The scale operation is not allowed for this subscription in this region. Try selecting different region or scale option.\",\r\n \"Target\": null,\r\n \"Details\": [\r\n {\r\n \"Message\": \"The scale operation is not allowed for this subscription in this region. Try selecting different region or scale option.\"\r\n },\r\n {\r\n \"Code\": \"Unauthorized\"\r\n },\r\n {\r\n \"ErrorEntity\": {\r\n \"ExtendedCode\": \"52020\",\r\n \"MessageTemplate\": \"The scale operation is not allowed for this subscription in this region. Try selecting different region or scale option.\",\r\n \"Parameters\": [\r\n \"default\"\r\n ],\r\n \"Code\": \"Unauthorized\",\r\n \"Message\": \"The scale operation is not allowed for this subscription in this region. Try selecting different region or scale option.\"\r\n }\r\n }\r\n ],\r\n \"Innererror\": null\r\n}"}]}
原因: 您使用的订阅类型无法在客户尝试部署的区域访问所需的功能。 例如,MSDN、免费或教育版订阅可能会显示此错误。
修复: 将订阅类型或区域更改为可以访问所需功能的区域。
错误:VMExtensionProvisioningError
原因 1: Azure 虚拟桌面环境出现暂时性错误。
原因 2:暂时性连接错误。
修复: 使用 PowerShell 登录确认 Azure 虚拟桌面环境正常。 在 使用 PowerShell创建主机池中手动完成 VM 注册。
错误:您指定的管理员用户名不被允许
原始错误示例:
{ "id": "/subscriptions/EXAMPLE/resourceGroups/demoHostDesktop/providers/Microsoft.
Resources/deployments/vmCreation-linkedTemplate/operations/EXAMPLE", "operationId": "EXAMPLE", "properties": { "provisioningOperation":
"Create", "provisioningState": "Failed", "timestamp": "2019-01-29T20:53:18.904917Z", "duration": "PT3.0574505S", "trackingId":
"1f460af8-34dd-4c03-9359-9ab249a1a005", "statusCode": "BadRequest", "statusMessage": { "error": { "code": "InvalidParameter", "message":
"The Admin Username specified is not allowed.", "target": "adminUsername" } }, "targetResource": { "id": "/subscriptions/EXAMPLE
/resourceGroups/demoHostDesktop/providers/Microsoft.Compute/virtualMachines/demo", "resourceType": "Microsoft.Compute/virtualMachines", "resourceName": "demo" } }}
原因:提供的密码 包含禁止的子字符串(admin、管理员、根用户)。
修复: 更新用户名或使用不同用户。
错误:VM 在处理扩展时报告了失败
原始错误示例:
{ "id": "/subscriptions/EXAMPLE/resourceGroups/demoHostD/providers/Microsoft.Resources/deployments/
rds.wvd-provision-host-pool-20190129132410/operations/5A0757AC9E7205D2", "operationId": "5A0757AC9E7205D2", "properties":
{ "provisioningOperation": "Create", "provisioningState": "Failed", "timestamp": "2019-01-29T21:43:05.1416423Z",
"duration": "PT7M56.8150879S", "trackingId": "43c4f71f-557c-4abd-80c3-01f545375455", "statusCode": "Conflict",
"statusMessage": { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message":
"The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code":
"VMExtensionProvisioningError", "message": "VM has reported a failure when processing extension 'dscextension'.
Error message: \"DSC Configuration 'SessionHost' completed with error(s). Following are the first few:
PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message:
One or more errors occurred. The SendConfigurationApply function did not succeed.\"." } ] } }, "targetResource":
{ "id": "/subscriptions/EXAMPLE/resourceGroups/demoHostD/providers/Microsoft.
Compute/virtualMachines/desktop-1/extensions/dscextension",
"resourceType": "Microsoft.Compute/virtualMachines/extensions", "resourceName": "desktop-1/dscextension" } }}
原因: PowerShell DSC 扩展无法在 VM 上获取管理员访问权限。
修复: 确认用户名和密码在虚拟机上具有管理访问权限,然后再次运行 Azure 资源管理器模板。
错误:DeploymentFailed – PowerShell DSC 配置“FirstSessionHost”已完成,但出现错误。
原始错误示例:
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list
deployment operations for details. 4 Please see https://aka.ms/arm-debug for usage details.",
"details": [
{ "code": "Conflict",
"message": "{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\":
\"ResourceDeploymentFailure\",\r\n \"message\": \"The resource
operation completed with terminal provisioning state 'Failed'.\",\r\n
\"details\": [\r\n {\r\n \"code\":
\"VMExtensionProvisioningError\",\r\n \"message\": \"VM has
reported a failure when processing extension 'dscextension'.
Error message: \\\"DSC Configuration 'FirstSessionHost'
completed with error(s). Following are the first few:
PowerShell DSC resource MSFT ScriptResource failed to
execute Set-TargetResource functionality with error message:
One or more errors occurred. The SendConfigurationApply
function did not succeed.\\\".\"\r\n }\r\n ]\r\n }\r\n}" }
原因: PowerShell DSC 扩展无法在 VM 上获取管理员访问权限。
修复: 确认提供的用户名和密码在虚拟机上具有管理访问权限,然后再次运行 Azure 资源管理器模板。
错误:部署失败 – 无效的资源引用
原始错误示例:
{"code":"DeploymentFailed","message":"At least one resource deployment operation
failed. Please list deployment operations for details. Please see https://aka.ms/arm-
debug for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\":
\"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n
\"message\": \"The resource operation completed with terminal provisioning state
'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"DeploymentFailed\",\r\n
\"message\": \"At least one resource deployment operation failed. Please list
deployment operations for details. Please see https://aka.ms/arm-debug for usage
details.\",\r\n \"details\": [\r\n {\r\n \"code\": \"BadRequest\",\r\n \"message\":
\"{\\r\\n \\\"error\\\": {\\r\\n \\\"code\\\": \\\"InvalidResourceReference\\\",\\r\\n
\\\"message\\\": \\\"Resource /subscriptions/EXAMPLE/resourceGroups/ernani-wvd-
demo/providers/Microsoft.Network/virtualNetworks/wvd-vnet/subnets/default
referenced by resource /subscriptions/EXAMPLE/resourceGroups/ernani-wvd-
demo/providers/Microsoft.Network/networkInterfaces/erd. Please make sure that
the referenced resource exists, and that both resources are in the same
region.\\\",\\r\\n\\\"details\\\": []\\r\\n }\\r\\n}\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}"}]}
原因: 资源组名称的一部分用于模板创建的某些资源。 由于名称与现有资源匹配,模板可以从其他组中选择现有资源。
修复: 在运行 Azure 资源管理器模板部署会话主机 VM 时,请确保您的订阅资源组名称的前两个字符是唯一的。
错误:部署失败 - 无效资源引用
原始错误示例:
{"code":"DeploymentFailed","message":"At least one resource deployment operation
failed. Please list deployment operations for details. Please see https://aka.ms/arm-
debug for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\":
\"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n
\"message\": \"The resource operation completed with terminal provisioning state
'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"DeploymentFailed\",\r\n
\"message\": \"At least one resource deployment operation failed. Please list
deployment operations for details. Please see https://aka.ms/arm-debug for usage
details.\",\r\n \"details\": [\r\n {\r\n \"code\": \"BadRequest\",\r\n \"message\":
\"{\\r\\n \\\"error\\\": {\\r\\n \\\"code\\\": \\\"InvalidResourceReference\\\",\\r\\n
\\\"message\\\": \\\"Resource /subscriptions/EXAMPLE/resourceGroups/ernani-wvd-
demo/providers/Microsoft.Network/virtualNetworks/wvd-vnet/subnets/default
referenced by resource /subscriptions/EXAMPLE/resourceGroups/DEMO/providers/Microsoft.Network/networkInterfaces
/EXAMPLE was not found. Please make sure that the referenced resource exists, and that both
resources are in the same region.\\\",\\r\\n \\\"details\\\": []\\r\\n }\\r\\n}\"\r\n
}\r\n ]\r\n }\r\n ]\r\n }\r\n\
原因: 此错误是因为使用 Azure 资源管理器模板创建的 NIC 的名称与 VNET 中已有的另一个 NIC 的名称相同。
修复: 使用不同的主机前缀。
错误:DeploymentFailed - 下载错误
原始错误示例:
\\\"The DSC Extension failed to execute: Error downloading
https://catalogartifact.azureedge.net/publicartifacts/rds.wvd-provision-host-pool-
2dec7a4d-006c-4cc0-965a-02bbe438d6ff-prod
/Artifacts/DSC/Configuration.zip after 29 attempts: The remote name could not be
resolved: 'catalogartifact.azureedge.net'.\\nMore information about the failure can
be found in the logs located under
'C:\\\\WindowsAzure\\\\Logs\\\\Plugins\\\\Microsoft.Powershell.DSC\\\\2.77.0.0' on
the VM.\\\"
原因: 此错误是由于静态路由、防火墙规则或 NSG 阻止下载绑定到 Azure 资源管理器模板的 zip 文件。
修复: 删除阻止静态路由、防火墙规则或 NSG。 (可选)在文本编辑器中打开 Azure 资源管理器模板 json 文件,获取 zip 文件的链接,并将资源下载到允许的位置。
错误:用户无权查询管理服务
原始错误示例:
"response": { "content": { "startTime": "2019-04-01T17:45:33.3454563+00:00", "endTime": "2019-04-01T17:48:52.4392099+00:00",
"status": "Failed", "error": { "code": "VMExtensionProvisioningError", "message": "VM has reported a failure when processing
extension 'dscextension'. Error message: \"DSC Configuration 'FirstSessionHost' completed with error(s).
Following are the first few: PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource
functionality with error message: User is not authorized to query the management service.
\nActivityId: 1b4f2b37-59e9-411e-9d95-4f7ccd481233\nPowershell commands to diagnose the failure:
\nGet-RdsDiagnosticActivities -ActivityId 1b4f2b37-59e9-411e-9d95-4f7ccd481233\n
The SendConfigurationApply function did not succeed.\"." }, "name": "2c3272ec-d25b-47e5-8d70-a7493e9dc473" } } }}
原因: 指定的 Azure 虚拟桌面租户管理员没有有效的角色分配。
修复: 创建 Azure 虚拟桌面租户的用户需要登录到 Azure 虚拟桌面 PowerShell 并为尝试的用户分配角色。 如果您正在运行 GitHub Azure 资源管理模板的参数,请按照以下说明使用 PowerShell 命令进行操作:
Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com"
New-RdsRoleAssignment -TenantName <Azure Virtual Desktop tenant name> -RoleDefinitionName "RDS Contributor" -SignInName <UPN>
错误:用户需要Microsoft Entra 多重身份验证(MFA)
原始错误示例:
"message": "{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing extension 'dscextension'. Error message: \\\"DSC Configuration 'FirstSessionHost' completed with error(s). Following are the first few: PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: One or more errors occurred. The SendConfigurationApply function did not succeed.\\\".\"\r\n }\r\n ]\r\n }\r\n}"
原因: 指定的 Azure 虚拟桌面租户管理员要求Microsoft Entra 多重身份验证(MFA)登录。
修复: 创建服务主体,并按照 教程中的步骤为 Azure 虚拟桌面租户分配角色:使用 PowerShell创建服务主体和角色分配。 验证是否可以使用服务主体登录到 Azure 虚拟桌面后,根据所使用的方法重新运行 Azure 市场产品/服务或 GitHub Azure 资源管理器模板。 按照下面的说明输入方法的正确参数。
如果正在运行 Azure 市场产品,请提供以下参数的值以便正确验证 Azure 虚拟桌面身份:
- Azure 虚拟桌面租户 RDS 所有者:服务主体
- 应用程序 ID:所创建的新服务主体的应用程序标识
- 密码/确认密码:您为服务主体生成的密码
- Microsoft Entra 租户 ID:创建的服务主体Microsoft Entra 租户 ID
如果运行的是 GitHub Azure 资源管理器模板,请提供以下参数的值以正确向 Azure 虚拟桌面进行身份验证:
- 租户管理员用户主体名称(UPN)或应用程序 ID:所创建的新服务主体的应用程序标识
- 租户管理员密码:为服务主帐户生成的密码
- IsServicePrincipal:true(真)
- AadTenantId:您创建的 Microsoft Entra 服务主体对应的租户 ID。
错误:配置虚拟网络时 vmSubnet 不可用
原因: 在 Azure 虚拟桌面市场模板中,UI 仅显示具有至少与模板中指定的 VM 总数相同数量的可用 IP 地址的子网。 子网中可用 IP 地址的实际数目只需等于要部署的新 VM 的数量,但不能由当前 UI 计算。
后续步骤
- 有关 Azure 虚拟桌面及其升级路径的故障排除概述,请参阅 故障排除概述、反馈和支持。
- 若要排查在 Azure 虚拟桌面中配置虚拟机(VM)时出现的问题,请参阅 会话主机虚拟机配置。
- 若要排查 Azure 虚拟桌面客户端连接的问题,请参阅 Azure 虚拟桌面服务连接。
- 若要排查远程桌面客户端的问题,请参阅 排查远程桌面客户端
- 若要排查将 PowerShell 与 Azure 虚拟桌面配合使用时出现的问题,请参阅 Azure 虚拟桌面 PowerShell。
- 若要详细了解该服务,请参阅 Azure 虚拟桌面环境。
- 若要完成故障排除教程,请参阅 教程:排查资源管理器模板部署问题。
- 若要了解审核操作,请参阅 通过资源管理器进行审核操作。
- 若要了解用于确定部署过程中错误的操作,请参阅 查看部署操作。