Skip to content

New-AzureVM returns location error when creating VM from Linux image in gallery #60

@lizzha

Description

@lizzha
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions