AZ-104 Question 144
Single answerYou are an Azure Administrator managing an application running on a virtual machine that is part of an availability set. You attempt to scale the VM to a larger size, but the operation fails because the new size is unavailable on the current hardware cluster. What is the recommended procedure to successfully resize the VM?
- A
Stop and deallocate the VM, then resize it to the new size and start it again
- B
Resize the VM directly in the portal without stopping it
- C
Create a snapshot of the VM, convert it to a larger size offline, then restore
- D
Delete the VM while keeping the disk, and create a new VM using the same disk but with the desired size
Show answer and explanation
Correct answer: A
Explanation
When a VM is in an availability set, the desired size might not be available on the same hardware cluster. Stopping and deallocating the VM allows Azure to move it to suitable hardware, making the resize possible with minimal downtime.
- A. Correct.
Stopping and deallocating the VM allows Azure to move the VM to new hardware that supports the desired size, enabling a successful resize
- B. Incorrect.
Resizing live without deallocation only works if the new size is available on the current hardware cluster, which is not guaranteed in availability sets
- C. Incorrect.
Creating a snapshot does not solve the underlying hardware availability issue; resizing must still occur within the supported cluster
- D. Incorrect.
While recreating the VM using the original disk can work, it is not the recommended procedure because simply deallocating and resizing is more straightforward and less error-prone