Spot VM and Pay-as-you-go VM automatic switch

Elisa Mastroianni 20 Reputation points
2024-07-29T10:00:59.3566667+00:00

Is it possible to have two virtual machines in Azure, where one is a Spot VM (which can be deallocated when Azure reclaims the capacity) and the other is a Pay-As-You-Go VM (which remains available), and have the Pay-As-You-Go VM automatically activated when the Spot VM is deallocated?

If yes, how? Thanks.

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
384 questions
{count} votes

Accepted answer
  1. Nikhil Duserla 2,025 Reputation points Microsoft Vendor
    2024-07-30T08:08:15.4466667+00:00

    Hi @Elisa Mastroianni,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    You can have two Azure virtual machines: a Spot VM and a Pay-As-You-Go VM. Although Azure doesn't offer a built-in feature to automatically start the Pay-As-You-Go VM when the Spot VM is deallocated, you can use other Azure services like Automation, Functions, or Logic Apps to monitor the Spot VM's status and trigger the Pay-As-You-Go VM to start when needed.

    If you have any further queries, do let us know.

    If the answer is helpful, please click "Accept Answer" and "Upvote it."

    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.