Azure error creating a batch pool with spot virtual machines.

JunMa 20 Reputation points
2025-09-16T01:26:15.14+00:00

I can not create a batch pool with spot virtual machines. I used UserSubscription for poolAllocationMode. I tried Australia East, Australia Central, UK South and different VMSizes. Dedicated node works but Spot/low-priority nodes do not work. Always get the following error.

Resize errors: Desired number of low priority nodes could not be allocated Code: AllocationFailed Details:

  • Deployment allocation failed due to insufficient capacity for the requested VM size in the region. Code: Reason

enter image description here

enter image description here

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

Answer accepted by question author
  1. Jilakara Hemalatha 3,355 Reputation points Microsoft External Staff Moderator
    2025-09-23T13:05:25.71+00:00

    Hi JunMa,

    Thank you for your patience while we investigated this issue.

    We performed all the standard mitigation steps on our end, including validating the configuration, assigning the required roles, and confirming your Batch and VM setup. After completing these checks, we verified from the backend that the error is not related to permissions or configuration but is instead due to a subscription limitation.

    Your current subscription type (Visual Studio Professional Credit | Microsoft Azure) is not eligible for deploying Spot Virtual Machines. This is a known limitation with certain subscription offers such as Visual Studio/MSDN monthly credit subscriptions.

    To use Spot VMs, you will need to create or switch to a subscription type that supports them, such as:

    User's image

    please refer below documentation:

    https://free.blessedness.top/en-us/azure/virtual-machines/spot-vms#limitations

    https://azure.microsoft.com/en-us/pricing/offers/ms-azr-0059p/

    Could you please take a moment to accept answer and upvote it 👍 to make it helpful to the community members who is having same issue.

    Thank you for helping to improve Microsoft Q&A!

    User's image

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Jilakara Hemalatha 3,355 Reputation points Microsoft External Staff Moderator
    2025-09-16T02:17:53.5333333+00:00

    Hi JunMa,

    Thanks for sharing your issue in the Q&A. Based on the details, the allocation failure you’re experiencing when creating a Spot VM pool happens due to insufficient available capacity in the selected region for the requested VM size.

    Since Spot VMs rely on unused Azure capacity, their availability isn’t guaranteed and can fluctuate based on regional demand. Regions such as Australia East, Australia Central, and UK South often have limited Spot availability.

    Additionally, keep in mind that not all VM sizes support Spot pricing. Choosing an unsupported VM size will also result in allocation failures.

    Recommendations:

    • Try using different VM sizes in the same region that support Spot instances.
    • Attempt deployment in other Azure regions where Spot capacity may be more available.
    • Confirm that your selected VM sizes support Spot VMs.

    Notes for User Subscription Mode:

    If you are using User subscription mode with Azure Batch (instead of Batch service mode), additional configuration is needed because the Batch service manages resources directly in your subscription:

    • Ensure the Batch service has Contributor or Owner role on your subscription.
    • Accept the legal terms for any marketplace VM images you plan to use.
    • Assign the Azure Batch Service Orchestration Role to the Batch service principal.

    If these prerequisites are not configured, pool resizing or VM allocation may fail.

    References

    Spot VM size recommendations: https://free.blessedness.top/en-us/azure/virtual-machine-scale-sets/spot-vm-size-recommendation

    Azure Spot VMs overview: https://free.blessedness.top/en-us/azure/virtual-machines/spot-vms

    Azure Batch Spot VMs: https://free.blessedness.top/en-us/azure/batch/batch-spot-vms

    Batch pool resizing failures: https://free.blessedness.top/en-us/troubleshoot/azure/hpc/batch/azure-batch-pool-resizing-failure

    VM allocation failures: https://free.blessedness.top/en-us/troubleshoot/azure/virtual-machines/windows/allocation-failure

    Batch account configuration (User subscription mode): https://free.blessedness.top/en-us/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode

    Batch role-based access control: https://free.blessedness.top/en-us/azure/batch/batch-role-based-access-control

    Azure Batch built-in RBAC roles: https://free.blessedness.top/en-us/azure/batch/batch-role-based-access-control#azure-batch-built-in-rbac-roles

    Spot VM error codes: https://free.blessedness.top/en-us/azure/virtual-machines/error-codes-spot

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.