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

Tiffany Seale 25 Reputation points

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:

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

Accepted answer
  1. Dean Reynolds 155 Reputation points

    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