If you want to download your Azure VM or the storage locally, then you can follow a few techniques.
One is you can use PowerShell to initiate the DB copy command or else you can use Azure Storage Explorer tool. First we will start with the PowerShell.
First go into Storage account and copy the VHD location
Login to your azure account through PowerShell. For that first you can use below mentioned command and give the credentials.
PS C:\Windows\system32> Login-AzureRmAccount
Once you pass the correct credentials you will be able to see the below details. That means you are successfully logged in.
But if you have more subscription under one account you can list down them by typing
PS C:\Windows\system32> Get-AzureRmSubscription
You will get the subscription details and the account state like below,
If you want to select the desired subscription, use below command
PS C:\Windows\system32> Select-AzureRmSubscription -SubscriptionId <Subscription ID>
Next you need to shut down the VM and for that you can run below command. In my case “SVR01” is the VM.
PS C:\Windows\system32> Stop-AzureRmVM -ResourceGroupName SVR -Name SVR01
Once the server shutdown, you will see the summary as below
Now you can initiate the VHD Copy command by pasting the VHD URL which you have copied earlier.
PS C:\Windows\system32> Save-AzureRmVhd -ResourceGroupName SVR -SourceUri https://svrdssss655.blob.core.windows.net/vhds/SVR0120170329155733.vhd -LocalFilePath D:\AzureVHD\SVR01.vhd
Once this completed you will be able to see your VHD in given location
Now you can attach that into your Hyper-V console or mapped as a hard drive into your local environment.
Post a Comment