Changing Azure spot eviction policy midway

Ranjeet Singh 21 Reputation points
2020-02-06T09:52:58.847+00:00

Hi Folks

I think I know the answer to this and it's probably no but I wanted to ask first.

I am doing some testing with an Azure VM using Spot instance with eviction policy set to capacity.

It seems when I need to use for a bit longer, MS decide to evict me so the spot instance for me currently isnt working for me so need to change my approach.

I know my only real option is to create a new VM which isnt set to use Azure Spot but before I do this is there a way I can change the eviction policy on my current VM from capacity to cost/capacity, I am thinking if I can do this I can set a pricing cap which should prevent the VM going down as often because the pricing I set will be high enough so that it doesnt get evicted.

Any suggestions or whether it can be done would be greatly appreciated.

Thanks

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,085 questions
{count} votes

Accepted answer
  1. Ronen Ariely 15,096 Reputation points
    2020-02-09T00:18:43.25+00:00

    Good day ranjeetb

    is there a way I can change the eviction policy on my current VM from capacity to cost/capacity,

    How this will help you?!?

    You aid that you use the option "Capacity only" now and your VM evicted too often. Change to "Price or capacity" might make it worse sine it will be evicted by another parameter, in addition to the one you use now.

    I know my only real option is to create a new VM which is not set to use Azure Spot

    I am getting the feeling that you are right and you did not choose the right pricing model for your need. I am not sure that you got the idea of Spot Pricing model if you try to use it on a VM which evicted too often. This model is perfect for executing a short test or a short job which you do not care if the machine will be evicted in the middle. It does not fit (IMO) for long running machine.

    I am thinking if I can do this I can set a pricing cap which should prevent the VM going down as often because the pricing I set will be high enough so that it doesn't get evicted.

    The pricing limitation is another limitation in addition to the Capacity. If the Capacity is low then it is not important that the pricing is high and the VM will be evicted probably

    Note! Notice that If the max price is set to -1 then The VM will not be evicted for pricing reasons.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful