{"id":88443,"date":"2020-09-24T14:03:46","date_gmt":"2020-09-24T14:03:46","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=88443"},"modified":"2021-02-23T15:24:37","modified_gmt":"2021-02-23T15:24:37","slug":"lets-move-azure-resource-mover","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/cloud\/infrastructure-as-a-service\/lets-move-azure-resource-mover\/","title":{"rendered":"Let\u2019s move: Azure Resource Mover"},"content":{"rendered":"<p>Many different situations may create the need to move Azure resources or objects from one region to another:<\/p>\n<ul>\n<li>A company may move to a different country<\/li>\n<li>New regulations may create the need to move data<\/li>\n<li>A company may need to transfer one server to another branch<\/li>\n<li>Or there is a need to move to a region with AZs for added resiliency<\/li>\n<\/ul>\n<p>\nIf you include the need to copy a resource or set of resources, instead of only moving, the list expands a lot.<\/p>\n<p>Azure already offers the resources to do this: ARM templates, automated deployments, Data Sync, Recovery Services Vault, VM replication and so on. The problem is that sometimes, to move a set of objects together, you may need to use many of these services and understand how to use them.<\/p>\n<p>The solution is a new free service, still in preview, called <strong>Azure Resource Mover<\/strong>. This service reduces the complexity of moving resources, minimizing the number of decisions needed on how the resources will be moved. More than that, the last step, deleting the source of the move, is optional, as you will see in detail later. You can use this feature, not only to move resources, but also to copy and distribute them across many regions. During the move process, only one side (source or destination) will be active, but once you finish the move, if you decide not to delete the source, you have in fact a new deployment of the solution.<\/p>\n<h2>Set up the VMs<\/h2>\n<p>This article demonstrates two step-by-step moves to explain how the new <strong>Azure Resource Mover<\/strong> works displaying a complete test of the features. I start with two virtual machines, in two different regions, and both will move to <em>North Europe<\/em>.<\/p>\n<p>I created two <strong>resource groups<\/strong> as a starting point: <em>MoverDemo<\/em> and <em>MoverDemo2<\/em>, in different regions, <em>UK South<\/em> and <em>East US<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"199\" class=\"wp-image-88444\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-41.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>In each resource group, I created a virtual machine and the objects that follow it, shown in the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1176\" height=\"378\" class=\"wp-image-88445\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-152.png\" \/><\/p>\n<h2>Finding Azure Resource Mover<\/h2>\n<p>On the <a href=\"https:\/\/portal.azure.com\/\">Azure Portal<\/a>, you can use features still in preview, such as <strong>Resource Mover<\/strong>. Sometimes the <strong>Resource Mover<\/strong> may appear visible as an icon in the middle of the Azure services, but this usually happens when it was already used.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"507\" height=\"217\" class=\"wp-image-88446\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-153.png\" \/><\/p>\n<p>Another option is to use the search box on the site to find <strong>Azure<\/strong> <strong>Resource Mover<\/strong>, then click on it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"254\" class=\"wp-image-88447\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-154.png\" \/><\/p>\n<p>A third option is to use the <strong>Move<\/strong> button on top of the resource group screen. Open the resource group and click the <strong>Move<\/strong> button. Before <strong>Azure<\/strong> <strong>Resource Mover<\/strong> preview, there were only two options, move to another resource group and move to another subscription. <strong>Resource Mover<\/strong> included a new option: Move to another location.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"205\" class=\"wp-image-88448\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-42.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>There is a small difference between opening <strong>Resource Mover<\/strong> directly or using the move to another location button. When you use the move button, you will directly open the wizard to add new objects to move. However, if you open the <strong>Resource Mover<\/strong> by clicking the button on the Home page of the portal, you will see the initial screen shown in the next section.<\/p>\n<h2>Starting the Azure Resource Mover wizard<\/h2>\n<p>Azure <strong>Resource Mover<\/strong> is not a simple Azure object; it is an environment for a wizard execution. The first thing you\u2019ll see, when <em>Overview<\/em> is selected on the left side, is this guidance. This reflects, almost exactly, the sequence of steps of a move process:<\/p>\n<ul>\n<li>Select the objects to move<\/li>\n<li>Validate the objects dependencies<\/li>\n<li>Make the move<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1843\" height=\"855\" class=\"wp-image-88449\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-155.png\" \/><\/p>\n<p>These are the three main steps, but this is not the complete process, as you will discover on further steps.<\/p>\n<ul>\n<li>Click the <em>Across Regions<\/em> item on the left side of the screen<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"340\" height=\"275\" class=\"wp-image-88450\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-156.png\" \/><\/p>\n<p>On the middle-top screen, you will notice the information about source and target regions of the move. It may seem a bit strange at first glance, but this is not only information about the move, but a context control. Each set of source and target is a context for the move. You add objects in the context and start the steps for the move operation, being able to do it for each context.<\/p>\n<ul>\n<li>Click the <em>Change<\/em> link and change the context a few times to better understand how the different contexts work.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"993\" height=\"130\" class=\"wp-image-88451\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-157.png\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"382\" class=\"wp-image-88452\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-158.png\" \/> <br \/>\nWhile testing the context, you may have noticed that, once you change to an empty context, you will only be able to return to the previous one if you know the combination of source-destination.<\/p>\n<p>If one employee starts a move in a context, changes the context and does not touch it anymore, no one will know about the existence of that move. In this situation, you may need to use CLI to find the existing contexts\/move collections objects. You can open cloud shell from the top of the Azure Portal window and execute the following statement:<\/p>\n<pre class=\"lang:ps theme:powershell-ise\">az resource list --resource-type Microsoft.Migrate\/moveCollections<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"399\" class=\"wp-image-88453\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-43.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>The main properties you may notice are the type (moveCollection), id, and resourceGroup . These properties identify the existence of the moveCollection and the source and target of the move. Mind that you will only see this result after adding objects to a context because this will generate the moveCollection object. The product group is working on the creation of an overview section to list all the existing <strong>Move Collections<\/strong>, solving the problem above.<\/p>\n<ul>\n<li>Click the <em>Add Resources <\/em>button to include resources in the move context. Start with the move from UK South to North Europe.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"125\" class=\"wp-image-88454\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-44.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>When you click Add resources, a wizard will appear asking the source and destination of the move as shown in the figure below.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1015\" height=\"809\" class=\"wp-image-88455\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-159.png\" \/><\/p>\n<ul>\n<li>Click Next<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"253\" class=\"wp-image-88456\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-160.png\" \/><\/p>\n<ul>\n<li>Click the <strong>Select resources<\/strong> link<\/li>\n<li>Locate the resources you would like to move. In this example, I will move the resource group <em>MoverDemo.<\/em><\/li>\n<\/ul>\n<p>One good way to do this is filtering by resource group. You may notice the selection windows only show the resource groups that have at least one resource in the source region.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1015\" height=\"413\" class=\"wp-image-88457\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-161.png\" \/><\/p>\n<ul>\n<li>After selecting the resources, click the <em>Done<\/em> button<\/li>\n<\/ul>\n<p>\n<img loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"638\" class=\"wp-image-88458\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-162.png\" \/><\/p>\n<p>A screen will appear explaining the steps of the wizard. This screen also advises you that a new resource group will be created to keep metadata information and about the creation of a system managed identity which will receive permission to make the move. You need to mark the checkbox, agreeing with these steps, before clicking the button and moving forward.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"620\" class=\"wp-image-88459\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-163.png\" \/><\/p>\n<ul>\n<li>Change the context to East US-North Europe and repeat the steps in this section for the resource group MoverDemo2.<\/li>\n<li>Change the context back to UK South-North Europe. You will see the objects included as the following image:<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1211\" height=\"484\" class=\"wp-image-88460\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-45.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>The <strong>Status<\/strong> column shows in which step each object is. The <strong>Issues<\/strong> column alerts about any pending problem. At this point, you can already identify all the steps in the move process, although the sequence may not always be so clear:<\/p>\n<p><strong>Add Objects:<\/strong> Add in the context the objects to be moved. This step is completed.<\/p>\n<p><strong>Validate Dependencies:<\/strong> The objects included may depend on other objects. You need to execute a dependency validation for all of them.<\/p>\n<p><strong>Prepare:<\/strong> All the objects need preparation, and these preparations can be different for each object. It may involve cache, for example, additional metadata in the metadata resource group, and so on.<\/p>\n<p><strong>Initiate Move:<\/strong> The move task itself. This step creates the object in the destination region<\/p>\n<p><strong>Commit Move:<\/strong> This step works as a confirmation that we would like to keep the objects on the destination region.<\/p>\n<p><strong>Delete Source:<\/strong> This last step is optional. You can choose to delete the source objects or not. This makes <strong>Resource Mover<\/strong> way more powerful since it can be used to duplicate objects.<\/p>\n<h2>How do the steps work?<\/h2>\n<p>These steps, such as prepare, move, and commit, may appear as a black box for anyone who is using them. Here is a more in-depth explanation.<\/p>\n<p>The service was made to work for many objects, and more and more objects will be included. These steps may have different meanings depending on the object. The main difference is related to stateless and stateful objects.<\/p>\n<p><strong>Stateless:<\/strong> Objects which don\u2019t contain data, only definition and metadata, such as IP addresses and virtual networks.<\/p>\n<p><strong>Stateful:<\/strong> Objects which contain data, such as virtual machines and SQL databases.<\/p>\n<p>The steps apply differently depending on the object:<\/p>\n<p><strong>Prepare:<\/strong> For stateless objects, the prepare step creates the arm template for the object deployment. Stateful objects are more complex. The action may be different for each kind of object, such as replication for VMs, for example, but the prepare step will be just a preparation for the action.<\/p>\n<p><strong>Move:<\/strong> This step will implement the preparation. It can be a simple deployment of the ARM template created or the establishment of a replication, but for stateful objects, the actions may vary.<\/p>\n<p><strong>Commit:<\/strong> This is the confirmation to proceed to the destination object. For stateless objects, this doesn\u2019t mean too much, but for stateful objects, this may mean the replication being broken, for example.<\/p>\n<h2>Resolving dependencies<\/h2>\n<p>Follow these steps<\/p>\n<ul>\n<li>Click the button <strong>Validate Dependencies<\/strong><\/li>\n<li>Change the context to East US-North Europe and Validate Dependencies<\/li>\n<li>Return the context to UKSouth-North Europe<\/li>\n<\/ul>\n<p>Having the dependency validation finished, a new button will appear on top of the screen, <strong>Add dependencies<\/strong>, as in the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"922\" height=\"103\" class=\"wp-image-88461\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-164.png\" \/><\/p>\n<ul>\n<li>Click the <strong>Add dependencies<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"880\" class=\"wp-image-88462\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-165.png\" \/><\/p>\n<ul>\n<li>On the Add Dependencies screen, select the resource group<\/li>\n<\/ul>\n<p>The resource group also needs to be moved together with the virtual machine. More than that: It needs to be moved first.<\/p>\n<ul>\n<li>Click the <strong>Add dependencies<\/strong> button<\/li>\n<\/ul>\n<p>At this point, you will get back to the same screen listing the resources to move, the only difference is the presence of the resource group.<\/p>\n<ul>\n<li>Click <strong>Validate Dependencies<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"72\" class=\"wp-image-88463\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-166.png\" \/><\/p>\n<p>After including the missing dependencies, you need to validate again to ensure there is no additional dependency missing. After the 2<sup>nd<\/sup> round of validation, the screen will look like the image below: No issues pending, no blue alerts, but the <strong>Status<\/strong> column telling what the next step is.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1567\" height=\"517\" class=\"wp-image-88464\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-167.png\" \/><\/p>\n<ul>\n<li>Change the context to East US-North Europe and repeat the steps in this section.<\/li>\n<\/ul>\n<h2>Modifying the destination configuration<\/h2>\n<p>At this point, when the <strong>Status<\/strong> column shows the next step is the <strong>Prepare<\/strong>, you can customize the destination configuration for each object.<\/p>\n<p>The column <strong>Destination Configuration<\/strong> has the destination name of the object as a link. If you click the link, you will reach a page to customize the object. Each object has different customization options.<\/p>\n<p>Below you can see the configuration options of a virtual machine and a network interface<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"613\" class=\"wp-image-88465\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-46.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"712\" class=\"wp-image-88466\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-47.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<h2>Moving the resources<\/h2>\n<p>After including the objects into the context, you don\u2019t need to execute the steps for all the objects together. In fact, it\u2019s exactly the opposite: In some situations, the objects will require that a dependency is moved first before even the prepare step, while in other situations you will have stateless and stateful objects mixed.<\/p>\n<p>One stateful object can even take days to be moved (databases or virtual machines). You will want to ensure all stateless are moved first and only after that move the stateful objects within an acceptable window in the production environment.<\/p>\n<p>During the following steps, you will move each context using different sequences, just as an example that this can be done. However, for virtual machines, both contexts have a requirement: The resource group needs to be moved first<\/p>\n<ul>\n<li>Change the context back to UkSouth-North Europe<\/li>\n<li>Select the resource group, marking the checkbox<\/li>\n<li>Having the resource group selected, click the <strong>Prepare<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"311\" class=\"wp-image-88467\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-social-media-post-description-a-7.png\" alt=\"A screenshot of a social media post\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the button to go forward with the preparation process<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1242\" height=\"139\" class=\"wp-image-88468\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-168.png\" \/><\/p>\n<p>As you may notice, the <strong>Status<\/strong> column changes only for the resource group, displaying the next step<\/p>\n<ul>\n<li>Select the resource group again and click the <strong>Initiate Move<\/strong> button on the top of the screen.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"443\" height=\"63\" class=\"wp-image-88469\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-48.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>On the following screen, click the <strong>Initiate Move<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"317\" class=\"wp-image-88470\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-social-media-post-description-a-8.png\" alt=\"A screenshot of a social media post\n\nDescription automatically generated\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"292\" height=\"91\" class=\"wp-image-88471\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-49.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Change the context to East US-North Europe<\/li>\n<li>Repeat the steps in this section<\/li>\n<li>Change the context back to UKSouth-North Europe<\/li>\n<li>Select all the objects, except the resource group<\/li>\n<li>Click the <strong>Prepare<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"515\" class=\"wp-image-88472\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-social-media-post-description-a-9.png\" alt=\"A screenshot of a social media post\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the button to go forward with the preparation process<\/li>\n<li>Change the context to East US-North Europe<\/li>\n<li>Select all the stateless objects, all objects except the resource group (already prepared) and the virtual machine (stateful)<\/li>\n<li>Click the <strong>Prepare<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"423\" class=\"wp-image-88473\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-social-media-post-description-a-10.png\" alt=\"A screenshot of a social media post\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the button to go forward with the preparation process<\/li>\n<li>After the preparation process, select the virtual machine<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1250\" height=\"485\" class=\"wp-image-88474\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-50.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>At this point, you may notice how the objects are advancing in different steps. The resource group was already moved, the stateless objects are already prepared, and the virtual machine will be prepared now.<\/p>\n<ul>\n<li>After selecting the virtual machine, click the <strong>Prepare<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"310\" class=\"wp-image-88475\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-social-media-post-description-a-11.png\" alt=\"A screenshot of a social media post\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the button to go forward with the preparation process<\/li>\n<li>Change the context to UKSouth-North Europe<\/li>\n<li>Select all stateless objects, all objects but the resource group (already moved) and the virtual machine (stateful)<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"322\" class=\"wp-image-88476\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-computer-description-automatica-4.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the top <strong>Initiate Move<\/strong> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"449\" class=\"wp-image-88477\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-social-media-post-description-a-12.png\" alt=\"A screenshot of a social media post\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <strong>Initiate Move<\/strong> button<strong><br \/>\n<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"292\" height=\"91\" class=\"wp-image-88478\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-51.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Change the context to East US-North Europe<\/li>\n<\/ul>\n<p>Once the preparation of the virtual machine has completed, you will see the status of the objects like the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"287\" class=\"wp-image-88479\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-52.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Select all the objects with status <em>\u2018Initiate move\u2019 pending<\/em><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"401\" class=\"wp-image-88480\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-computer-description-automatica-5.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the top button <strong>Initiate Move<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"391\" class=\"wp-image-88481\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-computer-description-automatica-6.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the button <strong>Initiate Move<\/strong><\/li>\n<li>Wait for the move to be completed<\/li>\n<li>Click the Home button to return to the start page of the Azure Portal<\/li>\n<li>Locate the <strong>Resource Groups<\/strong> option to list all resource groups<\/li>\n<li>Filter the resource groups typing \u201cmover\u201d on the filter box<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"370\" class=\"wp-image-88482\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-53.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>At this point of the execution, these are the resource groups we can find:<\/p>\n<ul>\n<li>Two sources, you started with these<\/li>\n<li>Two destinations, same name as the source but with the destination region concatenated<\/li>\n<li>Two metadata resources, identifying the source and target of the move<\/li>\n<li>Change the context to UkSouth-North Europe<\/li>\n<li>Select the virtual machine, the only object still not moved<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"271\" class=\"wp-image-88483\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-54.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the top button <strong>Initiate Move<\/strong><\/li>\n<li>Click the button <strong>Initiate Move<\/strong><\/li>\n<li>Wait the move to be completed<\/li>\n<\/ul>\n<p>At this stage, you have two move contexts with all the objects on the <em>\u2018Commit move\u2019 pending<\/em> status. Our example will be more complete by committing only one of the contexts and deleting the other.<\/p>\n<ul>\n<li>Select all the objects in the context<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"499\" class=\"wp-image-88484\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-55.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <em>Commit move<\/em> top button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"356\" class=\"wp-image-88485\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-56.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the Commit button at the bottom of the screen<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"274\" height=\"117\" class=\"wp-image-88486\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-57.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>It\u2019s still possible to identify further dependencies not included until this point. On this example, the network interface of the virtual machine is included in the context.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1220\" height=\"401\" class=\"wp-image-88487\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-58.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <strong>Commit<\/strong> button on the bottom of the screen again<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1244\" height=\"468\" class=\"wp-image-88488\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-59.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>The commit breaks the relationship between the source and the destination. The last pending step is to delete the source, but this is an optional step, you can choose to delete the source or not, so you would complete a move or have a copy of the objects.<\/p>\n<h2>The metadata resource group<\/h2>\n<p>This is an excellent moment to look again at the metadata resource group. The content of the resource group <em>Resourcemoverrg-eastus-northeurope<\/em> is like the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"142\" class=\"wp-image-88489\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-169.png\" \/><\/p>\n<p>The recovery Services vault is a service used for virtual machine replication. You can check more details about the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/backup\/backup-azure-recovery-services-vault-overview?WT.mc_id=DP-MVP-4014132\">Recovery Services Vault<\/a> on the Microsoft website.<\/p>\n<p>The storage account, for its part, has a container and many files used during the move process<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"393\" class=\"wp-image-88490\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-60.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>As you noticed before, the steps of the move were applied as deployments over this resource group. Checking the list of deployments, you will find something like the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"357\" class=\"wp-image-88491\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-61.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p><strong>Azure<\/strong> <strong>Resource Mover<\/strong> used <strong>Replication Policies<\/strong> to replicate the virtual machine. You can read more details about <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/site-recovery\/azure-to-azure-how-to-enable-replication?WT.mc_id=DP-MVP-4014132\"><strong>Replication Policies<\/strong><\/a> on the Microsoft website.<\/p>\n<h2>Discarding a move<\/h2>\n<p>The move needs to be done in steps according to the dependency of the objects, the discarding of the move also needs to be done in steps, in reverse, according to the dependencies<\/p>\n<ul>\n<li>Change the context to East US-North Europe<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1258\" height=\"470\" class=\"wp-image-88492\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-62.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Select all the objects except for the resource group.<\/li>\n<\/ul>\n<p>All the objects depend on the resource group, so the objects need to be removed first, and the resource group will be left for last<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1258\" height=\"470\" class=\"wp-image-88493\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-63.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <em>Discard move<\/em> top button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"353\" class=\"wp-image-88494\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-64.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <em>Discard<\/em> button on the bottom of the screen<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"234\" height=\"85\" class=\"wp-image-88495\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-65.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Wait the discard to be completed<\/li>\n<\/ul>\n<p>After the discard, the objects return to the status \u2018Initiate Move\u2019 pending. They still need to be removed from the context<\/p>\n<ul>\n<li>Select all the objects but the resource group<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"465\" class=\"wp-image-88496\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-computer-description-automatica-7.png\" alt=\"A screenshot of a computer\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the top <em>Remove<\/em> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1058\" height=\"356\" class=\"wp-image-88497\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-66.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <em>Remove<\/em> button on the bottom of the screen<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"238\" height=\"77\" class=\"wp-image-88498\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-67.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>After the remove is completed, select the resource group<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1154\" height=\"277\" class=\"wp-image-88499\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-computer-screen-description-aut-1.png\" alt=\"A screenshot of a computer screen\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <em>Discard move<\/em> top button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"207\" class=\"wp-image-88500\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-68.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <em>Discard<\/em> button on the bottom of the screen<\/li>\n<li>After the discard, select the resource group again<\/li>\n<li>Click the top <em>Remove<\/em> button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"201\" class=\"wp-image-88501\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-69.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<ul>\n<li>Click the <em>Remove<\/em> button on the bottom of the screen<\/li>\n<\/ul>\n<h2>Deleting source objects<\/h2>\n<p>The move from UK South to North Europe is completed, committed. The last step is to delete the source objects. However, there is no automated way to do that, deleting the source is up to you.<\/p>\n<ul>\n<li>Change the context to UKSouth-North Europe<\/li>\n<\/ul>\n<p>Besides deleting the source, you also need to remove everything from the context, exactly as you did with the other context, East US to North Europe.<\/p>\n<h2>Deleting the metadata resource group<\/h2>\n<p>Returning to the home of the Azure Portal and looking for the resource groups, you will notice the destination resource group was removed, but the metadata resource group is still in place.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"481\" class=\"wp-image-88502\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-70.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>Azure Resource Mover is an environment for a wizard, leaving many details hidden in background objects. The metadata resource group may appear to be empty, but checking in more details, you will discover the resource group has deployments. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"74\" class=\"wp-image-88503\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-170.png\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"396\" height=\"114\" class=\"wp-image-88504\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-171.png\" \/><\/p>\n<p>Clicking on the link of the image above, you can see these deployments in more details.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"93\" class=\"wp-image-88505\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-172.png\" \/><\/p>\n<p>Clicking on the successful deployment on this list, you can see details about the objects deployed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"615\" class=\"wp-image-88506\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-social-media-post-description-a-13.png\" alt=\"A screenshot of a social media post\n\nDescription automatically generated\" \/><\/p>\n<p>As you may notice on the type column, the objects deployed are <strong>MoveResources<\/strong>, deployed inside a <strong>MoveCollection<\/strong>. Each object included in the move context generates a <strong>MoveResource.<\/strong><\/p>\n<p>The move collection is still in place, although it doesn\u2019t have any move resources. You can open cloud shell and execute the following statement to check:<\/p>\n<pre class=\"lang:ps theme:powershell-ise\">((az resource list --resource-type Microsoft.Migrate\/moveCollections --output table) | wc -l) -1<\/pre>\n<p>The result, count of move collections, is still 2, both move collections are still present. You can drop the metadata resource group, but the group has a lock. You need to delete the lock first, as you may notice on the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"219\" class=\"wp-image-88507\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-71.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>After removing the lock, you can remove the resource group with no further problem<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"782\" height=\"237\" class=\"wp-image-88508\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-72.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"511\" class=\"wp-image-88509\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/a-screenshot-of-a-cell-phone-description-automati-73.png\" alt=\"A screenshot of a cell phone\n\nDescription automatically generated\" \/><\/p>\n<p>When the removal of the metadata resource group is completed, you can execute the count again, this time we will get only a single move collection.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1266\" height=\"51\" class=\"wp-image-88510\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2020\/09\/word-image-173.png\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>This is a preview version, probably while reading and testing this article you may have noticed many details which could be improved. You can leave a comment on this article, and let\u2019s talk about what could be improved.<\/p>\n<p>You may also be interested in the following documentation of this new feature:<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/resource-mover\/about-move-process?WT.mc_id=DP-MVP-4014132\" target=\"_blank\" rel=\"noopener\">Overview<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/resource-mover\/support-matrix-move-region-azure-vm?WT.mc_id=DP-MVP-4014132\" target=\"_blank\" rel=\"noopener\">Support matrix for VM &amp; networking resources<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/resource-mover\/tutorial-move-region-virtual-machines?WT.mc_id=DP-MVP-4014132\" target=\"_blank\" rel=\"noopener\">VM and Networking tutorial<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/resource-mover\/support-matrix-move-region-sql?WT.mc_id=DP-MVP-4014132\" target=\"_blank\" rel=\"noopener\">Support matrix for SQL resources<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/resource-mover\/tutorial-move-region-sql?WT.mc_id=DP-MVP-4014132\" target=\"_blank\" rel=\"noopener\">SQL tutorial<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Moving resources from one location to another in Azure has been possible but not easy to do. In this article, Dennes Torres introduces an exiting new Azure feature: Azure Resource Mover.&hellip;<\/p>\n","protected":false},"author":50808,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[137091,53,45],"tags":[5134],"coauthors":[6810],"class_list":["post-88443","post","type-post","status-publish","format-standard","hentry","category-azure","category-featured","category-infrastructure-as-a-service","tag-sql-prompt"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/88443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/50808"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=88443"}],"version-history":[{"count":3,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/88443\/revisions"}],"predecessor-version":[{"id":88513,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/88443\/revisions\/88513"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=88443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=88443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=88443"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=88443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}