New-AzureVM -ServiceName $serviceName -VMs (( New-AzureVMConfig -Name $debugVMName -InstanceSize Small -ImageName c290a6b031d841e09f2da759bbabe71f__Oracle-Linux-6 | Add-AzureProvisioningConfig -Linux -LinuxUser test -Password "Test123!" | Set-AzureEndpoint -Name "SSH" -LocalPort "22" -PublicPort "22" -Protocol "tcp" ))
$serviceName is a service in affinity group in West US
The commands return error:
New-AzureVM : BadRequest: The location or affinity group East Asia of the storage account where the source image c290a6b031d841e09f2da759bbabe71f__Oracle-Linux-6 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 West US.
But if you check the location of image c290a6b031d841e09f2da759bbabe71f__Oracle-Linux-6, it has multiple locations including West US.