Azure 请求的资源大小'';当前在位置'';地带

Azure 请求的资源大小'';当前在位置'';地带,azure,virtual-machine,Azure,Virtual Machine,问题 尝试使用我的action pack许可证在Azure上部署大小为F1S的Windows 10虚拟机时,我收到以下错误: 模板部署失败,错误为:“id为的资源: “/subscriptions/7d01bbc6-ef9b-4ad6-8c6e-baea1e0bd02d/resourceGroups/AzTech/providers/Microsoft.Compute/virtualMachines/Windows10” 验证失败,消息为:“请求的资源大小。” “/subscriptions/7

问题

尝试使用我的action pack许可证在Azure上部署大小为
F1S
的Windows 10虚拟机时,我收到以下错误:

模板部署失败,错误为:“id为的资源: “/subscriptions/7d01bbc6-ef9b-4ad6-8c6e-baea1e0bd02d/resourceGroups/AzTech/providers/Microsoft.Compute/virtualMachines/Windows10” 验证失败,消息为:“请求的资源大小。” “/subscriptions/7d01bbc6-ef9b-4ad6-8c6e-baea1e0bd02d/resourceGroups/AzTech/providers/Microsoft.Compute/virtualMachines/Windows10” 当前在位置“eastus”区域“”中不可用 订阅“…”。请试一试 另一个大小或部署到不同的位置或区域。看见 详情请参阅。(代码: InvalidTemplateDeployment)

尝试的解决方案

首先,我确保了可用性<代码>Fs系列在所有地区都可用

其次,按照故障排除步骤,我能够在运行
Get-AzurermComputerResourcesKu | where{$\uu.Locations-icontains“EastUS”}
时确认
EastUS
的可用性:

最后,我尝试了这个解决方案,但选择HDD不起作用

其他信息

如果有用,此VM的模板如下所示:

    {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
    "location": {
        "type": "string"
    },
    "networkInterfaceName": {
        "type": "string"
    },
    "networkSecurityGroupName": {
        "type": "string"
    },
    "networkSecurityGroupRules": {
        "type": "array"
    },
    "subnetName": {
        "type": "string"
    },
    "virtualNetworkName": {
        "type": "string"
    },
    "addressPrefixes": {
        "type": "array"
    },
    "subnets": {
        "type": "array"
    },
    "publicIpAddressName": {
        "type": "string"
    },
    "publicIpAddressType": {
        "type": "string"
    },
    "publicIpAddressSku": {
        "type": "string"
    },
    "virtualMachineName": {
        "type": "string"
    },
    "virtualMachineRG": {
        "type": "string"
    },
    "osDiskType": {
        "type": "string"
    },
    "virtualMachineSize": {
        "type": "string"
    },
    "adminUsername": {
        "type": "string"
    },
    "adminPassword": {
        "type": "secureString"
    }
},
"variables": {
    "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]",
    "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
    "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]"
},
"resources": [
    {
        "name": "[parameters('networkInterfaceName')]",
        "type": "Microsoft.Network/networkInterfaces",
        "apiVersion": "2019-07-01",
        "location": "[parameters('location')]",
        "dependsOn": [
            "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]",
            "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
            "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]"
        ],
        "properties": {
            "ipConfigurations": [
                {
                    "name": "ipconfig1",
                    "properties": {
                        "subnet": {
                            "id": "[variables('subnetRef')]"
                        },
                        "privateIPAllocationMethod": "Dynamic",
                        "publicIpAddress": {
                            "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]"
                        }
                    }
                }
            ],
            "networkSecurityGroup": {
                "id": "[variables('nsgId')]"
            }
        }
    },
    {
        "name": "[parameters('networkSecurityGroupName')]",
        "type": "Microsoft.Network/networkSecurityGroups",
        "apiVersion": "2019-02-01",
        "location": "[parameters('location')]",
        "properties": {
            "securityRules": "[parameters('networkSecurityGroupRules')]"
        }
    },
    {
        "name": "[parameters('virtualNetworkName')]",
        "type": "Microsoft.Network/virtualNetworks",
        "apiVersion": "2019-09-01",
        "location": "[parameters('location')]",
        "properties": {
            "addressSpace": {
                "addressPrefixes": "[parameters('addressPrefixes')]"
            },
            "subnets": "[parameters('subnets')]"
        }
    },
    {
        "name": "[parameters('publicIpAddressName')]",
        "type": "Microsoft.Network/publicIpAddresses",
        "apiVersion": "2019-02-01",
        "location": "[parameters('location')]",
        "properties": {
            "publicIpAllocationMethod": "[parameters('publicIpAddressType')]"
        },
        "sku": {
            "name": "[parameters('publicIpAddressSku')]"
        }
    },
    {
        "name": "[parameters('virtualMachineName')]",
        "type": "Microsoft.Compute/virtualMachines",
        "apiVersion": "2019-07-01",
        "location": "[parameters('location')]",
        "dependsOn": [
            "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]"
        ],
        "properties": {
            "hardwareProfile": {
                "vmSize": "[parameters('virtualMachineSize')]"
            },
            "storageProfile": {
                "osDisk": {
                    "createOption": "fromImage",
                    "managedDisk": {
                        "storageAccountType": "[parameters('osDiskType')]"
                    }
                },
                "imageReference": {
                    "publisher": "MicrosoftWindowsDesktop",
                    "offer": "Windows-10",
                    "sku": "19h2-pro",
                    "version": "latest"
                }
            },
            "networkProfile": {
                "networkInterfaces": [
                    {
                        "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]"
                    }
                ]
            },
            "osProfile": {
                "computerName": "[parameters('virtualMachineName')]",
                "adminUsername": "[parameters('adminUsername')]",
                "adminPassword": "[parameters('adminPassword')]",
                "windowsConfiguration": {
                    "enableAutomaticUpdates": true,
                    "provisionVmAgent": true
                }
            },
            "priority": "Spot",
            "evictionPolicy": "Deallocate",
            "billingProfile": {
                "maxPrice": -1
            }
        }
    }
],
"outputs": {
    "adminUsername": {
        "type": "string",
        "value": "[parameters('adminUsername')]"
    }
}
}
编辑1

根据一项建议,运行
Get-AzVMSize-位置“eastus”
确认
F1s
应该可用:


我认为,要获得订阅\位置组合的实际可用信息,您应该使用:

Get-AzVMSize -Location %location%
因为
Get-AzComputeResourceSku
会返回该位置所有可用的SKU,而不考虑订阅的限制


编辑:在这种情况下,问题在于模板通过删除spot实例部署了spot实例,而不是常规vm。OP能够使用所需的vm大小。

这确认了F1S可用于我的订阅。请参见“编辑”。该选项可能无法作为spot实例使用。您能否通过门户确认该功能是否正常工作?另外,您是否可以确认您正在部署到同一订阅?关闭Spot实例可以。正确的错误信息到此为止…感谢您的帮助。要更改您的答案以反映吗?希望确保未来的人们获得正确的信息。之后很高兴投票。