Opsgility Cloud Readiness Blog

The cloud moves fast! Keep up with the latest products, trends and more with Opsgility's industry experts and cloud-pros.

Copying VHDs (and other blobs) between storage accounts

Posted on: August 7, 2012 by Michael Washam

The Windows Azure cross platform command line tools expose an extremely useful new feature in Windows Azure Storage which is the ability to asynchronously copy blobs into storage accounts. The source blobs do not HAVE to be in a Windows Azure storage account. They could be anywhere that is publicly accessible. For more details on this new feature see Gaurav’s post on new Windows Azure storage features.

In this post I’m going to show how you can use this feature to copy VHDs between storage accounts which is a very commonly requested activity.

To get started you will need to download and configure the command line tools:


Once downloaded and configured the syntax for moving the blobs is simple:

azure vm disk upload <source-path> <target-blob-url> <target-storage-account-key>

The source path could be any publicly available source location such as an http server:
[sourcecode language=”bash”]
azure vm disk upload http://sourcewebsite.cloudapp.net/copyme.zip http://targetstorageaccount.blob.core.windows.net/testcopy/copyme.zip TARGETSTORAGEACCOUNTKEY

The copy is made by the Windows Azure storage service itself so the bits are never copied to your local machine which makes the transfer MUCH faster than doing this using storage tools.

To copy VHDs you can use the same syntax:

Keep in mind that the source storage container either needs to be marked public or you can also specify the URL with a shared access signature which is the recommended approach for security reasons (put it in quotes). The target storage account doesn't need the signature because you are required to specify the storage account key.

Before you ask - yes we definitely will have this functionality in the Windows Azure PowerShell cmdlets in the near future.

Copying VHDs and other blobs between storage accounts in Windows Azure


6 thoughts on “Copying VHDs (and other blobs) between storage accounts

  1. Mark

    Your link to the tools goes to a page “Tools for Mac and Linux” is there a separate link for Windows based? Thanks

    1. Michael Washam

      The Windows install directions are buried a bit but they are there:

      Linux and Windows: Install the latest version of Node.js (see Install Node.js via Package Manager), then run the following command:
      npm install azure -g


leave a reply