【Azure Cloud Service】创建Azure云服务时遇见分配VM资源错误: VM(s) with the following constraints cannot be allocated, because the condition is too restrictive

本文涉及的产品
Serverless 应用引擎 SAE,800核*时 1600GiB*时
可观测可视化 Grafana 版,10个用户账号 1个月
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
简介: Allocation failed. VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove some constraints and try again. Constraints applied are:\n - VM Size

问题描述

创建Azure Cloud Service 资源,遇见资源操作完成时的终端预配状态为Failed的信息。

创建失败,创建的错误日志截图如下:

详细的错误信息为:

{

"code":"DeploymentFailed",

"message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",

"details":[{"code":"OverconstrainedAllocationRequest","message":"Allocation failed. VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove some constraints and try again. Constraints applied are:\n  - VM Size\n"}]}

 

 

问题解答

错误信息中,提示部署Cloud Service(云服务)时,所选择的VM Size(Standard_D4)被限制,分配失败。因为Cloud Service(云服务)所支持的VM Size在不同的区域会有所变动,需要先通过如下的PowerShell脚本来检索可以使用的VM Size List。

Powershell脚本:

    # Update the location
    $location = 'ChinaNorth3'
    # Get all Compute Resource Skus
    $allSkus = Get-AzComputeResourceSku
    # Filter virtualMachine skus for given location
    $vmSkus = $allSkus.Where{$_.resourceType -eq 'virtualMachines' -and $_.LocationInfo.Location -like $location}
    # From filtered virtualMachine skus, select PaaS Skus
    $passVMSkus = $vmSkus.Where{$_.Capabilities.Where{$_.name -eq 'VMDeploymentTypes'}.Value.Contains("PaaS")}
    # Optional step to format and sort the output by Family
    $passVMSkus | Sort-Object Family, Name | Format-Table -Property Family, Name, Size

执行结果:

 

当把Standard_D4替换成 Standard_D4_v2后,创建Cloud Service(云服务)成功。

 

参考资料

配置云服务(外延支持)的大小 : https://docs.azure.cn/zh-cn/cloud-services-extended-support/available-sizes#configure-sizes-for-cloud-services-extended-support



 

当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

相关文章
|
2月前
|
安全 Windows
【Azure 云服务】Azure Cloud Service中的错误事件 Error Event(Defrag/Perflib) 解答
【Azure 云服务】Azure Cloud Service中的错误事件 Error Event(Defrag/Perflib) 解答
|
2月前
|
Windows
【Azure 云服务】Cloud Service Worker Role Workerrole突然停机,查看Events发现 Defrag Error (0x8900002D)
【Azure 云服务】Cloud Service Worker Role Workerrole突然停机,查看Events发现 Defrag Error (0x8900002D)
【Azure 云服务】Cloud Service Worker Role Workerrole突然停机,查看Events发现 Defrag Error (0x8900002D)
|
2月前
|
存储 安全 BI
【Azure Storage Account】使用Azure Policy来检查Storage Account中是否有开启匿名访问的Container
【Azure Storage Account】使用Azure Policy来检查Storage Account中是否有开启匿名访问的Container
【Azure Storage Account】使用Azure Policy来检查Storage Account中是否有开启匿名访问的Container
|
2月前
|
Python
【Azure 应用服务】Python Function App重新部署后,出现 Azure Functions runtime is unreachable 错误
【Azure 应用服务】Python Function App重新部署后,出现 Azure Functions runtime is unreachable 错误
|
2月前
|
存储 网络安全 数据中心
【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)
【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)
【Azure 存储服务】App Service 访问开启防火墙的存储账号时遇见 403 (This request is not authorized to perform this operation.)
|
2月前
|
Java
【Azure 应用服务】如何查看App Service Java堆栈JVM相关的参数默认配置值?
【Azure 应用服务】如何查看App Service Java堆栈JVM相关的参数默认配置值?
【Azure 应用服务】如何查看App Service Java堆栈JVM相关的参数默认配置值?
|
2月前
|
开发框架 .NET 中间件
【Azure 云服务】在Cloud Service的代码中如何修改IIS Application Pool的配置呢? 比如IdleTimeout, startMode, Recycling.PeriodicRestart.Time等
【Azure 云服务】在Cloud Service的代码中如何修改IIS Application Pool的配置呢? 比如IdleTimeout, startMode, Recycling.PeriodicRestart.Time等
【Azure 云服务】在Cloud Service的代码中如何修改IIS Application Pool的配置呢? 比如IdleTimeout, startMode, Recycling.PeriodicRestart.Time等
|
2月前
|
微服务 Windows
【Azure 微服务】Service Fabric 部署时遇见了VMExtensionProvisioningError错误: Multiple VM extensions failed to be provisioned on the VM
【Azure 微服务】Service Fabric 部署时遇见了VMExtensionProvisioningError错误: Multiple VM extensions failed to be provisioned on the VM
|
2月前
【Azure 应用服务】App Service运行时突然中断:There is not enough space on the disk : 'D:localTempASPNETCORE...
【Azure 应用服务】App Service运行时突然中断:There is not enough space on the disk : 'D:localTempASPNETCORE...
|
2月前
|
Java
【Azure 应用服务】在App Service 中如何通过Managed Identity获取访问Azure资源的Token呢? 如Key Vault
【Azure 应用服务】在App Service 中如何通过Managed Identity获取访问Azure资源的Token呢? 如Key Vault