Optimized Windows Azure IaaS Disk Mobility with Save-AzureVhd

In the most recent Windows Azure PowerShell update we have introduced a new cmdlet called Save-AzureVhd to complement Add-AzureVhd.

Save-AzureVhd provides an optimized download experience where it uses the underlying Page blob APIs to only download written bytes. In other words if you have a 1TB VHD but only have a few GB of data written to it the cmdlet will only download the 2-3GB of data. The cmdlet writes the disks as fixed disks on the local disk so you will of course need the full disk size (1TB in this example) on the local storage location.

Here is a quick example to get you up and running:


# Select correct subscription - ensure CurrentStorageAccount is set!
Select-AzureSubscription mysubscription

# Source VHD Location
$source = "http://mwstorage.blob.core.windows.net/disks/myosdisk.vhd"

# Target VHD Location
Save-AzureVhd -Source $source -LocalFilePath "d:\LocalStorage\myosdisk.vhd"

I’m working on another code sample to download the disks of an entire VM for an offline backup. I’ll post it as soon as it is ready 🙂

Enjoy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s