Azure Resource Mover - Move resources between regions, subscriptions and resource groups

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I've used this and it's very cool, however, there are so many limitations and dependencies that moves are still a pain. But, again, this is cool and I'm glad it exists on Azure.

👍︎︎ 1 👤︎︎ u/JMGrange 📅︎︎ May 20 2021 🗫︎ replies

I was just thinking about this today ha, added to my watch list.

👍︎︎ 1 👤︎︎ u/z33ma 📅︎︎ May 20 2021 🗫︎ replies

I got very excited when I saw this but it only appears to be able to move VMs and SQL databases across regions. I was hoping for something that could move storage accounts, live functions, webapps etc. Anybody know if there is a roadmap for those?

👍︎︎ 1 👤︎︎ u/Content-Appearance97 📅︎︎ May 21 2021 🗫︎ replies
Captions
hey everyone in this video i want to dive into moving resources between subscriptions between resource groups and even regions and that last one in particular using the new azure resource mover as always if this is useful a like subscribe comment and share is appreciated and hit that bell icon to get notified when i release new content or do live events so let's think about for a second if i think about resources and subscriptions and regions how do all these things fit together so i can really think about we have the idea of sure we have this great big region and obviously potentially there's multiple regions so i can think hey look there's another great big region over here so these are different physical sets of resources again a region remembers that two millisecond latency envelope and i often want to use different regions maybe to be closer to where my customers are for resilience if saying happen to a region so i can think about okay so i have here this kind of region 1 and we'll say region 2. now to actually leverage and create those resources well i have a subscription now i can think about okay let's take an example where i have kind of a subscription one and maybe there's another subscription kind of this subscription too and i can really think about there's going to be this kind of line between them just so i can work out well what's in each of those various regions so i have different regions i have different subscriptions now when i create resources will resources have to live inside a resource group so i could for example create a resource group resource group one and inside that i can create resources now when i think about the actual resources themselves there are dependencies between them for example if i actually think about okay i'll create a virtual machine so i can think very very simply okay easy i have this virtual machine resource but is it really just a virtual machine um well no it's not so a virtual machine actually has dependencies on other things i can think about well i have a dependency for example on a storage account for my diagnostics i have a dependency on one or more disks for my os for my data i can think about i have a dependency on a network interface that is its own resource now that network interface card well it actually will go and link to a particular subnet in a particular v-net and it may even have a public ip so it depends on this public ip resource which actually then has an actual physical ip address so there's all of these dependencies between those different resources now i cannot rename a resource group today and there may be times where do you know what things have changed it could be hey i used a certain region initially because maybe another region didn't exist this wasn't there when i created these resources or maybe this didn't have certain functionality maybe didn't have availability zones or certain types of resources but now my needs have changed i want to be able to go and actually move to that region maybe my data residency my compliance requirements have changed maybe there's a merger acquisition hey i've bought some other company and yeah i want to bring resources into different regions or want to bring resources between subscriptions i may also just want to move resources between subscriptions maybe because of restructuring in my company maybe it's now under a different department now no remember subscriptions actually live under this whole kind of management group structure you have kind of your root aad and you have kind of the root management group and then i can create a whole hierarchy of management groups where the subs actually live and i can move subs around the management group hierarchy fairly easily so that's not in scope for this conversation we're really focusing on hey i want to be able to move these resources to another region or i want to move it to a different subscription and obviously in the other subscription there'd be a target kind of resource group or maybe it's just even another resource group in the same subscription so we have all these different scenarios now many resources are actually confined to a region and if you're interested in that i released a video just i think last week about why the resource is deployed to a certain region so i can't just span these automatically between regions also note some resources actually cannot be moved for example this public iep resource that's metadata but that actually then goes to specifically an actual ip address now that actual ip address is bound to that region i cannot move that so if i want to actually go to another region sure the metadata of that public ip i can move it's going to get a new actual public ip address the way the routing works i can't move a public ip between regions i would just get a new ip now in terms of doing these actual moves there's two types of move now the azure resource mover is really consolidating these together in terms of discoverability there are two very discreet actual sets of move technology i can think about if i go over to this side if i'm moving in this direction so i'm moving between subscriptions or resource groups this is an azure resource manager operation because really what i'm moving is fundamentally metadata i don't actually typically have to actually move physical things bits on a disk or anything else i'm moving metadata whereas when i'm moving between regions if i'm going this way it's actually a very different thing so this is actually the azure resource mover so there are two different technologies however to make it simpler to actually discover they both kind of fall under azure resource mover but realize there's two very different things happening because this one well this actually can vary i'm going to get into more detail on that but if you go and look at the portal so firstly we could just actually go and look for example at a resource group so if i just quickly jumped over and looked at my resource groups and i could for example look at my demo vm resource group so what you'll actually notice i have this option to move now i have to select saying so if i selected my virtual machine now you can see i have my move and it's actually giving me hey look i can move to a resource group move to another subscription or move to another region and it's helping me surface those different options and if i select those well this is opening up the arm kind of move resource option but i can also if i go azure if i type right resource mover this surfaces the three scenarios i can see hey look i can move resources to another subscription move to another resource group or move to another region so i have these different options available to me now i do want to call out this is i'm looking right now at the preview.portal.azure.com this will become mainstay soon but this actually brings all those three things together to really just help the discoverability of it but we have these different paths these different scenarios depending on how am i moving across subscriptions moving across resource groups or moving to another region the important thing here i cannot in one step go hey from a subscription in region one to a different subscription in region two that is not possible i would have to do two separate steps because remember two different technologies really at work here so if i wanted to move to another region and another subscription step one hey i'll use azure resource mover to move it to region two and then after that's moved then i'd perform another move to actually move it between subscriptions so i cannot move between regions and subscriptions or resource groups in one operation um if i want to go between subscriptions it's two different separate operations i would perform so that's kind of an important point just to realize hey there are those two different scenarios so let's focus on hey i want to move a virtual machine now there are multiple steps actually to this pro process the first thing that's actually going to happen is i'm going to create kind of a move collection so i can think about hey i have this move you can think of this as a workspace for this move set of operations now this particular collection is unique it's really based around the subscription so kind of sub 1 and then the source and destination pair so i'm thinking kind of region 1 to region 2. if i also want to move something to region three it would be a different move collection so the move collection is really based around those three um different entities the subscription the source region and the destination region and then all i'm essentially going to do is put resources into that so i say hey i want to add that vm into this move operation now what that actually does at this point it creates kind of a proxy resource in that move collection now it's also going to add a resource group because obviously i have to have a resource group as part of that so it's going to kind of add the resource group so that's step one and we can see that so if i jump over and i could say hey i want to move resources to another region so move across regions so i select the source region so hey i know i have things in kind of south central us and let's say sure we moved to east us too so now i'm going to actually go and select resources now in this case i'm just going to select demo vm now remember as we talked about there are things it needs to actually function but this is kind of my step one i'm just gonna go and say hey i'm just gonna add this virtual machine hit next it's telling me a few different things so hey it's going to hey validate dependencies then i have to prepare i if it has state am i going to talk about that i have to set up saying to replicate that then i'm going to actually move and then i have choices on what i want to do once it's moved so i'm going to say sure go ahead and proceed and that's going to add resources to the move now at this point that's going to take a little bit of time but now i can go to my move options and once that has actually kind of sunk in i'll actually be able to see that resource obviously i have to wait for this to finish so while that's kind of going on i'll just kind of go back to what's going to happen next so once i've done that step i've created that my next step is i actually have to work out what are the dependencies so it's going to do a dependency check now in that dependency check it's going to say hey look um there's this nick there's this v-net and there's this disc what of those things do you want to also include and i can kind of check boxes and it's going to show me top-level dependencies and also child dependencies as well if i select that so i might say well yeah okay obviously i do want to include the disk as well um i do want to include kind of a nick as well but you know what i don't want to include the v-net i've got other things maybe in my target so i've got this resource group over here whatever that's called i already have a v-net i have a v-net there already i have a sub there go ahead and connect it to that subscription because i can actually change certain configurations i'll actually be able to modify the resources say hey maybe i want to go to particular az in that target region hey use this existing resource over there so there are things i can actually tweak to control exactly what is there now things like the storage account today i actually cannot move across regions and i can actually look at the documentation so if we look at the documentation for a second it actually shows us what we can move so i can see here okay so we've got azure vms even encrypted vms and associated disks so for these virtual machines it would actually add to the dependencies things like azure key vault things like a disk encryption set so it's going to understand those so if i'm using azure disk encryption it will actually go ahead and do things like hey copy the key it will create a new disk encryption set so it's going to handle those things hey okay i can move nick's availability sets virtual networks public ips now it says public ip addresses remember what i said it can't move the actual ip it can move the metadata the resource object but it will get a new ip address actually in the target region nsgs internal public load balancers and azure sql databases so those are the resources that i can actually move today so let's actually see has it found those dependencies yet so if we go back over again and i go and look at my azure resource mover and let's hit refresh okay so there's my demo vm now notice it's telling me hey look it's calling out here validate dependencies and it's calling out issues you have not validated dependencies so i'll say okay go and validate the dependencies so it's going to go through and work out what does this actually require but also notice this destination configuration option so if we look at the documentation it actually goes into a lot of detail about what target destination settings you can modify so things like the vm name availability zone sku vault disk encryption set networking resources so hey use an existing network resource in the destination region and public ip address skus resource dependencies there's a whole set of things that i can actually tweak and that's for vm for sql there are also different options that i can actually modify so i don't have to move it exactly as is there are things i can actually tweak as part of that now i realized i actually messed up my vm wasn't running so we never added the vm so i have to i just started the vm and added it so my bad i thought that was kind of weird what was going on so i did the validate dependencies and now it's obviously saying hey look there there are some dependencies so you want to add some dependencies because it's found there's things it relies on so now i can do add dependencies and it's showing me all of the things it's dependent on say hey yeah move the nic i don't want to move the network yes move disk encryption set uh maybe that's all i want to move obviously i need a resource group as well i could add those dependencies in so it's going to add all of those various things into my job now if i go back now and look at that destination configuration actually of the vm not the resource group we can see hey i have options i have things like the virtual machine actual configuration i could create a new virtual machine i have zones i can pick the sku availability set so i have options around what i can actually change let's see if i can do a refresh here okay so now i have some of those other things as well so i could look at things like hey the network interface hey dot i can change those configurations around all of the different aspects of the resource so that's the idea that it went off and actually found those dependencies now the next thing i would do would be this prepare now the prepare varies depending on the resource because we think about hey look there's this move but there's this idea of resources that have a state and those that are state less i.e does it have a data plane for example i can think about well a disk has state it has content so i have to get that copied over a sql database has content i have to get that copied over whereas something like actually a network interface something like an actual vm they don't actually have state the state of a vm is in the disk so that's really an arm template export and import to actually create those things so when i say prepare prepare will do different things if it has state for example if it's a vm then it's going to use asr to actually now start replicating to a disk in the target region if it was sql it's going to set up geo replication so there's different options if it has state if it's stateless it doesn't really need to do anything now once you've done that once you've done the preparing it starting to get that then i can actually do the initiate move so initiate move actually does the failover it would create the resources on this side and then shut down the source on this side so that's the next step we can see that in the portal so hey if i'd actually gone through and completed the repair takes too long to do here once the repair is done and it's doing that asr application or that sql geo replication then i would say initiate move that would actually now do the failover now at that point once i've done that move i have two choices discard move or commit move so i can really think about well obviously discard move essentially rolls it all back it would delete the resources that it created over here it would delete those went back here commit would say hey okay i i'm now and i'm keeping this configuration optionally it will now give you the option to delete source by default it will not it will shut it down it will not delete it but if you want to you can say kind of delete the source you have to type in yes make sure you're really really sure this it would then actually go and delete that source for you as well but ordinarily if you don't do that it will leave those resources stopped but intact they're over there so that's really the steps that's what involved to use azure resource mover i can think about hey i create this move collection i add resources to it then i run the dependency check it will work out hey what things i want i can modify aspects of the configuration i don't have to include everything then i do the initiate if it has state start actually doing that replication then i can actually do the initiate move which does the failover and then i either commit keep it or discard delete that roll back to over here and then optionally i can delete that source it can do it for me like i said no no i'll do it myself later on so that's it again the azure resource manager is super powerful it's literally going to walk you through all of those steps i add the resources i validate the dependencies i run the prepare to start replicating i fail over with initiate move and then i either fail back or commit then optionally i can delete the source and if i kind of change my mind i can just say hey remove i don't want to do this anymore i'm not going to proceed and that's kind of it in a nutshell so azure resource mover is really about that moving between regions but it also helps in discoverability it will facilitate and hook into the arm kind of metadata move to move between resource groups or move actually being between subscriptions but remember if you want to move between subs and regions it's two steps i firstly move between regions and then i can move between subscriptions that's it i hope that was helpful if you are doing vms make sure you start them which i it automatically shut down overnight and i'd forgotten um but until next time take care you
Info
Channel: John Savill's Technical Training
Views: 7,776
Rating: undefined out of 5
Keywords: azure, azure cloud, microsoft azure, microsoft, cloud, azure resource mover, move resources, change region
Id: 6FslxGE9YJM
Channel Id: undefined
Length: 23min 22sec (1402 seconds)
Published: Thu May 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.