Error by automated provisioning of VM

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




When trying to automate provisioning of the new Virtual machine following error can happen:

This is the powershell command which I have used:

New-AzureQuickVM -Windows -ServiceName $cloudSvcName -Name $vmname -ImageName $image -Password $adminPassword -Location $dclocation

And this is the result:

OperationDescription       OperationId                OperationStatus
--------------------       -----------                ---------------
New-AzureQuickVM - Crea... c70ca33a-33be-4cdd-9331... Succeeded
New-AzureQuickVM : HTTP Status Code: BadRequest - HTTP Error Message: The location or affinity group Southeast Asia specified for source image MSFT__Windows-Server-2012-RC-June2012-en-us-30GB.vhd is invalid. The source image must reside
in same affinity group or location as specified for hosted service East Asia.
Operation ID: 7a2c1e1bc4b24aa1b1af3c3f89a6a1a4
At line:1 char:17
+ New-AzureQuickVM <<<<  -Windows -ServiceName $cloudSvcName -Name $vmname -ImageName $image -Password $adminPassword -Location $dclocation
    + CategoryInfo          : CloseError: (:) [New-AzureQuickVM], Communicatio
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagem

This error indicates that the image “MSFT__Windows-Server-2012-RC-June2012-en-us-30GB.vhd ” cannot be deployed to the data center “East Asia”. Moreover the error indicates that you have selected to deploy the image in “Southeast Asia ”. You will wonder why this happen, because you have selected “East Asia” by setting parameter $dcLocation (in my example), but you set nothing about image location.  This is true, because image location is implicitly chosen, by blob storage location of your VHD.

The storage location is set by PowerShell like:

PS C:\> Set-AzureSubscription -SubscriptionName "MySubscriptionXY01" -CurrentStorageAccount "abcdef"

The data center location of “abcdef” must be the same like location of of the Virtual Machine.And this is hopefully clear why Smile

Posted Jun 30 2012, 04:55 PM by Damir Dobric
Filed under: , , is a .Net Community Blog powered by daenet GmbH.