Microsoft Azure Virtual Machine Scale set FAQs?


Imagine a situation where your application has variable resource consumption nature which is mostly a case in real world. If you keep constant number of servers / resources you will have to consider higher side of traffic pattern and provision extra resources which will not efficient economically. Such unpredictable nature of applications usage is very much common and needs cost efficient solution. Virtual machine scale set feature provides this ability where in platform can add more resources automatically based on the existing resource consumption. In simple term, if your servers are running for example at 75% CPU utilization, platform can automatically add X number of VMs to sustain the load and promise consistent user experience, as soon as your resource consumption goes down additional virtual machines are removed saving cost of the ownership.

As name indicates, Virtual Machine Scale set feature can create Virtual machines for providing high availability to your application by spawning multiple identical machines instantly. This feature is also used in case your application has big compute requirements like processing big data.

Now let us discuss few frequently asked questions on scale set –

Once I have Scale set defined which can create Virtual machines dynamically, how load distribution happens between them?

Microsoft Azure has integrated load balancer which can help distribute the load.

Are Windows and Linux both types of VMs creation possible using this feature?

Yes, Windows and Linux images along with their extensions can be created using this feature. Extensions are scripts which enables / configure additional features on Virtual machine.

Does this scaling happens automatically?

Yes, VM scale set is a feature integrated with Azure Insights Autoscale which makes this automatic scaling possible.

If I have a Web application with variable resource needs, Can I use Virtual machine scale set feature?

Yes, you can use it for web front ends or services layer. You will have to plan state of application in such case so that during scale out and scale in state is not lost.

Is it necessary to use Azure Resource Manager deployment for creation of Scale set?

Yes, it works with only Azure Resource Manager model, you can create it using Portal UI or thru JSON template or REST APIs, choice is yours. There are quick start templates available here.

Do VM Sale sets work with Azure Availability sets?

Yes. A VM scale set is an implicit availability set with 5 Fault Domains and 5 Update Domains. You don’t need to configure anything explicitly for that.

Can I use my Custom VM Images for Scale set or I am limited to available platform images1 only?

Yes, you can use your Custom images but you can create VMs up to 40, this is because custom images are currently limited to single storage account. If you use platform available images1, you can create up to 100 VMs which can be distributed across multiple storage accounts.

1A platform image in this context is an operating system image from the Azure Marketplace, like Ubuntu 16.04, Windows Server 2012 R2, etc.

Is each VM in the Scale set have public IP associated with it?

A VM scale set is created inside a Virtual Network and individual VMs in the scale set are not allocated public IP addresses. To connect to these VMs or RDP it, you have multiple options like – Use other Azure resources in your Virtual network like load balancers (with public IP) or other VMs outside scale set having public IP.

Can I attach data disk to VMs in Scale set?

As of today, this feature is not available, you cannot have data disk attached. Available options are – 1. Azure files storage (SMB mounted drives) 2. Azure Storage – blob, Tables 3. OS drive 4. Temp Drive which is not backed up by Azure.

Can I install my own software or setup something while VM images are being provisioned in scale set?

Yes, you can install new software on a platform image using a VM Extension. A VM extension is software that runs when a VM is deployed. You can run any code you like at deployment time using a custom script extension.

It is advisable not to have long running script / VM extension which can delay the VM provisioning impacting applications performance. Considering creating custom image if lot of customizations are required for platform images.

What are the available options for login into VMs in Scale set?

Since each individual VM in scale does not have public IP, you cannot RDP it directly, you have following options available –

  1. Connect to VMs using NAT rules: You can create a public IP address, assign it to a load balancer, and define inbound NAT rules which map a port on the IP address to a port on a VM in the VM scale set.
  2. Create standalone VM in same Virtual network/subnet, assign it a public IP, log in to this standalone VM using RDP and then connect to individual VMs in scale set using internal IP addresses within the Virtual network. Such standalone VM is sometimes referred as “jumpbox”

Typically what types of rules can be defined for scaling out and scaling in Scale set?

Below picture shows typical rule available while configuring the scale set –

m-scale-set

So in above example you are configuring Scale set which will have minimum 1 VM and maximum 10 it can go up to. Whenever CPU percentage reaches 75%, 1 new VM is added, as soon as it drops to 25%, 1 VM is removed from scale set.

Hope this helps in gaining basic understanding on Virtual Machine Scale Set.

Happy reading !! Thanks.

 

Advertisements

What is Microsoft Azure DevTest Labs feature all about?


In almost every Project we work, we provision some time like 1-2 weeks’ time for environment (Dev/Test) provisioning where we plan our Project with low Productivity, we buy software licenses if any needed or upgrade existing to new versions, upgrade machine configurations to get ready for another mission. So far this has been acceptable solution and considered to be pre-requisite step no matter how critical is the project from business point of view, this waste, we were allowed to doJ.

Few companies tried to tackle this problem with solutions available in the market such as CloudShare, a Cloud computing company providing ready to use development and testing Labs. However, adoption was not so quite high due to non-alignment of primary IT strategy with their Cloud Computing platform. For e.g. if your Active Directory is not in sync with Dev Labs in CloudShare, you will have to create entire dummy replica of it to mimic it, which is not practical most of the time.

Recently more mature solution have been devised by Microsoft – Azure DevTest Labs, a feature which enables companies to quickly provision development and test environments. This makes more promising solution due to its market adoption where customers are already having major of workload in Microsoft Azure Cloud platform, building Dev, Test, and Prod in same Cloud makes more sense as it just becomes your on premise extended network.

So in a nutshell, we are no more allowed to waste 1-2 weeks’ time, ultimately you are that much close to your market and end customers helping win the business.

So lets us start understanding some basics about the Azure DevTest Labs –

  • “Lab” creation is the first activity, basically “Lab” is outer container or boundary for collection of Virtual machines for development of testing purpose
    • A Lab provides secure boundary so a machine from one lab cannot see other machines in different lab, same way user permissions are organized
    • In real life, a lab could be a Project name of a sub-Project name
    • You can automate lab creation, including custom settings, by creating a Resource Manager template and using it to create identical labs again and again.
    • A lab owner has the access to any resources within the lab. Therefore, they can modify policies, read and write any VMs, change the virtual network, and so on.
    • An Entire Lab can be auto shut downed to save the resource cost when not in use
  • Once you create a Lab, you create multiple “Virtual machines” in it.
    • Each Virtual machine will have a O.S image attached to it.
    • You can limit the number of Virtual machines in a Lab, and also number of Virtual machines per user
    • To save the cost, each machine can be auto started and auto shut downed at specific time of day/week
    • You can use out-of-the-box VM images available or you can create and upload your own Custom VM image
    • A Lab user who uses the VMs, however, he is not allowed to modify any settings
  • Each Virtual machine can have “artifacts”, an artifacts is some configuration or tool which you want to install during VM provisioning so you’re VM will have it ready before first logon.
    • An example of artifacts could be 7-Zip utility, notepad++ software or some specific browser for testing purpose. Picture below shows few samples of artifacts, however, there is long available –

artifacts

  • Sometimes if you have more than one artifacts to be added, you may decide order in which they should be added

Along with above core features, there are very attractive use cases which can be used by companies such as –

  1. Training setups: You don’t have to work with your training vendor to rent a Lab for training purpose which may have some high end configured machines. Organizations outsource entire training programs due to hardware requirement, as they cannot afford to procure such hardware just of the training purpose due capital and operation expenditure involved.

With Azure DevTest Labs, this wait time or costly affairs are not more required, you                can easily configure required training environment in minutes, use it wisely, save                  the cost and complete your training. Once training is over, delete the environment.                That’s it!

  1. VM image snapshot: We all have faced situations wherein, some piece of code or functionality works fine in Dev environment but fails in Test, or works somewhere and fails on some specific machine. Sometimes testers had tough time in reproducing the issues as meanwhile somebody changed some VM settings making it hard to find the root cause.

With Azure DevTest Labs, you can take snapshot of VM image, preserve it for later                  use for reproducing defects which are environment specific. An ability to create same            environment with few clicks improves the DEV-TEST team communication and                      collaboration.

  1. No more follow ups to IT Support guys for adding small features on VMs, with power in your hand, you can select artifacts from the available set, add them and test them. No dependency on other stakeholders, a Lab owner user can perform all such operations and installation happens automatically without manual intervention.

To summarize, Azure DevTest Labs is a great addition to platform, this makes sense whether or not start allowing DevOps culture within your organization. Essentially this feature enables each organization save cost and time achieving their business objectives.