Change Size and Tier of Azure Virtual Machine (VM) using PowerShell Set-AzureVMSize InstanceSize Valid Strings

I was creating a PowerShell script to Scale Virtual Machines, but I couldn’t find a single place with the valid InstanceSize Strings. I was specially interested in being able to change the VM Tier (Basic / Standard). So I came with this list, after executing Set-AzureVMSize with wrong parameters :P

Here’s the list with the valid inputs (at 12 November 2014):

  • ExtraSmall
  • Small
  • Medium
  • Large
  • ExtraLarge
  • A5
  • A6
  • A7
  • A8
  • A9
  • Basic_A0
  • Basic_A1
  • Basic_A2
  • Basic_A3
  • Basic_A4
  • Standard_D1
  • Standard_D2
  • Standard_D3
  • Standard_D4
  • Standard_D11
  • Standard_D12
  • Standard_D13
  • Standard_D14

Equivalency beetween new and old Naming:

  • ExtraSmall => Standard A0
  • Small => Standard A1
  • Medium => Standard A2
  • Large => Standard A3
  • ExtraLarge => Standard A4

If you want to scale to a Standard A3, you can use:

Get-AzureVM -ServiceName $vmName -Name $vmName | Set-AzureVMSize –InstanceSize “Large” | Update-AzureVM

As you can see, the InstanceSize string is used also to change the VM Tier (Basic or Standard). If we want to switch our Stanard A3 to a Basic A0, we can use:

Get-AzureVM -ServiceName $vmName -Name $vmName | Set-AzureVMSize –InstanceSize “Basic_A0” | Update-AzureVM

The InstanceSize string is a bit messy, specially for the most used instances (Extra Small, Small, etc). I assume that this “messiness” if to provide backward compatibility

Advertisements

One thought on “Change Size and Tier of Azure Virtual Machine (VM) using PowerShell Set-AzureVMSize InstanceSize Valid Strings

  1. Pingback: Getting more out of Azure IaaS using OMS

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