How can I move an ARM VM between availability sets

How can I move an ARM VM between availability sets

Q. How can I move an Azure Resource Manager VM between availability sets?

A. With Azure Service Manager it was a simple process to move a VM between availability sets however this is not the case with Azure Resource Manager which requires the availability set to be picked during the VM provisioning. This means post creation you cannot:

  • Add a VM to an availability set
  • Move between availability sets
  • Remove a VM from an availability set

The only solution is to backup the configuration of the VM, delete the VM (keeping its storage) then creating a new VM using the existing storage with the desired availability set creation. There is a script at https://gallery.technet.microsoft.com/Set-Azure-Resource-Manager-f7509ec4 which automates the described process but there is still downtime as the VM is deleted and re-created.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish