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

前端 未结 4 2160
后悔当初
后悔当初 2021-02-18 17:44

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 t

相关标签:
4条回答
  • 2021-02-18 18:30

    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.

    0 讨论(0)
  • 2021-02-18 18:34

    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.

    0 讨论(0)
  • 2021-02-18 18:38

    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.

    0 讨论(0)
  • 2021-02-18 18:40

    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
    
    0 讨论(0)
提交回复
热议问题