Blob migration between Azure datacenters

Hey folks,

Functionality in Azure Germany is getting more and more and the German cloud is supposed to go live within the second half of 2016. I am one of the lucky testers in private preview and today I want to show you if and how you can achieve a migration of your storage blobs from the Azure cloud worldwide to Azure Germany.

Prerequisites and limitations

First thing you have to know is that Azure Germany will be a standalone Azure environment with its own endpoints, suffixes and so on; just similar to AzureUSGovernment or AzureChinaCloud. So in order to be able to manage your Azure Germany subscription via PowerShell you firstly need to add a new Azure environment using the add-azureEnvironment cmdlet. As Azure Germany is in private preview and all information about it still is confidential, I’m not allowed to give you insights in configuration steps that are not obvious. As soon as Azure Germany goes live I will provide further information you need.

Edit 06/10/2016: With Azure-Module 1.4.0 from May, 5th 2016 support for German national cloud (AzureGermanCloud) was added.

AzureGermanCloud

You can list all environments in your PowerShell session by running the get-AzureEnvironment cmdlet. After you have added the new Azure Germany environment to your session your output will look like this:

01_GetAzureEnvironment

I’ve named the new environment AzureGermany. After adding the environment I’ve labeled my test subscription and configured it for certificate authentication using the set-azureSubscription cmdlet.

Listing both of my test subscriptions with the get-azureSubscription cmdlet delivers the following output:

02_GetAzureSubscription

Azure Pass is my test subscription’s label in Azure cloud, DoLabsGermany the subscription`s label in Azure Germany.

Now the DoLabsGermany subscription is nothing else than a second Azure subscription which can be used as target subscription for the following steps.

Migration paths

One of the goals to be achieved with Azure Germany is data security. German companies  still are quite reserved about data being stored outside of the own datacenters and  particularly if data is stored outside of Germany or, even worse, outside of the European Union. That’s why I think that there won’t be an “easy” migration path for your resources between T-Systems datacenters for Azure Germany and Microsoft datacenters elsewhere in the world. So for our customers who have already started using cloud resources in Azure datacenters  we have to plan how these Contents can be migrated to or rebuilt manually in Azure Germany.

As I have mentioned before, my Azure Germany subscription is just a second Azure subscription and that’s what makes a blob migration possible.

Why blob migration?

Azure supports several types of Binary Large OBjects (BLOBs) for different workloads to be stored. One type of these are page blobs. Page blobs are used for random read and write operations what makes this type of blob the standard for every VMs VHD files (further information can be found in Microsoft’s MSDN documentation).

05_blobs

Blobs can be copied between Storage Accounts using PowerShell or an Azure Storage Explorer.

Now, what does a VM consist of? Besides one or more VHD file(s) which contain(s) the VM’s operating system and data, the VM has a configuration which can be exported in XML format. So copying blobs from one storage account to another one can be a kind of offline VM Migration if you keep in mind that you need to export a VM’s config as well. What you need to do in particular is:

  1. Export your source VM using the Export-AzureVM cmdlet. This will generate an XML-file containing your VMs configuration information.
  2. Define your source subscription and storage container
  3. Define your target subscription and storage container
  4. Copy your source container with all of ist blobs (containing the source VMs VHD file(s)) to your target Container. I’ve used a PowerShell script to perform that step.
  5. Add the Azure disk in ASM using the Add-AzureDisk cmdlet on your target subscription
  6. Import your VM config and change the OS disk Name referring to the VHD you configured in step 5
  7. Create a new VM based on the import in your target subscription
Cost?

You need to keep in mind that data transfers into Azure datacenters (inbound data transfers) are free at the time of writing this article but that you are charged for outbound data transfers, e.g. data that are copied out of the Azure datacenter. For 1TB that you copy out of an Azure datacenter in zone 1 (US West, US East, US North Central, US South Central, US East 2, US Central, Europe West, Europe North) you have to pay about 75 EUR or 89 USD. You can find more information in Azure Pricing Details.

Having no chance to use GRS or RA-GRS between Azure and Azure Germany, the migration process I’ve illustrated above is the only chance you have by now – knowing about the disadvantage of being billed for traffic.

In one of my next blog posts I’m going to show you how to publish files with a storage account in Azure. In the meantime I will finish the PowerShell script I have used to copy my blobs from Amsterdam to Frankfurt referring to both my Azure and my Azure Germany subscriptions. I’m going to publish parts of that script in one of my next blog posts.

If you have questions to the migration process or the steps I’ve explained before, feel free to comment below or to contact me via Twitter.

Thanks for reading and stay tuned,
Tom

Author: Tom Janetscheck

Cloud Security Enthusiast | Security Advocate

2 thoughts on “Blob migration between Azure datacenters”

Leave a Reply

Please log in using one of these methods to post your comment:

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 )

Connecting to %s

%d bloggers like this: