This post comes after spending two days working with some customers that have started to move all their on-premise infrastructure to IaaS on the Azure cloud.

They have used Azure VMs for hosting their Microsoft Dynamics NAV databases and servers and they have sized the VMs by starting from my suggestion and increasing the size by 2 😀 (“we want to move to Dynamics 365 Business Central on-premise soon, so I don’t want to have problems with resources” was the absurd reason for that decision). What I see always in these cases is that the art of scaling the VMs resources is a mystery for everyone!

One of the main benefits of a cloud-based infrastructure is that you can scale (horizontally or vertically) accordingly to your needs, so why using (and paying for) an enormous Azure machine for NAV or SQL Server when we’re for example in the developing phase and few users are working with the ERP?

I think that everyone in the IT field should work with Azure VMs by scaling them as needed. And scaling a VM in Azure is very simple.

As a sample, I have this test Azure VM for NAV with 4 vcpus and 8 GB of memory.

Standard A4 V2

To reduce the size of the VM (but the same process if for increase the power) click on the Sizemenu to the left in the Virtual Machine blade:

Size

In the Choose a size page, you can see all the available sizing for this VM, you can filter by type, disk and vCPUs (in the following images I’ve decided to see only VMs that has Premium Storage and >= 4vCPUs), then you can select the size where you want to scale and by clicking the Selectbutton the resizing process is performed.

Choose a Size

In few minutes, you have a VM ready to go with the new size. Resizing a VM requires a reboot of the machine, so plan it accordingly.

As always, the best part of this is that you can also perform a resizing via Powershell (and so schedule it for example by running a runbook in Azure Automation).

By using Azure CLI and Powershell, here I’ve declared a Resource Group name variable and a VM name variable. Then I retrieve all the available sizes for my VM:

ASP

1

2

3

4

$resourceGroup="vmeidnav2017"

$vmName="vmeidnav2017"

Get-AzureRmVMSize-ResourceGroupName$resourceGroup-VMName$vmName

This is the output of this command:

Output of the command

Here I want to resize my Azure VM to a smaller size (Standard_A3) and this is the command to use for this task:

ASP

1

2

3

$vm=Get-AzureRmVM-ResourceGroupName$resourceGroup-VMName$vmName

$vm.HardwareProfile.VmSize="Standard_A3"

Update-AzureRmVM-VM$vm-ResourceGroupName$resourceGroup

RequestId

Wait few seconds and the machine is resized:

Resized

Why paying for resources that you’re not using or having poor performances only because you don’t scale up un particular heavy business hours? Remember this for tuning your Microsoft Dynamics NAV or (future) Dynamics 365 Business Central on-premise infrastructure in the cloud.

About the Author:

Stefano Demiliani is a Microsoft Certified Solution Developer (MCSD), MCSA, MCAD, MCTS on Microsoft Dynamics NAV, MCTS on Sharepoint, MCTS on SQL Server, and a long-time expert on other Microsoft-related technologies. Stefano is a Microsoft Most Valuable Professional (MVP) for Business Applications.

Rate This Post

Join our Mailing List!

Join the ESPC mailing list to receive the best, free content from across the SharePoint, Office 365 & Azure community, including our monthly newsletter and the latest conference announcements. You can unsubscribe at any time with one click.

Sign up to receive exclusive content and analysis from the SharePoint, Office 365 & Azure community, as well as the latest conference updates and offers.

ESPC Community Login

ESPC Community Login

Become an ESPC Community Member today to access a wealth of SharePoint, Office 365 and Azure knowledge for free. New content is added daily to the online Resource Centre, across a variety of topics and formats from Microsoft MVP’s and industry experts. .

(All Fields Required)

Name*

FirstLast

Password*

Enter PasswordConfirm Password

Create Username*

Email*

Company*

Country*

Area of Interest

Developer

IT Professional

Business Decision Maker

End User

Mailing List*

As a community member you will receive occasional email updates to help you get the most from your membership e.g. the latest content from the community or conference announcements. You can unsubscribe at any time.