Courseiva
Deploy and Manage Azure ComputeeasyMultiple ChoiceObjective-mapped

AZ-104 Deploy and Manage Azure Compute Practice Question

You need to resize a VM to a larger size, but Azure says the target size is not available while the VM is running. What should you do first?

⚠ Common exam trap

It's easy for candidates to think they must delete and recreate the VM or perform complex workarounds, when the simple and correct first step is to deallocate the VM to free it from its current cluster constraint.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Deallocate the VM, then retry the resize.

When a VM is running, Azure may not have the target VM size available in the cluster hosting the VM. Deallocating the VM releases the underlying hardware resources and removes the VM from its current cluster, allowing Azure to select a new cluster that supports the desired size. After deallocation, the resize operation can succeed because the VM is no longer pinned to a specific host or cluster.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Delete the VM and recreate it from the image.

    Why it's wrong here

    Deleting the VM and recreating it from the image is overly destructive and does not directly solve the specific capacity error you are encountering. During recreation, you would specify the new size, and Azure would place it on suitable hardware, but the simpler deallocation-and-resize approach achieves the same result without losing the VM's current configuration, customizations, and any in-place data. Recreating from image also risks data loss if not properly backed up, and it is a last resort best avoided when a straightforward deallocation is available.

    When this WOULD be correct

    If the VM's operating system or configuration is corrupted beyond repair, or if you need to migrate to a different VM series that requires a new image (e.g., moving from a generation 1 to generation 2 VM), deleting and recreating from an image would be appropriate.

  • Deallocate the VM, then retry the resize.

    Why this is correct

    Deallocating the VM releases it from its current host cluster, which is the standard Azure fix for a resize failure caused by insufficient capacity on the existing hardware. Once deallocated, Azure can place the VM on a different cluster that supports the target VM size, so you can then retry the resize operation successfully. This preserves all disks, networking, and configuration, making it the least disruptive correct action.

  • Attach a new data disk first.

    Why it's wrong here

    Attaching a new data disk is a storage operation that adds a managed disk to the VM; it has no effect on the VM's compute allocation or its current host placement. The error message indicates the target VM size is not available on the existing host, which depends purely on the hardware's CPU and memory capacity, not on the number or size of disks. Therefore, adding a disk will not make the target size become available and is an unnecessary action that consumes time but does not resolve the root cause.

    When this WOULD be correct

    When the question asks how to increase storage capacity for an existing VM without downtime, attaching a new data disk is the correct answer.

  • Create an availability set for the VM.

    Why it's wrong here

    An availability set is a logical grouping for high availability, placing VMs across fault and update domains to protect against hardware failures, not to alter compute capacity. Creating or adding the VM to an availability set does not influence which host clusters can accommodate a larger VM size, so it will not resolve the resize error. Moreover, adding a VM to an availability set typically requires the VM to be recreated anyway, which is even more disruptive without addressing the underlying capacity issue.

    When this WOULD be correct

    This option would be correct if the question asked: 'You need to ensure that two VMs are in separate fault domains and update domains for high availability. What should you do?'

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.

Deallocate the VM, then retry the resize.Correct answer

Why this is correct

Deallocating the VM releases it from its current host cluster, which is the standard Azure fix for a resize failure caused by insufficient capacity on the existing hardware. Once deallocated, Azure can place the VM on a different cluster that supports the target VM size, so you can then retry the resize operation successfully. This preserves all disks, networking, and configuration, making it the least disruptive correct action.

Delete the VM and recreate it from the image.Wrong answer — click to see why

Why this is wrong here

Deleting and recreating a VM from an image is unnecessary and disruptive; Azure allows resizing a VM after deallocation, which releases the current hardware reservation and enables selection of a different size in the same or different cluster.

★ When this WOULD be the correct answer

If the VM's operating system or configuration is corrupted beyond repair, or if you need to migrate to a different VM series that requires a new image (e.g., moving from a generation 1 to generation 2 VM), deleting and recreating from an image would be appropriate.

Why candidates choose this

Candidates may think that the only way to change VM size is to start fresh, not realizing that deallocation temporarily frees the VM from its host, allowing size changes without data loss.

Attach a new data disk first.Wrong answer — click to see why

Why this is wrong here

Attaching a new data disk does not resolve the unavailability of the target VM size in the current cluster; resizing requires deallocation to move the VM to a different cluster where the size is available.

★ When this WOULD be the correct answer

When the question asks how to increase storage capacity for an existing VM without downtime, attaching a new data disk is the correct answer.

Why candidates choose this

Candidates may think adding resources like a disk could enable the resize, confusing storage expansion with compute resizing.

Create an availability set for the VM.Wrong answer — click to see why

Why this is wrong here

Creating an availability set does not affect the availability of VM sizes for resizing; it only provides high availability for VMs within the set. The issue is that the target size is not available while the VM is running, which requires deallocation first.

★ When this WOULD be the correct answer

This option would be correct if the question asked: 'You need to ensure that two VMs are in separate fault domains and update domains for high availability. What should you do?'

Why candidates choose this

Candidates may think that adding the VM to an availability set somehow unlocks more size options or that it is a prerequisite for resizing, confusing high availability features with compute resource availability.

Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.