未找到 Azure 市场图像

Azure Marketplace image not found

我正在使用 Terraform 部署 Linux 图像。为此,我们需要从 Azure 市场图像中获取图像 购买计划 信息(有些需要接受条款,有些则不需要)。 Microsoft 有一个关于如何执行此操作的指导文档:https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage。伟大的。问题是它不适用于我们的一些团队想要部署的某些图像,我不明白为什么,所以我不知道如何部署他们要求的图像。

这是一个示例,其中找到 Checkpoint 图像的 购买计划 信息有效,我可以成功接受市场条款。注意第一个命令中的“计划”块信息,然后是第二个命令中显示为“已接受”的条款:

scott@Azure:~$ az vm image show --urn checkpoint:check-point-cg-r81:mgmt-byol:latest
{
  "automaticOsUpgradeProperties": {
    "automaticOsUpgradeSupported": false
  },
  "dataDiskImages": [],
  "disallowed": {
    "vmDiskType": "None"
  },
  "extendedLocation": null,
  "features": null,
  "hyperVGeneration": "V1",
  "id": "/Subscriptions/5ff78d61-5262-4bd6-81fa-42d8723b8e3e/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpoint/ArtifactTypes/VMImage/Offers/check-point-cg-r81/Skus/mgmt-byol/Versions/8100.900392.0710",
  "location": "westus",
  "name": "8100.900392.0710",
  "osDiskImage": {
    "operatingSystem": "Linux",
    "sizeInBytes": 107374182912,
    "sizeInGb": 100
  },
  "plan": {
    "name": "mgmt-byol",
    "product": "check-point-cg-r81",
    "publisher": "checkpoint"
  },
  "tags": null
}

scott@Azure:~$ az vm image terms show --urn checkpoint:check-point-cg-r81:mgmt-byol:latest
{
  "accepted": true,
  "id": "/subscriptions/5ff78d61-5262-4bd6-81fa-42d8723b8e3e/providers/Microsoft.MarketplaceOrdering/offerTypes/VirtualMachine/publishers/checkpoint/offers/check-point-cg-r81/plans/mgmt-byol/agreements/current",
  "licenseTextLink": "https://mpcprodsa.blob.core.windows.net/legalterms/3E5ED_legalterms_CHECKPOINT%253a24CHECK%253a2DPOINT%253a2DCG%253a2DR81%253a24MGMT%253a2DBYOL%253a24U2R6YKHF2KWHXN7Y4Q4Q4OEKEYL6JZJCCZGIIGQBSB7FNDUBYTDIRQY6QPT5XMT7NGAH5XWH3LHSQY22URTFS3X7HZHQXZ3CIVJKC2Y.txt",
  "marketplaceTermsLink": "https://mpcprodsa.blob.core.windows.net/marketplaceterms/3EDEF_marketplaceterms_VIRTUALMACHINE%253a24AAK2OAIZEAWW5H4MSP5KSTVB6NDKKRTUBAU23BRFTWN4YC2MQLJUB5ZEYUOUJBVF3YK34CIVPZL2HWYASPGDUY5O2FWEGRBYOXWZE5Y.txt",
  "name": "mgmt-byol",
  "plan": "mgmt-byol",
  "privacyPolicyLink": "http://www.checkpoint.com/privacy",
  "product": "check-point-cg-r81",
  "publisher": "checkpoint",
  "retrieveDatetime": "2021-07-21T13:48:54.3464069Z",
  "signature": "R65W6K5QQIRJP7DUOIK26PND236FGY6YIVTOOJ3ZFZC2CRQGPNF5TA5BNANFJWTFRKFZULYKINVSJ2BIB2DDNRW5AMUS2N5KQR7YTBQ",
  "systemData": {
    "createdAt": "2021-07-21T13:48:54.417391+00:00",
    "createdBy": "5ff78d61-5262-4bd6-81fa-42d8723b8e3e",
    "createdByType": "ManagedIdentity",
    "lastModifiedAt": "2021-07-21T13:48:54.417391+00:00",
    "lastModifiedBy": "5ff78d61-5262-4bd6-81fa-42d8723b8e3e",
    "lastModifiedByType": "ManagedIdentity"
  },
  "type": "Microsoft.MarketplaceOrdering/offertypes"
}

现在,使用完全相同的方法,即 Microsoft 在他们自己的文档中规定的方法,我可以获得一个 RHEL 映像,但是当我尝试接受条款时,它会出错,提示找不到该映像。出于所有意图和目的,第一个命令的输出与按预期工作的检查点图像没有明显差异。另请注意,我包含 location 信息只是为了确保图像在预期区域可用。

scott@Azure:~$ az vm image show -l westeurope --urn redhat:rhel-byos:rhel-lvm83:latest
{
  "automaticOsUpgradeProperties": {
    "automaticOsUpgradeSupported": false
  },
  "dataDiskImages": [],
  "disallowed": {
    "vmDiskType": "None"
  },
  "extendedLocation": null,
  "features": [
    {
      "name": "IsAcceleratedNetworkSupported",
      "value": "True"
    }
  ],
  "hyperVGeneration": "V1",
  "id": "/Subscriptions/5ff78d61-5262-4bd6-81fa-42d8723b8e3e/Providers/Microsoft.Compute/Locations/westeurope/Publishers/redhat/ArtifactTypes/VMImage/Offers/rhel-byos/Skus/rhel-lvm83/Versions/8.3.20210409",
  "location": "westeurope",
  "name": "8.3.20210409",
  "osDiskImage": {
    "operatingSystem": "Linux",
    "sizeInBytes": 68719477248,
    "sizeInGb": 64
  },
  "plan": {
    "name": "rhel-lvm83",
    "product": "rhel-byos",
    "publisher": "redhat"
  },
  "tags": null
}

scott@Azure:~$ az vm image terms show --urn redhat:rhel-byos:rhel-lvm83:latest
(BadRequest) Offer with PublisherId: 'redhat' and OfferId: 'rhel-byos' not found. Consider the following solutions: 1-Check to see if offer details are correct 2- If this offer is created recently, please allow up to 30 minutes for thisoffer to be available for purchase 3- If the offer is removed from the marketplace for new purchase. See similar offers here 'https://azuremarketplace.microsoft.com/en-us/marketplace/apps?page=1%26search=redhat%20rhel-byos'. CorrelationId '75335d2a-fc28-4e4c-acd3-ec2ea423f212'.

很明显,这是正确的信息。然而,Azure 无法找到它刚刚为我提供信息的图像。我在这里错过了什么?我不是在寻找解决方法或“使用不同的图像”的答案。我希望了解正在发生的事情,以便更好地处理它,或者在需要时用备份数据传递坏消息。干杯!

我已经为我订阅的两张图片测试了您运行的命令。我也能看到检查点图像及其术语,但看不到 RHEL-BYOS 图像术语。

Checkpoint 出价是 Public 和 pay-as-you-go azure subscription。这就是它显示购买条款的原因。但是 RHEL-BYOS [bring-your-own-subscription (BYOS) (Red Hat Gold Image) model] 优惠是私有的。

使用 RHEL BYOS 映像的要求:

  1. 您必须有权访问 Red Hat 云访问程序。启用您的 红帽云访问的红帽订阅 订阅管理器。您需要手头有 Azure 将注册云访问的订阅。
  2. 如果您为云访问启用的 Red Hat 订阅满足 资格要求,您的 Azure 订阅将自动 已启用 Gold Image 访问权限。
  3. 完成云访问启用步骤后,Red Hat 验证您是否有资格获得 Red Hat Gold Images。如果 验证成功,您可以访问黄金图像 三小时内。

参考:

Red Hat Enterprise Linux bring-your-own-subscription Azure images - Azure Virtual Machines

Red Hat Enterprise Linux Bring-Your-Own-Subscription Gold Images now Generally Available in Azure | Azure updates | Microsoft Azure