1

Would it be possible to access the blob in Azure managed disks? If say ,I needed to copy it to another storage account(regular storage account). Since managed storage only support LRS at the moment.

Shui shengbao
  • 18,746
  • 3
  • 27
  • 45
nwarriorch
  • 337
  • 6
  • 16

2 Answers2

1

If say ,I needed to copy it to another storage account(regular storage account).

You should understand the difference between managed disks and unmanaged disks. With unmanaged disks, you had to create storage accounts to hold the disks (VHD files) for your Azure VMs. When scaling up, you had to make sure you created additional storage accounts so you didn’t exceed the IOPS limit for storage with any of your disks. With Managed Disks handling storage, you are no longer limited by the storage account limits (such as 20,000 IOPS / account). You also no longer have to copy your custom images (VHD files) to multiple storage accounts. You can manage them in a central location – one storage account per Azure region – and use them to create hundreds of VMs in a subscription. More information please refer to this link.

Update:

You could copy managed disk to your private storage account by using the following cmdlets.

$sas = Grant-AzureRmDiskAccess -ResourceGroupName shui -DiskName shuitest -DurationInSecond 3600 -Access Read 
$destContext = New-AzureStorageContext –StorageAccountName contosostorageav1 -StorageAccountKey 'YourStorageAccountKey' 
Start-AzureStorageBlobCopy -AbsoluteUri $sas.AccessSAS -DestContainer 'vhds' -DestContext $destContext -DestBlob 'MyDestinationBlobName.vhd'
Shui shengbao
  • 18,746
  • 3
  • 27
  • 45
0

You can't copy to a regular storage account, but you can create copies of it to any location you want. Let's suppose the disk is in "eastus" and you want a copy in "brazilsouth"

Get disk:

$disk = Get-AzureRmDisk -ResourceGroupName $rgName -DiskName $diskName

Make a copy config to another location:

$location = "brazilsouth"
$snapshot =  New-AzureRmSnapshotConfig -SourceUri $disk.Id -CreateOption Copy -Location $location

Create a snapshot:

New-AzureRmSnapshot -Snapshot $snapshot -SnapshotName $newDiskName -ResourceGroupName $rgName

All done! This way you can keep a secondary copy in another datacenter location.

Bruno Faria
  • 5,219
  • 3
  • 24
  • 27