Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 813
Won Avatar asked Sep 27 '12 18:09

Won


People also ask

Can I download Azure VM image?

A VHD can't be downloaded from Azure if it's attached to a running VM. If you want to keep the VM running, you can create a snapshot and then download the snapshot.

How do I copy files from one Azure VM to another?

Another method is to copy the files through the RDP protocol . Simply go to your Microsoft Azure portal, select your VM and press the connect button to download an RDP file that you can use to connect to your VM . Now, you have the ability to copy files from your local computer inside the VM over the RDP protocol .


3 Answers

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.

like image 181
Jacco Dieleman Avatar answered Oct 19 '22 12:10

Jacco Dieleman


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.

like image 28
Gaurav Mantri Avatar answered Oct 19 '22 13:10

Gaurav Mantri


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.

like image 6
Won Avatar answered Oct 19 '22 14:10

Won