How to Move Azure Resources Between Subscriptions Step by Step

Author

Reads 439

Serene ocean waves with vibrant turquoise hues captured at sunset. Perfect for nature and travel themes.
Credit: pexels.com, Serene ocean waves with vibrant turquoise hues captured at sunset. Perfect for nature and travel themes.

To move Azure resources between subscriptions, you'll need to use Azure Resource Mover, a service that enables you to move resources between subscriptions and resource groups.

Azure Resource Mover supports the movement of Azure compute, network, and storage resources, but it does not support the movement of Azure Active Directory resources.

You can initiate a resource move from the Azure portal or using Azure CLI, and the process involves creating a resource move operation, specifying the resources to be moved, and selecting the target subscription and resource group.

Preparation

After validating your resources, Azure Resource Mover starts preparing them for the move. This process can take some time, depending on the resource type.

If your resources are stateful, Resource Mover will prepare them to replicate their data to the target region. On the other hand, if your resources are stateless, Resource Mover will create an ARM template to create resources in the target region.

Once the preparation is complete, your resources will have the status of "Initiate move pending." This is a clear indication that the move process is ready to be initiated.

Validating Dependencies

Credit: youtube.com, Application Dependency Validation and Generating App Migration Checklist

Validating dependencies is a crucial step in the migration process. It's where Azure Resource Mover checks for dependencies between resources.

If any dependent resources are found, you can add them to the existing collection. This ensures that all related resources are moved together.

To validate dependencies, you'll need to run the dependency validation again after adding any missing dependencies. This will check for any additional dependencies that may have been overlooked.

After two rounds of validation, the screen should indicate that there are no issues pending, with a status column showing the next step.

You can still identify further dependencies not included at this point. For example, the network interface of a virtual machine may be included in the context, but not yet validated.

Preparing the Environment

Clear the clutter and make space for your preparations. Cluttered environments can be overwhelming and make it difficult to focus.

Set up a dedicated workspace or area for your preparations, free from distractions and interruptions. This will help you stay focused and organized.

Credit: youtube.com, Lesson 6: Prepare for the Advanced Workflow - Update an Environment - Overview

Gather all necessary materials and supplies before starting your preparations. In our previous section, we discussed the importance of having a well-stocked emergency kit.

Ensure good lighting and ventilation in your workspace to maintain your physical and mental well-being. Proper lighting can help prevent eye strain and improve productivity.

Minimize noise levels by using noise-cancelling headphones or playing calming music. This can help you concentrate and stay in a productive mindset.

The Problem

The problem with moving Azure resources between subscriptions is that it can be a tedious task, especially if you have a lot of resources to move. I recently had to move resources from an expiring sponsored Azure subscription to another subscription, and I was surprised by how easy it was.

You'll need to check if the resource types you want to move are movable, which can be done using this page. I noticed that Static Web Sites are not moveable, which was a bit of a setback.

Modern data center corridor with server racks and computer equipment. Ideal for technology and IT concepts.
Credit: pexels.com, Modern data center corridor with server racks and computer equipment. Ideal for technology and IT concepts.

Having a list of moveable resource types can be a big help, but it's still a time-consuming process if you have a lot of resources to move. In my case, I was able to use the Azure Portal UI to select all resources and move them, which saved me some time.

Initiating the Process

First, let's initiate the move for our Azure resources. Once the move is initiated, the last step is to commit or discard the changes.

The move operation should be committed to finalize the process. If everything goes according to plan, we should be able to see the resources in their new resource group in the target region.

The resources in their new resource region can be confirmed once the move is successful.

Migrating Resources

Migrating resources between Azure subscriptions is a straightforward process. You can use Azure Resource Mover, which is still in preview, to move resources between subscriptions.

Credit: youtube.com, Moving Azure Resources Between Subscriptions & Regions

Azure Resource Mover can be accessed through the Azure Portal, where you'll see an icon in the middle of the Azure services. Alternatively, you can use the Move button on top of the resource group screen to initiate the move process.

Resource Mover has a few options, including moving resources to another resource group, subscription, or location. The move process involves selecting the objects to move, validating their dependencies, making the move, and committing the move.

To start the move process, you'll need to select the objects to move, validate their dependencies, and make the move. This process can be done for each context, which is a set of source and target regions.

If you're working with multiple employees, it's essential to keep track of the move process. You can use the Azure CLI to find the existing contexts/move collections objects by executing the command `az resource list --resource-type Microsoft.Migrate/moveCollections`.

The main properties you'll notice are the type (moveCollection), id, and resourceGroup. These properties identify the existence of the moveCollection and the source and target of the move.

Here's a list of supported resource types that can be moved across regions:

  • Availability sets
  • Azure SQL databases and elastic pools
  • Azure virtual networks
  • Azure VMs and associated disks
  • Internal and public load balancers
  • Network security groups (NSGs)
  • NICs
  • Public IP addresses

It's worth noting that Resource Mover is not a simple Azure object, but rather an environment for a wizard execution. The move process involves several steps, including preparation, initiation, and commitment.

Post-Migration

Credit: youtube.com, Azure Resource Mover - Move resources between regions, subscriptions and resource groups

After migrating your Azure resources, you'll want to verify their functionality to ensure a smooth transition.

You can do this by checking the resource's configuration and settings, as described in "Configuring Resources for Migration". This step is crucial to guarantee the resources are working as expected in the new subscription.

To troubleshoot any issues, refer to "Troubleshooting Migration Issues" for guidance on resolving common problems that may arise.

Deleting Source Objects

The move from one region to another is a significant process, and it's essential to finalize it by deleting the source objects. The process is completed and committed, but deleting the source objects is not automated, so it's up to you to do it.

You'll know the move is complete when it's been verified, and that's the last step of the whole process. After verifying the move, you can also consider deleting the resources in the source region.

The final step of the process is committing the move, which marks the end of the entire process.

Deleting Metadata Group

Credit: youtube.com, Data Migration PPT - Group 8

Deleting the metadata group is a crucial step in the post-migration process. It's essential to remove the metadata resource group to avoid any potential issues.

The metadata resource group may appear to be empty, but it's not entirely clean. You'll need to check in more details to discover deployments within the group.

You can use the Azure Portal to check for deployments. Clicking on the link will show you the deployments in more detail.

The move collection is still in place, even though it doesn't have any move resources. You can use the Azure CLI to check the count of move collections.

Here's a command you can use to check the count: `((az resource list --resource-type Microsoft.Migrate/moveCollections --output table) | wc -l) - 1`. This command will return a count of 2, indicating that there are still 2 move collections present.

You'll need to delete the lock on the metadata resource group before you can remove it. This lock is preventing the group from being deleted.

After removing the lock, you can safely delete the metadata resource group. This will help ensure a clean post-migration environment.

Once the metadata group is removed, you can re-check the count of move collections. This time, you should only see a single move collection present.

Frequently Asked Questions

What can u use to deploy Azure resources across multiple subscriptions?

Use Azure Lighthouse to manage and deploy Azure resources across multiple subscriptions, simplifying cross-tenant resource management. This solution helps streamline resource deployment and management across multiple subscriptions.

How do I change the subscription of a resource group in Azure?

To change the subscription of a resource group in Azure, navigate to the resource group overview page and select Move, then choose the destination subscription. This will initiate the resource group migration process.

Glen Hackett

Writer

Glen Hackett is a skilled writer with a passion for crafting informative and engaging content. With a keen eye for detail and a knack for breaking down complex topics, Glen has established himself as a trusted voice in the tech industry. His writing expertise spans a range of subjects, including Azure Certifications, where he has developed a comprehensive understanding of the platform and its various applications.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.