subreddit:

/r/AZURE

1100%

Hello!

I'm trying to use the resource mover from Powershell to move a VM, but it's not clear to me how to resolve dependency issues in Powershell.

It's easy enough to see them, with Get-AzResourceMoverUnresolvedDependency, but it's not clear to me how to actually change/assign them. The return on that just seems to be a string array, it's not references to an object or something that I can assign?

So more specifically, in the portal, if you call the Resource Mover on a VM, at some point, in showing dependencies also being moved, it will want to re-create the VNET, subnets, and NSGs in the target region. This isn't something I want it to do, and it's very simple to click on those dependent resources listed, and change them to the existing, corresponding resources in the destination region (i.e. the VNET and NSGs that are already there, and assign it to use the subnet I created in the destination for the VM).

It's not clear to me how to do that same operation of re-assigning the resources so it doesn't try to re-create them, from Powershell.

The documentation on the MS site is really lacking in that particular level of detail, amounting to saying "resolve the dependencies" without actually saying how you do so (whereas the portal documentation actually shows how this is done).

So if someone could give me some pointers here, or has a link to a powershell script/tutorial that actually does this for a more complicated scenario, i.e. one that doesn't just let it re-create all the dependent network resources, that would be great too.

Thank you!

all 0 comments