Technology, Continued...

Ramblings about business, technology, development and my life


Copying Azure VMs from one account to another

I had to copy my VM blob from one account to another.  I wanted a way that wouldn’t require me to download the vhd locally, just to then have to turn around and upload it again.  Instead, I wanted to be able to have the copy done within the Azure cloud itself.  Fortunately, I found free software to do just that.  It’s called AZCopy.  Here’s the link you need:

You don’t have to install anything.  Just run it from the command prompt.  Here’s the syntax of the command I used:

   1: AzCopy https://<sourceaccount><sourcecontainer>/ https://<destaccount><destcontainer>/  /sourcekey:<key> /destkey:<key> /S

I’m not sure when you have to use https and when you don’t.  My paths in Azure didn’t show https, but when I tried to copy to my destination, I kept getting the error below.

Error parsing destination location "": The underlying connection was closed: An unexpected error occurred on a receive.

Once I changed it to https, it worked great.  Here’s the output of my results.

C:\_utilities>azcopy /sourcekey:srckey /destkey:dstkey /S

Transferring files /

Transfer summary:
Total files transferred: 1
Transfer successfully:   1
Transfer failed:         0

127GB copied in just a few minutes!  Perfect.

Comments are closed