How can I download azure vhd with powershell to local machine?
I read the document, but I can't find the blob url like "https://XXX.blob.core.windows.net/vhds/XXX.vhd"
Anybody know that?
Thanks
How can I download azure vhd with powershell to local machine?
I read the document, but I can't find the blob url like "https://XXX.blob.core.windows.net/vhds/XXX.vhd"
Anybody know that?
Thanks
You can use Save-AzureVhd cmdlet to download the vhd file to local machine.
The Save-AzureVhd cmdlet enables download of .vhd images from a blob where they are stored to a file. It has parameters to configure the download process by specifying the number of downloader threads that are used or overwriting the file which already exists in the specified file path.
Save-AzureVhd does not do any VHD format conversion and the blob is downloaded as it is.
Example PowerShell cmdlets:
Save-AzureVhd -Source "http://YourStorageaccountname.blob.core.windows.net/yourContainerName/win7baseimage.vhd" -LocalFilePath "C:\vhd\Win7Image.vhd"
To get the exact URL, Login to Azure Portal, Select Storage Account and the vhd file, then copy the path.
You can also use Azure Storage Explorer to download the vhd file easily.
https://storage-account-name.blob.core.windows.net/container-name/vhd-name.vhd
You can also find the URL in Azure Portal. Open your storage account, go into the container and click the VHD you want. You will see "URL" in "Blob properties" blade.
Try this.
Download, install, login and then browse to your container, select your .vhd and click download.
According to your description, your VM uses managed disk not unmanaged disk. So, you could not find the VHD file in storage account. More information about managed disk please refer to this link.
If you want to download the VHD in managed disk, you should copy it to a storage account first.
Then, you could use
Save-AzureVhd
or Azcopy to download the VHD to your local.Please refer to the similar question.