Last time I ran my packer build on Dec 6 2024 all was fine. Today my build failed due to an Azure Marketplace problem.
I ran these commands to accept legal terms, with results havaing "accepted": true
.
az vm image terms accept --publisher almalinux --offer almalinux-x86_64 --plan almalinux-x86_64
Yet in the build log I see:
The Offer: ‘almalinux-x86_64’ cannot be purchased by subscription: ‘’ as it is not to be sold in market: ‘NL’.
1 Like
Hi and welcome! Are you perhaps impacted by this change?
1 Like
Date coincides indeed. Thanks! The market place update message does not however provide all ‘plan’ details needing changes for succesful automation with Packer.
These properties don’t work anymore:
plan_info {
plan_name = "8-gen2"
plan_product = "almalinux"
plan_publisher = "almalinux"
}
image_offer = "almalinux"
image_publisher = "almalinux"
image_sku = "8-gen2"
1 Like
OfferId: ‘almalinux-x86_64’ not to be sold in market: ‘NL’.
2025-01-07T08:23:59.7341348Z ==> azure-arm.alma8: ERROR: -> MarketplacePurchaseEligibilityFailed : Marketplace purchase eligibilty check returned errors. See inner errors for details.
2025-01-07T08:23:59.7343764Z ==> azure-arm.alma8: ERROR: -> BadRequest : Offer with PublisherId: 'almalinux', OfferId: 'almalinux-x86_64' cannot be purchased due to alidation errors. For more information see details. Correlation Id: '7e5d01b8-0d91-4c99-b271-e3b74b91ed1a' You have not accepted the legal terms on this subscription: '<sensitive>' for this plan. Before the subscription can be used, you need to accept the legal terms of the image. To read and accept legal terms, use the Azure CLI commands described at https://go.microsoft.com/fwlink/?linkid=2110637 or the PowerShell commands available at https://go.microsoft.com/fwlink/?linkid=862451. Alternatively, deploying via the Azure portal provides a UI experience for reading and accepting the legal terms. Offer details: publisher='almalinux' offer = 'almalinux-x86_64', sku = '8-gen2', Correlation Id: '7e5d01b8-0d91-4c99-b271-e3b74b91ed1a'. The Offer: 'almalinux-x86_64' cannot be purchased by subscription: '<sensitive>' as it is not to be sold in market: 'NL'. Please choose a subscription which is associated with a different market. Correlation Id '7e5d01b8-0d91-4c99-b271-e3b74b91ed1a'.[{"You have not accepted the legal terms on this subscription: '<sensitive>' for this plan. Before the subscription can be used, you need to accept the legal terms of the image. To read and accept legal terms, use the Azure CLI commands described at https://go.microsoft.com/fwlink/?linkid=2110637 or the PowerShell commands available at https://go.microsoft.com/fwlink/?linkid=862451. Alternatively, deploying via the Azure portal provides a UI experience for reading and accepting the legal terms. Offer details: publisher='almalinux' offer = 'almalinux-x86_64', sku = '8-gen2', Correlation Id: '7e5d01b8-0d91-4c99-b271-e3b74b91ed1a'.":"StoreApi"},{"The Offer: 'almalinux-x86_64' cannot be purchased by subscription: '<sensitive>' as it is not to be sold in market: 'NL'. Please choose a subscription which is associated with a different market. Correlation Id '7e5d01b8-0d91-4c99-b271-e3b74b91ed1a'.":"StoreApi"}]`
1 Like
Resolved by removing the “plan_info” information from the deployment, it is not required when deploying images from Marketplace.
I removed this block:
plan_info {
plan_name = "8-gen2"
plan_product = "almalinux"
plan_publisher = "almalinux"
}
This is sufficient in the packer template:
image_offer = "almalinux-x86_64"
image_publisher = "almalinux"
image_sku = "8-gen2"
I removed this block in my ARM template:
"plan": {
"name": "8-gen2",
"product": "almalinux",
"publisher": "almalinux"
},
1 Like