Get Azure virtual machine location

The virtual machine location is the Azure region the virtual machine will be created in. The location of the virtual machine also determines the location requirement of the underlying storage, and if specified the virtual network. The virtual network and storage account must reside in the same location as the virtual machine.

The service management API enforces this requirement as well. Attempting to create a virtual machine with the storage account or the virtual network in a remote region will result in an error.

You can use Get-AzureLocation PowerShell cmdlet to identify the available locations and their capabilities.

Get Azure location details
Get Azure location details

You can pipe the output to cmdlet to get only location names:

Get only names for azure locations
Get only names for azure locations

Do note that when new sizes are introduced, they might not
be available immediately in all regions. You can view VirtualMachineRoleSizes and WebWorkerRoleSizes for available role sizes for a particular location. The virtual machine’s location can only be set at creation time and cannot be changed
later.

When creating a virtual machine using the Azure PowerShell cmdlets, use the –Location
parameter of the New-AzureQuickVM or New-AzureVM cmdlets.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s