Adding existing non-HA VMs to a new availability set

Brayan Rincon Cancino 0 Reputation points
2025-01-06T22:58:53.48+00:00

Adding existing VMs to a new availability set in Azure is possible? My plan is to shut down the VM, create the availability set, attach-add VMs to the availability set.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,236 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.
424 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 31,400 Reputation points MVP
    2025-01-06T23:09:41.6733333+00:00

    In short, no. The only time you can add a VM to an availability set is doing its creation

    Refer to https://zcusa.951200.xyz/en-us/azure/virtual-machines/windows/change-availability-set

    You can add a VM to an availability set only when you're creating the VM. To change the availability set, you need to delete and then re-create the VM.

    However, you can use the script in this Learn article to automate the process of recreating the VM.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


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.