With current market trends of cloud shifting, many of my clients have moved their SQL Servers from on-premise virtual machines to Microsoft Azure Virtual Machines. In this blog, I would explain a situation where my client was not able to find relevant size when he wanted to upsize the VM to a higher tier.
My client was using AlwaysOn Availability Groups feature in Azure virtual machines for production. Due to increased workload, they decided to increase the number of CPU and RAM of this VM by upsizing it to a higher tier. As of now, they have been using D-Series VM and they wanted to now move to G-Series VM. Then the tried upsizing the VM, it was no showing the G Series sizes to upgrade.
When I tried my VM on the same region, I was able to see the size. This means there was something specific to their VM. (As of now G Series is not there in all regions)
I suggested to stop the VM and try again but there was no luck. Later I realized that since they are using AlwaysOn, they have created an availability set in for two Azure VMs (primary and secondary). As soon as we stopped both the VMs, we were able to upsize the VM.
To summarize, below are the steps if you see that VM size is not available during upsize are as follows
- Make sure the region, where VM was deployed, supports that VM size.
- If a region has that VM size, then check if VM is part of availability set else contact Microsoft support to know whether your subscription allows it.
- If VM is part of an availability set, then shut down all VMs in that availability set.
You should be able to see all the VM sizes, which were not visible earlier.
One interesting error which my client received after upgrade and start of the other VM. (Note that error is for sqlserver-1 and we upgraded sqlserver-0)
Failed to start virtual machine ‘sqlserver-1’. Error: Unable to perform Operation ‘Start VM’ on the VM because the requested size Standard_DS13_v2 is not available in the cluster where the availability set is currently allocated. The available sizes are: Standard_G1,Standard_G2,Standard_G3,Standard_G4,Standard_G5,Standard_GS1,Standard_GS2,Standard_GS3,Standard_GS4,Standard_GS4-8,Standard_GS4-4,Standard_GS5,Standard_GS5-16,Standard_GS5-8,Standard_L4s,Standard_L8s,Standard_L16s,Standard_L32s. Read more on VM resizing strategy.
This means that when the VMs are deployed in an Availability Set, all VMs should either be of the same size or same family. Different family size VM is not possible in an Availability Set. That’s why we received above error.
Let me know, via comments, if you have found something else other then above.
Reference: Pinal Dave (https://blog.sqlauthority.com)