How to Resize a Virtual Machine in Azure: Troubleshooting not available in the current hardware cluster error
Maxim ?erny
?? Azure ?? DevOps / Big Data / Terraform / Bicep / Powershell / Linux freelancer
Resizing a virtual machine (VM) in Azure is often a straightforward process. Whether you're scaling up for better performance or scaling down to save costs, you can usually perform this operation without shutting down the VM. However, there are exceptions—particularly when Azure needs to reallocate your VM to a different hardware cluster. In such cases, you’ll need to stop the VM first to complete the resize successfully.
Step-by-Step Guide to Resize Your Azure VM
When You Need to Stop the VM
The "not available in the current hardware cluster" Error
If the size you select isn’t supported by the current hardware cluster, you may encounter this error:
"Unable to resize the VM {VmName} because the requested size {RequestedSize} is not available in the current hardware cluster. The available sizes in this cluster are: {ListOfSizes}"
This occurs because Azure cannot reallocate the VM to a different hardware cluster while it’s running. Stopping the VM manually allows Azure to deallocate it and move it to a compatible cluster during the resize.
How to Fix the Issue
Stopping the VM gives Azure the flexibility to reallocate it to a different cluster, resolving the issue.
Additional Tips for Resizing Azure VMs
Conclusion
While resizing Azure VMs is generally seamless and doesn’t require stopping the machine, there are exceptions. If the new VM size requires migration to a different hardware cluster, Azure will prompt you to stop the VM manually. By doing so, you enable Azure to reallocate your VM to a compatible cluster and complete the operation.
Knowing when to stop the VM can save you time and prevent unnecessary frustration. Whether resizing for performance or cost efficiency, these insights will help you manage your Azure VMs with confidence!
About the Author
I'm Max in The Cloud, a seasoned professional with over 20 years of engineering experience and more than 10 years specializing in Azure and DevOps.
I’m also the founder of People in The Cloud, a network of experts dedicated to cloud solutions. If you’re looking to tackle technical debt, train your team, or ensure your cloud engineering is done right, feel free to contact me directly via LinkedIn. Follow me to stay updated with the latest tips and tricks from the world of Azure, Terraform, and DevOps!