Convert existing VM to azure-spot

sgrIRL 6 Reputation points

I cannot find in the documentation a mention of converting an existing VM to an azure-spot instance.
Nor can I see a way in the portal to do so, although all the relevant azure-spot information fields are showing for the VM - they just show it isn't a spot!

Can a VM be converted?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,240 questions
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.
253 questions
{count} vote

4 answers

Sort by: Most helpful
  1. msrini-MSFT 6,856 Reputation points Microsoft Employee

    No, you can only set Spot pricing flag during the creation time. As of today you cannot convert the VM to Spot VM.

    2 people found this answer helpful.

  2. Larry Claman 16 Reputation points

    Seems like you could re-create the VM using the same technique as you would to move a VM into an availability set. (eg
    I'll see if I can prototype this & will post back when I have it working

    Edit: got this working. see

    2 people found this answer helpful.

  3. Ed Morris 36 Reputation points

    You can also achieve the same through the web portal.

    The steps are:

    1. Power down your VM from the VM summary page and wait for it to deallocate.
    2. Go DISK page of the VM, select the link for the OS disk to look at its Overview.
    3. On the overview page, click the create snapshot button to create an image of the current OS disk.
    4. Give it a name, and make the snapshot type full, selecting also Zone-redundant.
    5. Create the snapshot, taking note of its size.
    6. Navigate to the disk page from the Azure portal homepage, and in the top left of the menu bar select the add button.
    7. Create the disk as you would like, making sure the disk size is at least the size of the snapshot (it can be larger if you like). Select the source type as snapshot and select the name of the snapshot you just created.
    8. Create the disk.
    9. Navigate back to the Disks list page on the portal, and click into the new disk just created to view the overview page.
    10. On the new disks overview page, select Create VM from the horizontal menu bar, which will start a VM creation page, with the current disk as the OS disk.
    11. Be sure to select the Azure Spot Instance radio button to yes to make this a spot instance.
    12. All other options are the same as using an on-demand instance.
    2 people found this answer helpful.
    0 comments No comments

  4. Derek Da Silva 1 Reputation point

    Larry- thanks for your script. I was able to use it to convert from spot to regular VM. Great job!

    0 comments No comments