Moving an Azure VM Out of an Availability Set

SafiyullahSA 105 Reputation points
2024-11-28T17:03:18.8633333+00:00

Currently, there are two VMs in an availability set, and there is a requirement to move one VM to another resource group. However, an error occurs during validation. Is there a method to remove a VM from the availability set to make it standalone (i.e., with no infrastructure redundancy), or is it necessary to move the entire availability set along with the other VM to the target resource group?

Additionally, is the option of enabling Azure Site Recovery (ASR) to the target resource group for the VM and then disabling the replication after failover a viable solution?

Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
828 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pavan Minukuri 680 Reputation points Microsoft Vendor
    2024-11-28T20:26:01.1166667+00:00

    Hi @SafiyullahSA
    Welcome to Microsoft Q&A, Thanks for asking question here...!
    When dealing with VMs in an availability set in Azure, there are some limitations and considerations when trying to move VMs between resource groups.
    Moving a VM to Another Resource Group Availability Set Constraints: A VM that is part of an availability set cannot be moved to another resource group independently of the availability set. The VM and the availability set must be moved together, or the VM must be removed from the availability set first.
    Removing a VM from an Availability Set Standalone VM: To make a VM standalone (i.e., no longer part of an availability set), you would need to delete the VM while retaining its disks and then recreate the VM without specifying an availability set. However, this process involves downtime and reconfiguration.
    Steps:
    1.Delete the VM (retain the disks).
    2.Create a new VM using the retained disks, without specifying an availability set.

    Moving the Availability Set and VM Together Move Entire Availability Set: If you want to avoid reconfiguring the VM, you can move the entire availability set along with the VM to the new resource group.
    Steps:
    1.Go to the Azure portal.
    2.Select the resource group containing the availability set and VM.
    3 Choose the option to move resources.
    4.Select both the availability set and the VM to move to the target resource group.
    Using Azure Site Recovery (ASR): ASR for Resource Group Move: Using Azure Site Recovery (ASR) can be a viable solution for moving a VM between resource groups, but it comes with additional steps and considerations.
    Steps:
    1.Enable ASR: Set up ASR for the VM to replicate it to a different region or resource group. 2.Failover: Perform a failover to the target resource group.
    3.Disable Replication: Once the VM is running in the target resource group, disable replication if no longer needed.
    Summary
    Remove VM from Availability Set: Involves deleting and recreating the VM without an availability set.
    Move Availability Set and VM Together: Move the entire availability set with the VM to the new resource group.
    Azure Site Recovery (ASR): Set up ASR, perform failover, and disable replication as a potential solution.
    Each method has its pros and cons, including potential downtime and complexity. The choice depends on your specific requirements, including tolerance for downtime and the effort you're willing to invest in reconfiguration or setting up ASR.

    Please let me know if anything required.

    0 comments No comments

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.