Move VM to AV-Set after creation


Well as MS says you need to put the VM in Availability set when you are creating VM because there is no option once VM created. Something similar happened with me when I was doing migration.
New VM created on the Target side and there was no option to put it in the AV-Set while configuring target information hence need to put the VM latter on.
Here are the few steps to do it -
  1. Stop the VM
  2. Take a snapshot for the safety purpose (optional)
  3. Once VM stopped delete the VM ( as attached resources wouldn't delete in Azure)
  4. Create AV-Set in the same resource group.
  5. Create the VM from the remaining OS Disk inside AV-set that created in above step.
  6. Attach the Data disks if there are any.

There is a powershell script to peform the above mentioned task .i.e moving the VM to AV-set latter once its created.
https://gallery.technet.microsoft.com/Set-Azure-Resource-Manager-f7509ec4

2 comments:

Azure DevOps

Azure DevOps is a suite of development tools provided by Microsoft, designed to support the entire development lifecycle of a software proje...