Azure Batch Pool resizing failed – Allocation failed due to marketplace purchase eligibilty

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.


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 eligibilty 


You can follow the below steps to check if it’s the same scenario with this blog. 




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




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. 


Step 2: 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. 


There are two ways we can do to check and accept the terms: 

  • 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'


  • 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. 



REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.