AzCopy
Copy Managed Disk to Other subscription or other Regions.
Stop Virtual Machine
Stop the virtual machine from migrating
- Click Stop on the Virtual Machine that should be migrated.
Enable the Export function to generate a single URL containing the VHD of the managed disk to migrate.
- On the selected virtual machine, click on Disks
- Select the managed disk that you want to migrate
- Click Export
- Click on the Generate URL button
- Copy this unique URL pointing to the target VHD file to the Notepad or any other clipboard.
Create a storage disk in the target region of the new or existing subscription.
- So now, we need to create a storage account in the target region on the target subscription
- Create a Container containing the VHD file to use and retrieve the connection information to that storage account:
- On the Azure portal, select All Services.
- Scroll to storage, and then select storage accounts
- On the Storage Accounts window, click Add
- Select the subscription in which you want to create the storage account, as well as the target resource group
- Enter the name for your storage account
- Select the location of your storage account (target region)
- Leave all other fields to their default value
- Click Verify + Create to review your storage account settings and create the account.
- After the storage account is created, click Blob on the container
- On the Name field, type VHDs
- Click the OK button to confirm. This folder will contain the VHD file copied to the new region.
- Click VHDs and then select Properties
- Copy the URL to Notepad
- Click access keys and copy the Key1 key to the Notepad.
Use AzCopy
Use an Azure Virtual Machine to copy the data (VHD File) from a Managed Disk to a new storage account in the target subscription. This will reduce copy time. You can copy data between a file system and a storage account, or between storage accounts.
- Run a command prompt from the Azure virtual machine
- Select the C:\Program Files (x86) \microsoft SDKs\Azure\AzCopy Directory
- Type the command to copy the data from the source managed disk to the target storage account previously created in a target subscription.
- Don’t forget to add a file name that ends on .vhd.
azcopy /source:”<URL_FROM_VHD>” /dest:”<URL_VHD_DESTINATION>” /destkey:”<KEY1>”
Progress:
During the copy you will see the file and the transfer rate in Mbps
Finished 1 of total 1 file(s).
[2019/04/24 13:08:18] Transfer summary:
—————–
Total files transferred: 1
Transfer successfully: 1
Transfer skipped: 0
Transfer failed: 0
Elapsed time: 00.00:09:41
C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy>
copy completed, create a managed disk from the copied vhd.
- All services
- Select disks and click Add
- Enter the name of the managed disk to be created from the VHD file copied to the Storage account
- Select the target subscription, the target resource group, and especially the target region
- From the source Type drop-down menu, select Storage Blob, and then click the Browse button
- Select the target storage account
- Select the VHDs container
- Select the copied VHD file and then validate by clicking the Select button
- Enter the size in GiB and then click the Create button.