Cannot accept marketplace conditions for Azure Batch: "Allocation failed due to marketplace purchase eligibilty"

Robin van der Veken 0 Reputation points
2023-01-24T15:22:43.7333333+00:00

Hi,

I keep getting this error in my Azure batch account: "Allocation failed due to marketplace purchase". My pool allocation is set to "User subscription". I have tried multiple things already, but without success.

I followed the steps from this blog: [https://techcommunity.microsoft.com/t5/azure-paas-blog/azure-batch-pool-resizing-failed-allocation-failed-due-to/ba-p/2794640

The weird thing is that the following indeed seems to indicate an issue:

Get-AzMarketplaceTerms -Publisher 'microsoft-azure-batch' -Product 'ubuntu-server-container' -Name '20-04-lts' 

Name      Product Publisher             Accepted Signature PrivacyPolicyLink
----      ------- ---------             -------- --------- -----------------
20-04-lts         microsoft-azure-batch                    

The indicated next step raises an Exception:

Get-AzMarketplaceTerms -Publisher 'microsoft-azure-batch' -Product 'ubuntu-server-container' -Name '20-04-lts' | Set-AzMarketplaceTerms -Accept 
Exception: /usr/local/share/powershell/Modules/Az.MarketplaceOrdering/2.0.0/exports/ProxyCmdletDefinitions.ps1:537
Line |
 537 |          $steppablePipeline.Begin($PSCmdlet)
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'Name' because it is an empty string.

Therefore I tried the following, which looks as though it works:

Set-AzMarketplaceTerms -Publisher 'microsoft-azure-batch' -Product 'ubuntu-server-container' -Name '20-04-lts' -Accept
Name      Product                 Publisher             Accepted Signature
----      -------                 ---------             -------- ---------                                                         
20-04-lts ubuntu-server-container microsoft-azure-batch True    ...

However, when I rerun the Get-AzMarketplaceTerms command directly after it, nothing has changed, and most importantly I still get the error in the Batch account.

I also tried to accept using the azure cli, also without success..

az vm image terms accept --offer ubuntu-server-container --publisher microsoft-azure-batch --sku 20-04-lts

The above does seem to work as

az term show --product ubuntu-server-container --plan 20-04-lts --publisher microsoft-azure-batch

returns "accepted": true. However, still my azure batch pool won't resize, giving the same error.

Is there anything else I can do or what I'm missing here? Any help is really appreciated :)

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
302 questions
{count} votes

1 answer

Sort by: Most helpful
  1. FredP-MSFT 166 Reputation points
    2023-01-24T16:22:56.9733333+00:00

    Can you try deleting the pool and recreating from scratch after accepting the terms? If you are still encountering an issue, you will need to create a support ticket for further troubleshooting.