Won
Won

Reputation: 1805

Download .vhd image from Azure to local machine, and upload to another Azure account

I'd like to download a VM image to my local machine, so I can use it locally and upload it to another credential of Azure. I know that there is blob URL but wget didn't help to download it, because it occurs

<Error>
<Code>ResourceNotFound</Code>
<Message>
The specified resource does not exist. RequestId:e7ffa746-b35c-44f3-a354-af2abfdaa823 Time:2012-09-27T18:07:00.3196644Z
</Message>
</Error>

Any ideas? I also tried to migrate a VM image from one Azure account to another using Azure CMDLets, but got trouble because CMDLets doesn't work properly in multiple credentials.

Upvotes: 20

Views: 35836

Answers (4)

Net User HH
Net User HH

Reputation: 213

If you prefere a scripting solution I would suggest the Microsoft Azure PowerShell CmdLets: http://go.microsoft.com/?linkid=9811175&clcid=0x407

By using the "-NumberOfThreads 4" option you could increase the throughput. By using "Add-AzureAccount" and "Select-AzureSubscription" you could switch between different credentials.

Example usage:

Add-AzureAccount
Select-AzureSubscription -SubscriptionName '[NAME OF YOUR SUBSCRIPTION]'

$source = 'https://[STORAGEACCOUNTNAME].blob.core.windows.net/vhds/[VHDNAME].vhd'
$destination = 'f:\[VHDNAME].vhd'

Save-AzureVhd -Source $source -LocalFilePath $destination -NumberOfThreads 4

Upvotes: 4

Jacco Dieleman
Jacco Dieleman

Reputation: 1528

From the Windows Azure Portal you can easily download the VHD. Just navigate to STORAGE and then the storage account in which your virtual disk is created. Select CONTAINERS (at the top), open the container named "vhds". Just click the vhd you want and select DOWNLOAD (at the bottom of the page).

I hope this helps.

Upvotes: 38

Won
Won

Reputation: 1805

I've finally found out an open source explorer for Azure Storage. (despite Cloud Storage Studio is great, but it's commercial version.)

http://azurestorageexplorer.codeplex.com/

It can have multiple credentials and has several functions to manage files (copy, rename, delete, and download)

Once I download vhd on my local machine, I can upload it to another place by using

azure vm disk upload

on Azure powershell.

Upvotes: 6

Gaurav Mantri
Gaurav Mantri

Reputation: 136146

The reason you're getting this error is because the blob is in a private blob container. You could do a few things:

  1. Either make the blob container publicly accessible.
  2. Or create a shared access signature with read permission and use that for downloading the blob.

If you wish to migrate blob to another storage account and you wish to use a tool, may I suggest you use Cloud Storage Studio (http://www.cerebrata.com/Products/CloudStorageStudio). Using this tool you can also download the VHD. Also do take a look at this blog post as well: http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2012/09/26/windows-azure-virtual-hard-disk-blob-storage-cross-account-copy-lease-break-and-management-tool.aspx.

Hope this helps.

Upvotes: 7

Related Questions