Journey to ARM–Part III – Copying Storage

Previously, in the ASM2ARM saga, I have created the VPN gateway I will need to connect my Azure VMs to my on-premises resources. Today I will show you how to move existing VHDs storage in classic storage to new ARM based storage blobs. In my case, I have made a few assumptions:

– You have a machine in the classic model, with storage in classic mode.

– The machine is stopped

Here’s a few things you will need:

– A new storage account, provisioned in ARM;

– Name and storage keys for the classic and ARM storage accounts;

– Name of the old machine and Cloud Service

The script, which was based on this article here, goes like this:

First things first, some variable definitions:


In this example, I’m copying the OS hard disks only. Next I will define my source and destination storage accounts and keys (don’t worry, these are not the real keys):


Then the actual copy:


This might take a while, depending on where your storage accounts are stored and since we are switching modes (classic to arm), all your copies will likely take some time. You can use the last part in the script to monitor the progress of the copy:


Find the final script here.

In my net bit of ARM awesomeness, I’ll show you how to create the new VM having the VHD already stored in an ARM Storage account.

Stay tuned!

Hope this helps!