【问题标题】:'Role size' error when provisioning Azure VM via Azure PowerShell通过 Azure PowerShell 预配 Azure VM 时出现“角色大小”错误
【发布时间】:2016-04-02 19:35:39
【问题描述】:

我正在尝试通过 Azure PowerShell 配置 Azure VM,如下所示:New-AzureVMConfig -Name $vmName -InstanceSize "Medium" -ImageName $imageName | Add-AzureProvisioningConfig -Linux -LinuxUser $username -Password $password | New-AzureVM -ServiceName $serviceName -ReservedIPName $reservedIP -Location $location

当然,变量的所有值都已设置。当我执行上述命令时,我收到错误:New-AzureVM : BadRequest: Role size: Medium is not supported in a provisioned storage account.

我使用的替代品是 Medium 而不是“Medium”、Small、Large 和 Standard_D1。没有任何作用!我错过了什么?


请注意,我在订阅中设置的存储帐户 (Set-AzureSubscription) 使用高级存储。它是通过排序命令New-AzureStorageAccount -StorageAccountName "yourpremiumaccount" -Location "West US" -Type "Premium_LRS"(文档here)创建的。

不用说,如果我将其设置为使用非高级存储的帐户,则上述New-AzureVMConfig 命令有效。

【问题讨论】:

    标签: powershell azure


    【解决方案1】:

    根据微软的说法,Premium storage VMs 不支持你使用的那个(Standard_Dx),你可以查看完整的文章here

    高级存储磁盘:Azure 高级存储支持可附加到 DS、DSv2 或 GS​​ 系列 Azure VM 的 VM 磁盘。

    尝试更改为 DS1 等受支持的系列之一,它应该可以工作:

    New-AzureVMConfig -Name $vmName -InstanceSize "Standard_DS1" -ImageName $imageName | Add-AzureProvisioningConfig -Linux -LinuxUser $username -Password $password | New-AzureVM -ServiceName $serviceName -ReservedIPName $reservedIP -Location $location
    

    【讨论】:

      【解决方案2】:

      它不适用于所有实例大小。例如,如果尝试InstanceSize: Standard_DS2,它就会起作用。


      当我找到它适用的整个实例大小范围时,我会更新这个答案。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-05-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-11-27
        相关资源
        最近更新 更多