locked
Restored server and lost availability set RRS feed

  • Question

  • Hi,

    So how I had a VM that was a member of a availability set, and it was working great.

    While trying to sysprep and clone the server though both it and the cloned server became unbootable (different issue I'm not working on at the moment).

    I did have a backup of the original server thought and was able to restore it. But now I notice the server is no longer a member of the availability set that connected it to our load balancer, and everything I can find indicated that adding to an availability set must be done when the VM is created.

    So my question is can I build a new VM that is a member of the availability set I want, and then move the OS disk from the restored VM to the new VM with the availability set.

    Monday, March 5, 2018 7:40 PM

All replies

  • This can be done, provided that you are using unmanaged disks. You will have to:

    -Stop both VMs

    -Break the lease on the blobs (VHDs)

    -Delete the new VM VHD blob.

    -Copy the original VHD with the same name and location.

    You can use Azure Storage Explorer to help with those tasks:

    https://azure.microsoft.com/en-us/features/storage-explorer/

    Alternatively, you can use the AzMig tool to clone the existing server, you will have to manually adjust the exported ARM template to add the VM to the existing availability set, but this does not require a lot of effort.

    Check it out:

    https://github.com/Azure/migAz/tree/master/arm

    Lastly, if you have good ARM templates skills, you could simply export the ARM template, delete the VM keeping the VHD, make the necessary adjustments to the ARM template and redeploy the VM. This one is a bit more involved, but is also an option.

    https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-export-template

    Cheers,

    Doug


    Premier Field Engineer - Microsoft


    Tuesday, July 10, 2018 4:26 AM