【问题标题】:cannot find RedHat arm in az cli or azurerm在 az cli 或 azurerm 中找不到 RedHat arm
【发布时间】:2020-10-23 11:34:29
【问题描述】:

运行后:

az vm image terms --urn RedHat:RHEL:7.8:7.8.2020090816 show

错误:

CommandNotFoundError: 'RedHat:RHEL:7.8:7.8.2020090816' is misspelled or not recognized by the system.

另外centos-7-8返回信息:

Get-AzureRmMarketplaceTerms -Publisher 'procomputers' -Product 'centos-7-8' -Name 'centos-7-8'

Publisher         : procomputers
Product           : centos-7-8
Plan              : centos-7-8
LicenseTextLink   : https://storelegalterms.blob.core.windows.net/legalterms/3E5ED_legalterms_PROCOMPUTERS%253a24CENTOS
                    %253a2D7%253a2D8%253a24CENTOS%253a2D7%253a2D8%253a24T622IBUBKL6J3MHL5NUAWG2XNZ5H5FVSJGLCOC54LB63AGI
                    ONYH5CDZVDEYDONEFK2NHKCZROAP7ZU5PLZHXJ5ZNBFEUCBOWWMC4DSY.txt
PrivacyPolicyLink : http://www.procomputers.com/privacy-policy.html
Signature         : TE7WPYLUZF56EK3MSEL4MNYDVDO6XAXI4BAUXAQHN3SLVFU4MYTVAMGWTTXXM6VLYZ7R4O7EZP53YCRDYRZPUZ3LNINTFLZ74XG
                    XKYA
Accepted          : True
Signdate          : 23/10/2020 11:20:29 AM

但是,要在市场上为 RedHat 7.8 arm 运行相同的命令,会返回错误。

Get-AzureRmMarketplaceTerms -Publisher 'RedHat' -Product 'RedHatEnterpriseLinux78-ARM' -Name 'RedHatEnterpriseLinux78-ARM'
Get-AzureRmMarketplaceTerms : The Publisher: 'RedHat' does not make available Offer: 'RedHatEnterpriseLinux78-ARM',
Plan: 'RedHatEnterpriseLinux78-ARM' in your Subscription/Azure account’s region: ''. Correlation Id:
'ad2a0b91-d89a-4a8f-9cd5-bb85ff95d897'.
At line:1 char:1
+ Get-AzureRmMarketplaceTerms -Publisher 'RedHat' -Product 'RedHatEnter ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureRmMarketplaceTerms], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.MarketplaceOrdering.Cmdlets.Agreements.GetAzureRmMarketplaceTer
   ms

当我尝试通过 Terraform 部署 VM 并使用 RedHat 7.8 ARM 时,我需要将条款设置为接受,并通过 Terraform 部署 VM。

请帮忙。谢谢。

【问题讨论】:

    标签: azure terraform azure-powershell azure-cli


    【解决方案1】:

    要运行的 Azure CLI 命令的正确格式是:

    az vm image terms show --urn <urn>
    

    对给定的图像运行这个返回:

     az vm image terms show --urn RedHat:RHEL:7.8:7.8.2020090816
     Image 'RedHat:RHEL:7.8:7.8.2020090816' has no terms to accept.
    

    要通过 Azure PowerShell 进行检查,例如美国西部 2 区域,您可以运行:

    PS C:\> Get-AzVMImage -Location "westus2" -PublisherName "RedHat" -Offer "RHEL" -Skus "7.8" -Version "7.8.2020090816"
    

    输出:

    Id               : /Subscriptions/<Subscription ID>/Providers/Microsoft.Compute/Locations/westus2/Publishers/RedHat/ArtifactTypes/VMImag
                       e/Offers/RHEL/Skus/7.8/Versions/7.8.2020090816
    Location         : westus2
    PublisherName    : RedHat
    Offer            : RHEL
    Skus             : 7.8
    Version          : 7.8.2020090816
    FilterExpression :
    Name             : 7.8.2020090816
    HyperVGeneration : V1
    OSDiskImage      : {
                         "operatingSystem": "Linux"
                       }
    PurchasePlan     : null
    DataDiskImages   : []
    

    由于此映像的PurchasePlannull,这意味着此映像在程序化部署之前没有要接受的附加条款。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-11
      • 1970-01-01
      • 1970-01-01
      • 2019-08-17
      相关资源
      最近更新 更多