Unable to create Azure BYOS image with Red Hat Satellite

Solution Verified - Updated -

Environment

  • Microsoft Azure
  • Red Hat Satellite

Issue

  • Trying to create a VM in Red Hat Satellite with a Microsoft Azure BYOS image fails with the following error:
Creating a virtual machine from Marketplace image or a custom image sourced from a Marketplace image requires Plan information in the request.

Resolution

  • The following steps need to be completed with either Microsoft's Azure CLI or Powershell.

  • Find the name of the image you want to use to get the Microsoft Azure URN:

PS /home/user> az vm image list --publisher RedHat --all --output table
Offer                     Publisher    Sku                        Urn                                                                 Version
------------------------  -----------  -------------------------  ------------------------------------------------------------------  ----------------
rhel-byos                 RedHat       rhel-lvm74                 RedHat:rhel-byos:rhel-lvm74:7.4.20200824                            7.4.20200824
rhel-byos                 RedHat       rhel-lvm74                 RedHat:rhel-byos:rhel-lvm74:7.4.20210125                            7.4.20210125
rhel-byos                 RedHat       rhel-lvm75                 RedHat:rhel-byos:rhel-lvm75:7.5.20200824                            7.5.20200824
rhel-byos                 RedHat       rhel-lvm75                 RedHat:rhel-byos:rhel-lvm75:7.5.20210125                            7.5.20210125
rhel-byos                 RedHat       rhel-lvm76                 RedHat:rhel-byos:rhel-lvm76:7.6.20190530                            7.6.20190530
rhel-byos                 RedHat       rhel-lvm76                 RedHat:rhel-byos:rhel-lvm76:7.6.20210207                            7.6.20210207
rhel-byos                 RedHat       rhel-lvm76-gen2            RedHat:rhel-byos:rhel-lvm76-gen2:7.6.20200715                       7.6.20200715
rhel-byos                 RedHat       rhel-lvm76-gen2            RedHat:rhel-byos:rhel-lvm76-gen2:7.6.20210208                       7.6.20210208
rhel-byos                 RedHat       rhel-lvm77                 RedHat:rhel-byos:rhel-lvm77:7.7.20200402                            7.7.20200402
rhel-byos                 RedHat       rhel-lvm77                 RedHat:rhel-byos:rhel-lvm77:7.7.20200416                            7.7.20200416
rhel-byos                 RedHat       rhel-lvm77                 RedHat:rhel-byos:rhel-lvm77:7.7.20200823                            7.7.20200823
rhel-byos                 RedHat       rhel-lvm77                 RedHat:rhel-byos:rhel-lvm77:7.7.20201103                            7.7.20201103
rhel-byos                 RedHat       rhel-lvm77                 RedHat:rhel-byos:rhel-lvm77:7.7.20210125                            7.7.20210125
rhel-byos                 RedHat       rhel-lvm77-gen2            RedHat:rhel-byos:rhel-lvm77-gen2:7.7.20200715                       7.7.20200715
rhel-byos                 RedHat       rhel-lvm77-gen2            RedHat:rhel-byos:rhel-lvm77-gen2:7.7.20200824                       7.7.20200824
rhel-byos                 RedHat       rhel-lvm77-gen2            RedHat:rhel-byos:rhel-lvm77-gen2:7.7.20201104                       7.7.20201104
rhel-byos                 RedHat       rhel-lvm77-gen2            RedHat:rhel-byos:rhel-lvm77-gen2:7.7.20210126                       7.7.20210126
rhel-byos                 RedHat       rhel-lvm78                 RedHat:rhel-byos:rhel-lvm78:7.8.20200410                            7.8.20200410
rhel-byos                 RedHat       rhel-lvm78                 RedHat:rhel-byos:rhel-lvm78:7.8.20200823                            7.8.20200823
rhel-byos                 RedHat       rhel-lvm78                 RedHat:rhel-byos:rhel-lvm78:7.8.20201221                            7.8.20201221
rhel-byos                 RedHat       rhel-lvm78                 RedHat:rhel-byos:rhel-lvm78:7.8.20210125                            7.8.20210125
rhel-byos                 RedHat       rhel-lvm78-gen2            RedHat:rhel-byos:rhel-lvm78-gen2:7.8.20200715                       7.8.20200715
rhel-byos                 RedHat       rhel-lvm78-gen2            RedHat:rhel-byos:rhel-lvm78-gen2:7.8.20200824                       7.8.20200824
rhel-byos                 RedHat       rhel-lvm78-gen2            RedHat:rhel-byos:rhel-lvm78-gen2:7.8.20201222                       7.8.20201222
rhel-byos                 RedHat       rhel-lvm78-gen2            RedHat:rhel-byos:rhel-lvm78-gen2:7.8.20210126                       7.8.20210126
rhel-byos                 RedHat       rhel-lvm79                 RedHat:rhel-byos:rhel-lvm79:7.9.20210108                            7.9.20210108
rhel-byos                 RedHat       rhel-lvm79                 RedHat:rhel-byos:rhel-lvm79:7.9.20210125                            7.9.20210125
rhel-byos                 RedHat       rhel-lvm79-gen2            RedHat:rhel-byos:rhel-lvm79-gen2:7.9.20210107                       7.9.20210107
rhel-byos                 RedHat       rhel-lvm79-gen2            RedHat:rhel-byos:rhel-lvm79-gen2:7.9.20210126                       7.9.20210126
rhel-byos                 RedHat       rhel-lvm8                  RedHat:rhel-byos:rhel-lvm8:8.0.20200402                             8.0.20200402
rhel-byos                 RedHat       rhel-lvm8                  RedHat:rhel-byos:rhel-lvm8:8.0.20200831                             8.0.20200831
rhel-byos                 RedHat       rhel-lvm8                  RedHat:rhel-byos:rhel-lvm8:8.0.20210125                             8.0.20210125
rhel-byos                 RedHat       rhel-lvm8                  RedHat:rhel-byos:rhel-lvm8:8.0.20210409                             8.0.20210409
rhel-byos                 RedHat       rhel-lvm8                  RedHat:rhel-byos:rhel-lvm8:8.0.20220316                             8.0.20220316
rhel-byos                 RedHat       rhel-lvm8-gen2             RedHat:rhel-byos:rhel-lvm8-gen2:8.0.20200715                        8.0.20200715
rhel-byos                 RedHat       rhel-lvm8-gen2             RedHat:rhel-byos:rhel-lvm8-gen2:8.0.20200830                        8.0.20200830
rhel-byos                 RedHat       rhel-lvm8-gen2             RedHat:rhel-byos:rhel-lvm8-gen2:8.0.20210126                        8.0.20210126
rhel-byos                 RedHat       rhel-lvm8-gen2             RedHat:rhel-byos:rhel-lvm8-gen2:8.0.20210410                        8.0.20210410
rhel-byos                 RedHat       rhel-lvm8-gen2             RedHat:rhel-byos:rhel-lvm8-gen2:8.0.20220317                        8.0.20220317
  • Next we want to accept the terms and conditions of the image passing in the Microsoft Azure URN:
PS /home/user> az vm image terms accept --urn RedHat:rhel-byos:rhel-lvm79:7.9.20210125
  • If that completes ok we should see a hash come back like so:
{
  "accepted": true,
  "id": "/subscriptions/xxxxxxxxxxxxxxxx/providers/Microsoft.MarketplaceOrdering/offerTypes/Microsoft.MarketplaceOrdering/offertypes/publishers/redhat/offers/rhel-byos/plans/rhel-lvm79/agreements/current",
  "licenseTextLink": "https://mpcprodsa.blob.core.windows.net/legalterms/3E5ED_legalterms_REDHAT%253a24RHEL%253a2DBYOS%253a24RHEL%253a2DLVM79%253a24L5LYFX5NVQ7EL646ZNPHOAHDOUVNIMMVIZADR2O6PWE74WFFTFVTD4RAFOYG5OUDPLNW57EW76XZ5APVC2PPXG22MHWALMK6ZCSADOI.txt",
  "marketplaceTermsLink": "https://mpcprodsa.blob.core.windows.net/marketplaceterms/3EDEF_marketplaceterms_VIRTUALMACHINE%253a24AAK2OAIZEAWW5H4MSP5KSTVB6NDKKRTUBAU23BRFTWN4YC2MQLJUB5ZEYUOUJBVF3YK34CIVPZL2HWYASPGDUY5O2FWEGRBYOXWZE5Y.txt",
  "name": "rhel-lvm79",
  "plan": "rhel-lvm79",
  "privacyPolicyLink": "https://www.redhat.com/en/about/privacy-policy",
  "product": "rhel-byos",
  "publisher": "redhat",
  "retrieveDatetime": "2022-05-26T19:56:16.629345Z",
  "signature": "4YVHK2SBEAOTM5FIRJF5PQ5ZP3IH7YBEDZSD447SLWEWEB7MXWG67OXJSCBPCY3WXAYAFLHE7D6S5K54WMQTLU2MZYIFWF7QUXVSS2Q",
  "systemData": {
    "createdAt": "2022-05-26T19:56:19.696994+00:00",
    "createdBy": "f5877eb3-9016-4ddd-80b1-3657c9fdbed8",
    "createdByType": "ManagedIdentity",
    "lastModifiedAt": "2022-05-26T19:56:19.696994+00:00",
    "lastModifiedBy": "f5877eb3-9016-4ddd-80b1-3657c9fdbed8",
    "lastModifiedByType": "ManagedIdentity"
  },
  "type": "Microsoft.MarketplaceOrdering/offertypes"
}

Root Cause

  • The BYOS images have to be enabled in your Microsoft Azure account by going to the Red Hat Customer Portal connecting your Microsoft Azure account and allocating some subscriptions to unlock BYOS private offerings.

  • The BYOS images also have to have the terms and conditions accepted on them with the Microsoft Azure CLI.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.