Azure-cli: az vm create recommends deprecated Set-AzureRmMarketplaceTerms instead of az vm image accept-terms

Created on 28 Aug 2019  路  6Comments  路  Source: Azure/azure-cli

Describe the bug

Using az vm create on an image with terms results in a message about using deprecated PowerShell cmdlets to accept (see 'additional content' below), instead of recommending 'az vm image accept-terms'.

To Reproduce

Attempt to create an az vm with an image with terms:

az vm create \
          --resource-group Fedora \
          --name Build \
          --image tunnelbiz:fedora:fedora30:0.0.3 \
          --admin-username azureuser \
          --generate-ssh-keys

Environment summary

apt-get
2.0.72
Pengwin
Bash

Additional context

Azure Error: MarketplacePurchaseEligibilityFailed
Message: Marketplace purchase eligibilty check returned errors. See inner errors for details.
Exception Details:
        Error Code: BadRequest
        Message: Offer with PublisherId: tunnelbiz, OfferId: fedora cannot be purchased due to validation errors. See details for more information.[{"Legal terms have not been accepted for this item on this subscription: 'e2391b26-a1f2-4713-b4b1-92857f6083d1'. To accept legal terms using PowerShell, please use Get-AzureRmMarketplaceTerms and Set-AzureRmMarketplaceTerms API(https://go.microsoft.com/fwlink/?linkid=862451) or deploy via the Azure portal to accept the terms":"StoreApi"}]
Marketplace Ordering Service Attention

All 6 comments

Thanks for the feedback @sirredbeard. @qwordy, could you please take a look?

It's an error message returned from server. My advice is that service team can add Azure CLI usage to the message.

That would explain why when I searched the source for the error message to do a PR I couldn't find it. Thank you.

Let me look into this to figure out if the error message is coming from the marketplace service or the VM service. Once that is identified, then I'll make sure the message is updated.

Let me look into this to figure out if the error message is coming from the marketplace service or the VM service. Once that is identified, then I'll make sure the message is updated.

Thank you!

This error string is coming from the Azure Marketplace service. They will update the error string to use the newer cmdlet names.

Was this page helpful?
0 / 5 - 0 ratings