AZ-104 Deploy and Manage Azure Compute Practice Question
A reporting server must be resized from 4 vCPU to 8 vCPU for a four-hour batch window. The VM name, NIC, private IP, and attached managed disks must stay the same, and the team accepts a brief outage during the change. Which two actions should you choose? Select two.
⚠ Common exam trap
Many candidates think resizing a VM can be done while it is running (hot resize) for all sizes, but Azure only supports hot resize for certain VM series; for most size changes, deallocation is required, and the question explicitly states a brief outage is acceptable, making deallocation the correct approach.
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 before changing its size.
Deallocating the VM (stopping it in the Azure portal) releases the underlying hardware reservation, which is required before changing the VM size to a different SKU. This ensures the VM can be resized to a supported size without conflicts, and the brief outage is acceptable as stated in the scenario.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Deallocate the VM before changing its size.
Why this is correct
Deallocating the VM releases the underlying compute host while preserving the managed OS and data disks, the NIC, and the VM's resource ID. This state allows Azure to reallocate the VM to a different cluster that has capacity for an 8-vCPU SKU, which would otherwise be impossible if the current host does not support the larger size. It also halts compute billing during the operation, though disk storage charges continue, making it a standard prerequisite for most size changes.
- ✓
Resize the VM to a larger supported size.
Why this is correct
Resizing to a larger supported SKU (for example, from Standard_D4s_v3 to Standard_D8s_v3) is the actual action that increases vCPU and memory capacity. After deallocation, Azure provisions the VM onto a host with sufficient resources and updates the VM's size property, while retaining the same VM resource ID, attached disks, NIC, and most configuration. This achieves the temporary 8-vCPU requirement without rebuilding the VM or altering its identity.
- ✗
Delete the VM and recreate it with a new size.
Why it's wrong here
Deleting and recreating the VM removes the compute resource and its unique resource ID, so attached managed disks and NICs must be manually reattached, and any availability set membership, extensions, or role assignments may be lost or need to be reapplied. This destructive approach breaks operational continuity, introduces configuration drift, and requires complete redeployment, making it slower and riskier than a deallocate-and-resize cycle. The business requirement specifically calls for preserving the existing VM attributes, which this method fails to do.
When this WOULD be correct
If the question required changing the VM to a different size not supported by the current VM series, or if the VM needed to be moved to a different region or resource group while preserving the configuration, deleting and recreating might be necessary.
- ✗
Generalize the VM first to preserve the existing configuration.
Why it's wrong here
Generalizing a VM (via Sysprep on Windows or waagent -deprovision on Linux) strips machine-specific identifiers such as the computer name, SID, and hostname, preparing it to be captured as a reusable image. This process is intended for creating golden images, not for resizing a live server, and it would invalidate the existing VM's identity and require redeployment from the image. It adds unnecessary complexity and downtime, whereas a simple deallocate-and-resize preserves the machine exactly as is.
When this WOULD be correct
If the question asked to create multiple identical VMs from an existing VM for scaling out, or to migrate a VM to a different region while preserving its configuration, then generalizing the VM (using sysprep) would be the correct first step before capturing an image.
- ✗
Take a snapshot of the OS disk instead of resizing.
Why it's wrong here
A snapshot is a read-only, point-in-time copy of the OS or data disk and is used for backup, disaster recovery, or creating new disks from the captured state. Taking a snapshot does not change the VM's current compute allocation, which is defined by the selected VM size, and therefore cannot provide additional vCPUs or memory. It would add storage cost and operational overhead while leaving the VM at 4 vCPU, so it does not satisfy the performance requirement at all.
When this WOULD be correct
When the question asks to preserve the VM configuration and data before performing a risky operation (e.g., migrating to a different region or changing disk type), and the VM can be recreated from the snapshot with the same settings.
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 before changing its size.Correct answer▾
Why this is correct
Deallocating the VM releases the underlying compute host while preserving the managed OS and data disks, the NIC, and the VM's resource ID. This state allows Azure to reallocate the VM to a different cluster that has capacity for an 8-vCPU SKU, which would otherwise be impossible if the current host does not support the larger size. It also halts compute billing during the operation, though disk storage charges continue, making it a standard prerequisite for most size changes.
✗Delete the VM and recreate it with a new size.Wrong answer — click to see why▾
Why this is wrong here
Deleting and recreating the VM would change the VM name, NIC, private IP, and attached managed disks, which must remain the same per the question constraints.
★ When this WOULD be the correct answer
If the question required changing the VM to a different size not supported by the current VM series, or if the VM needed to be moved to a different region or resource group while preserving the configuration, deleting and recreating might be necessary.
Why candidates choose this
Candidates may think that deleting and recreating is the only way to change VM size, not realizing that resizing an existing VM is possible after deallocation.
✗Generalize the VM first to preserve the existing configuration.Wrong answer — click to see why▾
Why this is wrong here
Generalizing a VM prepares it for creating reusable images, but it is unnecessary and disruptive for a simple resize operation. The question requires preserving the VM name, NIC, private IP, and disks, which are all retained by deallocating and resizing without generalization.
★ When this WOULD be the correct answer
If the question asked to create multiple identical VMs from an existing VM for scaling out, or to migrate a VM to a different region while preserving its configuration, then generalizing the VM (using sysprep) would be the correct first step before capturing an image.
Why candidates choose this
Candidates may confuse the process of resizing with creating a new VM from an image, thinking that generalization is needed to 'preserve configuration' during any size change, or they may overcomplicate the simple resize operation by adding unnecessary steps.
✗Take a snapshot of the OS disk instead of resizing.Wrong answer — click to see why▾
Why this is wrong here
Taking a snapshot of the OS disk does not change the VM size; it only captures a point-in-time backup. The requirement is to resize the VM, not to back up the disk.
★ When this WOULD be the correct answer
When the question asks to preserve the VM configuration and data before performing a risky operation (e.g., migrating to a different region or changing disk type), and the VM can be recreated from the snapshot with the same settings.
Why candidates choose this
Candidates may think a snapshot is necessary to preserve the disk configuration during resizing, but resizing does not affect disks, so no backup is needed.
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?”
Visual reference
Go deeper
Related to this question
Learn chapter
Managed Identities for Azure Resources
Key term
VM size
VM size is the specific combination of virtual CPU cores, memory, and sometimes temporary storage that defines the capacity and performance of a virtual machine in a cloud environment.
Key term
Azure portal
The Azure portal is a web-based, unified console that lets you build, manage, and monitor everything from simple web apps to complex cloud deployments using a graphical user interface.
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 →
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.