Resizing a VM in an Availability Set After Allocation Failure
Your company has three virtual machines (VMs) that are included in an availability set. You try to resize one of the VMs, which returns an allocation failure message. It is imperative that the VM is resized. Which of the following actions should you take?
Community Insight
The question tests whether you recognize that an allocation failure means the availability set's cluster lacks capacity for the new size, and the trap is picking 'stop one VM,' which only works for same-size-family resizes without a capacity error.
When a resize of a virtual machine inside an availability set returns an allocation failure, Azure cannot place the VM on the cluster hardware the set requires, so every VM in the set must be deallocated first. This page establishes that stopping all three VMs, resizing the target VM, then restarting the set is the required AZ-104 fix (option C).
Most learners pick A (stop only the VM being resized). That works when the resize stays inside the same VM size family and the cluster has spare capacity, but the question explicitly states an allocation failure occurred, so deallocating a single member is not sufficient.
Community Discussion (82 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
All members of an availability set must run on hardware that supports the set's fault and update domain model, so they effectively share a cluster and a VM size family. An allocation failure means that cluster cannot host the target size, and the only supported remedy is to deallocate the entire set, let Azure reallocate it, resize, and then restart. Microsoft's troubleshooting guide for "Error when resizing an existing VM" states that if the VM is part of an availability set, all VMs in that set must be stopped before any of them can change size. Deallocating all three releases the underlying hardware so the resize can be satisfied. That makes C the correct choice.Why the Other Options Are Wrong
Option A describes the normal, seamless case, but the scenario has already reported an allocation failure, so stopping one member does not free enough of the set's hardware for the new size. Option B is an invented threshold: Azure has no rule that stopping exactly two VMs of three is enough, and it leaves one member consuming cluster capacity. Option D abandons the availability set entirely, sacrificing update-domain and fault-domain protection, and it does not by itself solve the underlying capacity problem the allocation error reports. Neither B nor D is a documented remediation step for this error.Community Comment Notes
Several learners confirmed option C, with Sama5100 citing the official guide: "In the event of an allocation failure, we should stop all three VMs" and linking Microsoft's troubleshooting article. drainuzzo reinforced the wording, noting that since the question reported "You try to resize one of VMs, which returns an allocation failure message," "so you can only stop all the 3 vms." Others tested lab scenarios: MrJR reported being able to resize without stopping anything, and FritsB succeeded after stopping only VM1, but CommanderBigMac and wondinv both pointed out that this only works when the new size is on the same hardware, which the allocation error rules out. The vote-leaning comments therefore agree on C once the allocation failure condition is taken seriously.Official Reference
Exam Strategy
Key off the error text: whenever a question mentions an allocation failure or a change of VM size family for a VM in an availability set, the answer is to stop every VM in that set. Only assume an in-place, single-VM resize when the question gives no capacity or hardware-change indication.
Frequently Asked Questions
Why can't I resize just one VM in an availability set after an allocation failure?
All availability set members must sit on compatible cluster hardware. When that cluster has no capacity for the target size, Azure can only reallocate the whole set, which requires deallocating every VM in it.
Does resizing an availability set VM always require stopping all the other VMs?
No. A resize within the same VM size family usually succeeds while the other VMs keep running. Only an allocation failure pointing to a hardware or capacity change forces you to stop the entire set.
Related Analysis
Practice All AZ-104 Questions
Access 100 questions with complete answers and detailed explanations.
View Full AZ-104 Practice Test →