Wednesday, August 31, 2016

Azure Site Recovery - Random Field Notes

Just some notes on random knowledge I picked up that I did not see on official Microsoft documentation.


  • Azure Resource Manager model (ARM)
  • VMware to Azure (and back)
  • vCenter and vSphere 5.5

Field Notes:
  • Make sure all protected VMs have .NET Framework 3.5.1 installed, as it is required by Mobility Service. Mobility Service push install will fail with cryptic errors if this is not met,
  • Make sure you patch your if you have vSphere (ESXi) 5.0 to 5.5 make sure it is patched to the levels - for more information (
    • ESXi 5.5, Patch Release ESXi550-201410001
    • ESXi 5.1 Update 2
    • ESXi 5.0 Patch Release ESXi500-201401001

Regarding the VMware patch, it is very important as your entire VMware farm (yes, every hosts in your farm!) will go into purple screen of death (PSOD) randomly when installing your Configuration Server or when protecting (replicating) VMs into ASR.

Azure Traffic Manager - CNAME Flattening

Scenario: You have moved some VMs into the cloud, where they serve your website. You have several VMs which are load balanced within one Azure region, and another bunch of identical VMs in another Azure region for high availability reasons. You deployed an Azure Traffic Manager to load balance between both Azure regions. Your Azure Traffic Manager URL is  and your website's domain is

Issue: When you try to create the CNAME "" record for "", your DNS provider will reject it, saying that it violates RFC1912 - which states that:

  • A CNAME record is not allowed to coexist with any other data,
  • If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

"" type of record is commonly known as (all terms are interchangeable):

  • Root URL
  • Apex URL
  • Naked URL

The alternative would be to use "" instead and but your company have probably invested a lot of money on SEO to ensure that "" shows up high in search ranking results.

Resolution: At the moment, CloudFlare seems to be your best bet. They introduced "CNAME flattening" back in March 2014 which allows exactly the scenario we need.

Read more about CNAME Flattening here:

I've tested it with Azure Traffic Manager and it works perfectly.

Tuesday, August 09, 2016

Error Creating Cross Subscription VNet-to-VNet Connection on Azure Resource Manager Using PowerShell

So you are trying to create a VNet to VNet connection across subscriptions in Azure Resource Manager. The official documentation states that this cannot done by portal, and only PowerShell is supported:

When you run the final piece of code to create the connection:

$vnet1gw = New-Object Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway
$vnet1gw.Name = "VNet1GW"
$vnet1gw.Id   = "/subscriptions/b636ca99-6f88-4df4-a7c3-2f8dc4545509/resourceGroups/TestRG1/providers/Microsoft.Network/virtualNetworkGateways/VNet1GW "
New-AzureRmVirtualNetworkGatewayConnection -Name $Connection51 -ResourceGroupName $RG5 -VirtualNetworkGateway1 $vnet5gw -VirtualNetworkGateway2 $vnet1gw -Location $Location5 -ConnectionType Vnet2Vnet -SharedKey 'AzureA1b2C3'

You get the following error message:

UInt64 -> Nullable`1
System.UInt64 -> System.Nullable`1[[System.Int64, mscorlib .....

I was running Azure PowerShell 1.6.0 at the time.

Fix: Upgrade to Azure PowerShell 2.0.0 (download here).

To check your Azure PowerShell version, run the following script:

(Get-Module -ListAvailable | Where-Object{ $_.Name -eq 'Azure' }) `
| Select Version, Name, Author, PowerShellVersion  | Format-List;