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

前端 未结 4 2185
后悔当初
后悔当初 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: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
    

提交回复
热议问题