In the previous part, I introduced the Azure virtual machine scale set (VMSS) feature and discussed some of the deployment options. In this part, I will explain how to manage an existing VMSS implementation.
Profile gravatar of Anil Erduran
Follow me:

Anil Erduran

Anil Erduran is a principal consultant and subject matter expert for Hitachi Data Systems EMEA, based in London, UK. He is also a dual category Microsoft Most Valuable Professional in Cloud and Datacenter Management and Microsoft Azure. Anil can be found on Twitter @anil_erduran.
Profile gravatar of Anil Erduran
Follow me:

Latest posts by Anil Erduran (see all)

Getting the virtual machine ID ^

When it comes to managing virtual machines (VMs) in a VMSS, there are some important differences compared to traditional VM management. The first thing you need to be aware of is that there are separated PowerShell cmdlets that interact with VMs.

Secondly, in order to interact with VMs in a VMSS, you need to know the instance ID of the VM you want to manage.

To figure out the ID for the VMs, you can browse the resources.azure.com portal and extract your Resource Group -> VMSS.

Finding the virtual machines ID in Azure resource explorer

Finding the virtual machines ID in Azure resource explorer

Here, you can easily retrieve the VM ID. You can also get the same information from the Azure Portal Instances section:

Identifying the VM instance ID

Identifying the VM instance ID

Once you have the correct instance ID for a particular VM inside the VMSS, you can start using VMSS-related PowerShell commands. The following cmdlet helps you list the basic VM information:

Retrieving VMSS details with PowerShell

Retrieving VMSS details with PowerShell

As mentioned previously, commands and outputs are different than with traditional Azure PowerShell cmdlets.

Starting and stopping VMs ^

Start and stop operations are also a bit different than with traditional VM implementations. As you may recall, for every single VMSS setup, you need to define a minimum instance count. This setting is quite important because by configuring a minimum instance count, you are forcing Azure to have a minimum X number of VMs available at all times, unless you stop them manually.

This is why Azure starts the minimum number of VMs you configured when you logged in to the Azure portal and started your VMSS instance.

Starting the VMSS

Starting the VMSS

VMSS minimum instance count

VMSS minimum instance count

You can start/stop/restart individual VMs or all VMs in a scale set by using PowerShell cmdlets:

Start/Stop/Restart all VMs in a scale set:

To Start/Stop/Restart an individual VM in a scale set:

Changing the current capacity ^

You can also change the current capacity of your scale set manually without using auto-scale metrics. The following command gives you the current capacity details:

VMSS SKU details

VMSS SKU details

Using the .sku property, you can change the current count to 4:

This will change the “Current number of instances” property to 4 and will fire up two additional VMs for my VMSS configuration.

Changing VMSS SKU settings

Changing VMSS SKU settings

In the next part, we will examine the availability and scalability options in Azure PaaS Services.

Take part in our competition and win $100!

Share
0

Articles in series

Azure availability and scalability

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

CONTACT US

Please ask IT administration questions in the forum. Any other messages are welcome.

Sending
© 4sysops 2006 - 2017

Log in with your credentials

or    

Forgot your details?

Create Account