How to submit Spot VMs to Azure Batch Pool using python SDK

Tiffany Seale 25 Reputation points
2023-11-15T18:55:50.1166667+00:00

In the documentation for creating pools, it says to use the targetLowPriorityComputeNodes to get Spot Nodes. Doing it this way programmatically submits LP nodes, resulting in increased costs when getting estimates from spot pricing. What is the correct way to get spot nodes using the various SDKs?

Documentation link:
https://learn.microsoft.com/en-us/azure/batch/batch-spot-vms#create-and-manage-pools-with-spot-vms

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,811 questions
0 comments No comments
{count} vote

Accepted answer
  1. Dean Reynolds 155 Reputation points
    2023-11-15T19:40:18.62+00:00

    You need to control this with your Batch Account is using the user subscription pool allocation mode to get Spot VM's

    • User subscription pool allocation mode gets Spot VMs.
    • Batch managed pool allocation mode gets low-priority VMs.

    From memory you can't change the batch account pool allocation mode once created so you will need to create a new batch account with the correct setting of User subscription pool allocation mode.

    If this helps please click the accept answer button

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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