Azure 托管磁盘。访问底层 blob?

Azure Managed Disks. Access to underlying blob?

是否可以访问 Azure 托管磁盘中的 blob?如果说,我需要将它复制到另一个存储帐户(常规存储帐户)。由于托管存储目前仅支持 LRS。

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.

更新:

您可以使用以下 cmdlet 将托管磁盘复制到您的私人存储帐户。

$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'

您无法复制到常规存储帐户,但您可以创建它的副本到任何您想要的位置。假设磁盘位于“eastus”,而您想要一份位于“brazilsouth[=27”的副本=]"

获取磁盘:

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

将配置复制到另一个位置:

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

创建快照:

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

大功告成!这样您就可以在另一个数据中心位置保留一个辅助副本。