1

Is there any way I can resize my existing VM without rebooting it or is it always like stopping the VM and then reboot?

As far as my understanding is I can change the size of the VM without rebooting it. Please guide me on this as I don't want any problem in VM while resizing.

Thank you.

Anshu
  • 69
  • 2
  • 18

3 Answers3

2

From the docs:

If the virtual machine is currently running, changing its size will cause it to be restarted. Stopping the virtual machine may reveal additional sizes.

Changing the VM size will cause the VM to restart.

Also worth nothing: for some sizes to be available to you (usually when resizing the VM from one generation to another), you'll need to stop the VM before attempting to resize.


Documentation Link: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/resize-vm

galdin
  • 12,411
  • 7
  • 56
  • 71
  • It's Very strange that Azure doesn't have such provision. Resize without reboot would help facilitate auto-resizing by script based on load triggers. It should be smooth and dynamic, without impact on our users. – Anshu Jun 23 '21 at 07:02
  • 1
    @Anshu if you're trying to respond to traffic, consider scaling out rather than scaling up. VM sizes are usually chosen based on the workloads, not traffic. – galdin Jun 23 '21 at 07:52
  • I agree with you @galdin I could have used workloads instead of traffic but in that case, also we need downtime to incorporate those VM size changes there should be some mechanism where this process should run in the background. – Anshu Jun 23 '21 at 09:50
  • 1
    @Anshu, you are describing a scale up design with resizing VMs. With a scale out design you don't resize the VMs, you simply add more VMs to your host pool to meet demand. But a scale out scenario requires your application to be able to load balance between multiple hosts. It would be really great to be able to scale up a VM without a restart, but I do think that's a rather complex process to get the OS level components to properly handle that resizing dynamically. – skinneejoe Apr 21 '22 at 20:53
1

If possible, it's good to have redundancy with respect to the update and fault domains in Azure. This will allow for better availability in general and allow you to resize/reboot your VMs in a manner that keeps at least one machine up.

Azure Availability sets, Fault Domains, and Update Domains

https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview

kolb2055
  • 11
  • 2
0

no we can't adjust azure vm size without restarting vm.

Note microsoft learn :

If the virtual machine is currently running, changing its size will cause it to restart.

If your VM is still running and you don't see the size you want in the list, stopping the virtual machine may reveal more sizes.