



#$snapshotConfig = New-AzSnapshotConfig -SourceUri $.Id -Location $location -CreateOption copy #For data disks use the below command where is the ID of the data disk $snapshotConfig = New-AzSnapshotConfig –SourceUri $vmContext. #Set the location of virtual machine for snapshot creation $vmContext = Get-AzVM –ResourceGroupName $VMResourceGroupName –Name $vmName #Set virtual machine context where snapshots will be taken $archiveVHDFileName = "blockblobarchive.vhd " $pageblobVHDFileName = "pageblobsnapshot.vhd " #Provide the name of the VHD files for blob storage #Name of the storage container where the downloaded snapshot will be stored #Provide storage account name where you want to copy the snapshot. #Provide the name of the virtual machine where the snapshot will be made #Provide the name of your resource group where the blobs will be stored #Provide the name of your resource group where snapshot will be created This feature is currently in a limited public preview that you need to apply for and the limitations are not clearly documented at this point.

Therefore this process is not suitable for virtual machine disks larger than the maximum block blob size of 4.75 TiB.Īlternative option: I was aware that there will soon be a feature of Azure Backup that will allow you to backup Azure VMs directly to archive tier storage. In this case, the customer wanted to proceed with archiving the full disks so with the challenge set, off I went to work out and automate the process.īlock blobs have a maximum size of 4.75 TiB The other downside to storing large VHD files is that the rehydration costs could work out quite expensive if you need to rehydrate an entire disk from archive storage rather than just the individual files that you require. There is an immediate challenge with this as the access tier feature of storage accounts (hot, cool, archive) only supports block blobs but not page blobs which is what VHDs use for random access storage. Of course the individual files and folders could just be uploaded and stored to a storage account as blob objects but the customer was ideally looking to dump the entire disks as VHD files into archive storage so that they could be restored in future if ever required. This would cost less than €1 per TB per month, quite a difference! The query was could the archive tier of a general purpose v2 storage account be used? I had an interesting request this week with a customer who had some decommissioned Azure virtual machines but for compliance reasons needed to retain the data on the disks for 7 years.Įven on Standard HDD storage a 1TB managed disk might cost around €35 per month which adds up to quite a lot over 7 years.
