Following are the steps that you could follow to migrate your VM from one location to another.
1. We have a VM created in East US location and we would like to move it to West Europe region.
2. Shut down the VM before we can start copy of this VHD.
< -- Getting source details -->
3. Now go to Storage and you will find there is already a storage created East US region and has the copy of our VM image.
4. Select this storage and go to dashboard tab. Make a note of its URL i.e. https://portalvhds984m39t8ykd7l.blob.core.windows.net
5. Go to Containers tab and you will see a container named “vhds”. This is our source container.
6. Click on “Manage Access Keys” icon on the bottom ribbon and make a note of the “Primary Access Key”.
< -- Creating a storage in destination region -- >
7. Now on the Storage tab itself, click on “New” and quick create a new storage in the region where you want to migrate the VM to. In our case it is West Europe.
8. Create a new Container in this storage and name is “vhds”.
9. Make a note of this new storage URL, container name and “Primary Access Key”.
< -- Copying VHD from source to destination -- >
10. Download and install AzCopy tool on a client machine.
11. Open an elevated command prompt and run cd C:\Program Files (x86)\Microsoft SDKs\Windows Azure\AzCopy
12. Open a notepad and copy this command on it
AzCopy https://<SourceAccountName>.blob.core.windows.net/<SourceContainerName> https://<DestinationAccountName>.blob.core.windows.net/<DestinationContainername> /sourceKey:<Access Key> /destkey:<AccessKey> /S
Replace the highlighted sections of the above command from the values that we had noted earlier in steps 3-9. Run this command in elevated command prompt.
< -- Adding VHD as an image -->
13. Now go to Windows Azure Management portal, Virtual machines section. Select “Images” tab.
14. Click on “Create” in the ribbon and add the VHD that we have copied to West Europe region.
< -- Creating new image from VHD -- >
15. Go to Windows Azure Management portal, Virtual machines section. Select “New”. From Gallery. And follow the directions inscreen shots below.