Azure Batch Pool resizing failed - Allocation failed due to marketplace purchase eligibilty
Published Sep 29 2021 02:39 AM 3,548 Views
Microsoft

Scenario:

For Azure Batch users, when you tried to resize your Batch pool, but it failed with the error message of Allocation failed due to marketplace purchase eligibility. You can follow the below steps to check if it’s the same scenario with this blog. 

 

 

Investigation:

Navigate to your Batch overview page, check the pool allocation mode 

hailey_ding_0-1653560101807.png

 

If you are using the User Subscription mode, you can go to step 2 and follow the instructions below.  

 

Otherwise, if the pool allocation mode is Batch Service mode, please contact Azure Support and open a technical support ticket, as this blog would only cover the scenario of the user subscription mode. 

 

Solution:

Run PowerShell commands needed for the legal terms 

 

Usually, for Batch users (in user subscription mode), there are some legal terms of the image that users need to accept before the subscription can be used. If you haven’t done this before, you might encounter the error Allocation failed due to marketplace purchase eligibilty. 

 

You have two options to check and accept the terms: 

Option 1: Run the PS command in Cloud Shell to check the current terms. An example below:

 

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

 

 

Option 2: If the terms have not been accepted, you can also use the following PS command locally to accept them. An example below:

 

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

 

 

Please notice: in the example above, you need to set the Publisher, Product(Offer) and Name(Sku) based on your pool setting. You can find the information in the Properties blade of the pool. 

hailey_ding_1-1632908203652.png

 

Co-Authors
Version history
Last update:
‎May 26 2022 03:16 AM
Updated by: