The location or affinity group East US of the storage account is not in the same location

The following error message "The location or affinity group East US of the storage account where the source image myAzureImage resides is not in the same location" occur when you are trying to provision Azure VM from your own image. VM Image that you trying to user, in this case myAzureImage, should be located in the store account of the location where you trying to provision your new VM.

In order to metigate this error you have two options

Option 1: You need to move your image to another storage location using the following PowerShell Command as outlined in this post Moving Image to another location

Option 2: You can simply create a new VM Template with desired new location.

Option 2 will cost you less in time and actual dollars that will cost you to pay for traffic of moving large images over the wire.

Below is a detailed Error message that I got while trying to provision VMs into Region that was different from my base Image location

New-AzureVM : BadRequest: The location or affinity group East US of the storage account where the source image myAzureImage resides is not in the same location or affinity group as the specified cloud service.
The source image must reside in a storage account that has the same affinity group or location as the cloud service East Asia.
At line:1 char:480
+ New-AzureVMConfig -Name "MyVM" -InstanceSize "Medium" -ImageName "MyVM ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureVM], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs.NewAzureVMCommand

Featured pages

Services

Windows Azure has several services available for use when you first sign up with Azure. Some of the…

PowerShell

Azure PowerShell scripts are integral part of Microsoft Azure environment. It is designed to help A…

Errors

Azure Cloud Services are very information when it comes to producing error messages. Some of the co…

Pricing

Windows Azure has difference services and pricing normally calculated via Online Azure Pricing Calc…