AZ-104 Exam QuestionsBrowse all questions from this exam

AZ-104 Exam - Question 16


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?

Show Answer
Correct Answer: C

If a VM within an availability set needs to be resized and an allocation failure occurs, it indicates that the necessary resources for the new size are not available on the current physical hardware cluster. In order to resize the VM to a size that is supported on a different hardware cluster, all VMs in the availability set must be stopped. This is because the availability set must use the same physical hardware cluster, and stopping all VMs allows them to be moved to a different cluster with the required resources. Therefore, stopping all three VMs in the availability set is necessary before resizing any individual VM.

Discussion

61 comments
Sign in to comment
CLagnuts
Jun 30, 2021

C. Looks Correct Stop all the VMs in the availability set. Click Resource groups > your resource group > Resources > your availability set > Virtual Machines > your virtual machine > Stop. After all the VMs stop, resize the desired VM to a larger size. Select the resized VM and click Start, and then start each of the stopped VMs.

jackdryan
Feb 23, 2023

C is correct

Nathan12345
Jan 9, 2025

C is corrrect https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/restart-resize-error-troubleshooting#issue-error-when-resizing-an-existing-vm

Nathan12345
Jan 9, 2025

C is corrrect https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/restart-resize-error-troubleshooting#issue-error-when-resizing-an-existing-vm

MrJR
Sep 23, 2021

This question is deprecated. I tested and I was able to change the size of a VM, which is in an availability set with two other VMs, without stopping any other VM. With the three VMs up you can resize any of them.

drainuzzo
Nov 21, 2021

But the question reported: "You try to resize one of the VMs, which returns an allocation failure message." so you can only stop all the 3 vms

CommanderBigMac
Feb 4, 2023

All this means is that the change in hardware was supported by whatever the availability set was running on, not that the question is depricated. If your VM(s) are deployed using the Resource Manager (ARM) deployment model and you need to change to a size which requires different hardware then you can resize VMs by first stopping your VM, selecting a new VM size and then restarting the VM. If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set. The reason all VMs in the availability set must be stopped before performing the resize operation to a size that requires different hardware is that all running VMs in the availability set must be using the same physical hardware cluster. Therefore, if a change of physical hardware cluster is required to change the VM size then all VMs must be first stopped and then restarted one-by-one to a different physical hardware clusters.

vombat186
Mar 23, 2025

This has nothing to do deprecation. Its an issue with the underlying cluster that hosts the VMs, it may not have capacity or doesn't support the VM size you want to change to. So just because it worked in your case, does not mean it will always work in the future.

wondinv
Feb 4, 2022

After testing in lab, it's possible to change the size of a VM which is included in a Availability Set without turning it off. The restriction comes when the physical cluster does not have anymore resources left. On this situation an error message will be showed as stated on the question. In this case, you need to turn all the VMs down and resize the desired on. (In the background AWS will replace the VMs to a different hardware cluster if needed).

Bere
Feb 28, 2022

I think you meant Azure rather than AWS

GenjamBhai
Apr 19, 2022

thanks

Vkom
Dec 26, 2021

C is the correct answer Only one VM in same availability set can be resized if upgrading to same VM family. In the question you see "allocation error" which happens if you are upgrading one VM which is not part of same VM family, or the VM is not available. The resolution is to stop all the VMs and resize each VM. Please check troubleshooting guide for better explanation:

NaoVazOption: C
Sep 12, 2022

"If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set. " C) "You should stop all three VMs." seems to be the correct option.

FritsBOption: A
Nov 23, 2024

Just tested it in my lab. I created an availability set, added 3 VM's. Stopped VM1 and resized it and started it again. No issues.

RajeshwaranM
Dec 21, 2024

Did you get the allocation failure while you increased space for the VM?

58b2872
Dec 24, 2024

Because you have enough hardware resources, bro, no allocation failure message...

Marciojsilva
Nov 10, 2021

"Resize Resource Manager (ARM) virtual machine to size not available in current hardware cluster If your VM(s) are deployed using the Resource Manager (ARM) deployment model and you need to change to a size which requires different hardware then you can resize VMs by first stopping your VM, selecting a new VM size and then restarting the VM. If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set"

verifedtomicOption: C
Nov 23, 2021

Since the VM is in an availability SET, all three VMs have to be identical. You can't resize one, but all three. To resize a VM(s), VM(s) have to be shutdown - deallocated

EmnCoursOption: C
Aug 30, 2022

Correct Answer: C 🗳️ If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set. The reason all VMs in the availability set must be stopped before performing the resize operation to a size that requires different hardware is that all running VMs in the availability set must be using the same physical hardware cluster. Therefore, if a change of physical hardware cluster is required to change the VM size then all VMs must be first stopped and then restarted one-by-one to a different physical hardware clusters.

locke7
Apr 19, 2023

When VMs are included in an availability set, Azure distributes them across multiple fault domains and update domains to ensure that if there is a hardware or software failure, only a subset of the VMs are impacted, providing higher availability. When you try to resize a VM, the Azure platform needs to allocate the necessary resources in a specific fault domain and update domain. If the platform cannot find available resources in the same fault domain and update domain, the allocation fails. To resolve this issue, you can stop all three VMs in the availability set, resize the VM that you need, and then start all three VMs again. By stopping all three VMs, you ensure that all of them are running on different fault domains and update domains. This way, when you start them again, Azure can allocate resources for each VM in a separate domain, making it more likely that the allocation will succeed

JunetGoyal
Apr 25, 2023

As Question specify "the error explicitly" in that case we have to stop all VM. Otherwise You can resize VM with out stopping, but sometimes it gave error in that case you have to stop all vm.

oopspruu
Aug 14, 2023

People here who are saying "we tested in lab" are missing the biggest clue in the question. "which returns an allocation failure message" - This clearly means an attempt was made to resize and it failed. Which means all 3 VMs need to be stopped before resizing the desired one.

Yuraq
Oct 11, 2023

“If your VM(s) are deployed using the Resource Manager (ARM) deployment model and you need to change to a size which requires different hardware then you can resize VMs by first stopping your VM, selecting a new VM size and then restarting the VM. If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set. The reason all VMs in the availability set must be stopped before performing the resize operation to a size that requires different hardware is that all running VMs in the availability set must be using the same physical hardware cluster. Therefore, if a change of physical hardware cluster is required to change the VM size then all VMs must be first stopped and then restarted one-by-one to a different physical hardware clusters.”

[Removed]
Aug 9, 2024

C: should Stop all the VMs in the availability set' as per https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/restart-resize-error-troubleshooting

Ayb_FNZ
Oct 26, 2024

Answer is C. We have to understand the allocation failure error. When we create an availability set, all the mVMs are created within the same data center in specific racks (depends on the fault and update domains). When we resize, ARM looks for enough capacity to allocate 3 times the new size. If there is no enough compute capacity, it send s back an error. We have to stop all the VMs (aka deallocate) so they can be allocated on another rack where capacity is available for the 3 VMs (aka 3 times the new desired size)

Sama5100Option: C
Dec 21, 2024

In the event of an allocation failure, we should stop all three VMs in the availability set https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/restart-resize-error-troubleshooting#issue-error-when-resizing-an-existing-vm

marcusaurelius124
Jul 12, 2021

I believe the answer, C, is correct. "When you try to start a stopped Azure Virtual Machine (VM), or resize an existing Azure VM, the common error you encounter is an allocation failure." "After all the VMs stop, resize the desired VM to a larger size."

YooOY
Sep 24, 2021

Cause The request to resize the VM has to be attempted at the original cluster that hosts the cloud service. However, the cluster does not support the requested VM size.

jairoaquinterov
Oct 25, 2022

"A request to resize a VM or add a VM to an existing availability set must be tried at the original cluster that hosts the existing availability set. The requested VM size is supported by the cluster, but the cluster may not currently have sufficient capacity." "If the VM can be part of a different availability set, create a VM in a different availability set (in the same region). This new VM can then be added to the same virtual network. Stop (deallocate) all VMs in the same availability set, then start all applicable VMs in batch."

ElDakhliOption: C
Dec 25, 2022

I'm working at a well-known cloud provider. The point is, the cloud physical hosts are assigned to Points Of Delivery (PODs) which consist of aggregates, each aggregate represents one flavor type. PODs are not identical and maybe it doesn't have the requested flavor. This took place initially cause the cluster (POD) has no sufficient resources of the requested flavor or even it hasn't the flavor in the physical cluster. The solution will be stopping all VMs and resize, so the VMs will be reassigned to a POD that has the flavor and sufficient resources. Below is Azure reference link. Please refer to the "Issue: Error when resizing an existing VM" topic.

nilesh_1
Feb 12, 2023

I tested this in Feb-2023, and shutdown is not required. I could resize VM without shutting down. Once Size selected VM restarted automatically and resize operation successful.

garmatey
Mar 24, 2023

But the question specifically says doing that brought back an error message

[Removed]Option: C
Sep 1, 2024

C is correct

korben_dallas
Jul 4, 2021

I believe the answer is A under the assumption that the size check was already performed on the VM If the new size for a VM in an availability set is not available on the hardware cluster currently hosting the VM, then all VMs in the availability set will need to be deallocated to resize the VM. You can check which sizes are available on the hardware cluster where the VM is hosted prior to resizing. If the desired size is listed , then you don't have to deallocate all three. If the size you want is not listed, you have to deallocate all VMs in the availability set, resize VMs, and restart them.

jellybiscuit
Sep 5, 2021

Perhaps it depends on the age of the question. Currently, M$ is currently encouraging people to initiate a resize without first deallocating. - if a resize is not possible in this way, the requested size isn't available in the current cluster - if the size isn't available in the current cluster, all the servers in the AS will need to be deallocated.

Veerabhadra_reddy
Oct 15, 2021

I think the options should be rephrased, and you are correct, as per the MS DOCs -> If the new size for a VM in an availability set is not available on the hardware cluster currently hosting the VM, then all VMs in the availability set will need to be deallocated to resize the VM. You also might need to update the size of other VMs in the availability set after one VM has been resized

Olufavour
Jun 25, 2023

This is straight forward. The Error means you can not resize except ypu stop all the VMs

Soumya198725
Jul 2, 2023

Technically one vm can be resizable as it couldn't affect the underlying hardware cluster

Muntazirsyed
Jul 11, 2023

I Performed this in LAB. We can resize any VM in Availability set without stopping other VMs.

Joshing
Aug 6, 2023

I haven't actually tested this. But I believe the question hints towards trying to resize one of the VMs to a size that is not available in the same hardware cluster. When at least one of the VMs is still running you will have reduced options to which sizes you can change to. So I think this question hints towards the error showing due to trying to change to a valid VM size but due to the Availability Set it's not available until all VMs are shut down. Correct me if I am wrong though as I haven't tested it and just done a little reading on the matter.

abhikeshuOption: D
Feb 27, 2024

Option 3 suggests stopping all three VMs. While stopping all VMs might temporarily free up resources within the availability set, it is not the most targeted or efficient solution to address the allocation failure during VM resizing. Additionally, stopping all VMs would disrupt the availability of services running on those VMs, which may not be acceptable in a production environment. Removing only the necessary VM from the availability set, as suggested in option D, allows for a more surgical approach. It addresses the allocation failure specifically for the VM that needs resizing while minimizing disruption to other VMs in the availability set. Once the necessary VM is resized, it can be added back to the availability set to restore its high availability and redundancy features. This approach is more targeted and focused on resolving the specific issue at hand without unnecessary disruption to other resources.

TheFivePips
Jul 29, 2024

I was wondering this too. Chat GPT said this: If you want to add the VM back into the availability set after resizing, this is not directly supported. You would need to delete the VM (keeping its disks) and recreate it within the availability set, which involves downtime and additional configuration.

TheFivePips
Jul 29, 2024

Further explanation: Virtual machines (VMs) must be created within an availability set from the beginning; you cannot add an existing VM to an availability set. This is because the placement of VMs within an availability set is determined at the time of their creation to ensure they are distributed across multiple fault and update domains to provide high availability.

TheFivePips
Jul 29, 2024

Further explanation: Virtual machines (VMs) must be created within an availability set from the beginning; you cannot add an existing VM to an availability set. This is because the placement of VMs within an availability set is determined at the time of their creation to ensure they are distributed across multiple fault and update domains to provide high availability.

SHAHIN_STAOption: D
Dec 9, 2024

**Answer: D. You should remove the necessary VM from the availability set.** **Explanation:** When a VM is part of an **availability set**, resizing the VM can sometimes fail if there aren't sufficient resources available in the underlying hardware for the requested VM size. In this case, the correct action would be to **remove the VM from the availability set**, which allows resizing without being constrained by the availability set's resource allocation. After resizing, you can add the VM back into the availability set. Simply stopping the VMs (Options A, B, and C) doesn't resolve the allocation failure, as the issue lies with the available resources in the set, not with whether the VMs are running or stopped.

RajeshwaranM
Dec 21, 2024

Can I replicate the issue on my end? I really wanna test this scenario

58b2872
Dec 24, 2024

GPT hhahahahahah

emakidOption: C
Mar 1, 2025

Retry the request using a smaller VM size. If the size of the requested VM cannot be changed: Stop all the VMs in the availability set. Click Resource groups > your resource group > Resources > your availability set > Virtual Machines > your virtual machine > Stop. After all the VMs stop, resize the desired VM to a larger size. Select the resized VM and click Start, and then start each of the stopped VMs. Source: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/restart-resize-error-troubleshooting#issue-error-when-resizing-an-existing-vm

Bloodwar
Jul 15, 2021

Correct, C, you need stop all VMs to change the size in your availability set.

SulSulEi
Aug 18, 2021

Answer is correct based on,

zankuko_tenshi
Nov 11, 2021

C. All VM's must be deallocated

Prano
Dec 9, 2021

Ans : C Stop all the VM's for deallocation then increase the size

nqthien041292Option: C
Feb 10, 2022

Vote C

PeterHu
Feb 15, 2022

c ,should Stop all the VMs in the availability set

Raghav123456Option: C
Mar 6, 2022

C. is the correct option

Dhanya2022
Mar 11, 2022

I observed that it is possible to resize a VM in avset without stopping any VMs( including the one that is resized)

amit9698
Nov 12, 2022

you can easily detach it.

ryslaw81
Dec 17, 2022

I just created an availability set, put there 3 new vms, and successfully resized one of them without any allocation error. All were running.

RufusinskiOption: C
Jan 12, 2023

C is correct.

UmbongoDrinkOption: C
Feb 12, 2023

If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set.

JunetGoyal
Mar 30, 2023

I tested March 30, You do not need to turn off any Vm

PrinceThursday
Apr 11, 2023

I believe the answer is C:

Madbo
Apr 12, 2023

The correct answer is C. You should stop all three VMs. Stopping all three VMs in the availability set is required to ensure that the resizing operation can complete successfully. This is because the availability set guarantees that at least one VM is available during maintenance events, which means that the VMs in the availability set share underlying hardware resources. Therefore, the resizing operation cannot be completed while the VMs are running.

BowSecOption: C
Apr 15, 2023

The correct answer is C To resize a VM that is part of an availability set, you should stop all the VMs in the set to avoid any potential downtime or data loss. This ensures that the VMs can be properly balanced across the update domains and fault domains to prevent potential data loss.

Andre369Option: B
May 25, 2023

To resize a virtual machine (VM) that is part of an availability set, you need to ensure that the VM is in a stopped state before resizing. Based on the given scenario, the VM resize is failing with an allocation failure message, indicating that the VM is currently running or in a state that prevents the resize operation. To resolve this, you should take the following action: B. You should stop two of the VMs. By stopping two of the VMs in the availability set, you ensure that at least one VM remains running to maintain the availability set's fault and update domains. Stopping two VMs allows you to free up resources and perform the resize operation on the remaining running VM.

dhivyamohanbabu
Jun 24, 2023

C is correct

nikaz104
Jul 1, 2023

How answer C is correct

Mehedi007Option: C
Jul 28, 2023

"If the Resource Manager (ARM) deployment model was used then the VM(s) can be resized if the VM, and any other VMs in the same availability set, are in a stopped (deallocated) state."

GPerez73
Sep 5, 2023

Just a question to all of you that chose C option. Being an availability set, if we stop the 3 VMs we would lose the availabitly. For me it makes more sense option D What do you think?

fiahboneOption: C
Sep 9, 2023

Allocation failure message, is the clue here. Obviously I didn't work to resize the VM. If that VM is part of an availability set, all virtual machines in the set must be stopped.

Yuraq
Oct 11, 2023

If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set. The reason all VMs in the availability set must be stopped before performing the resize operation to a size that requires different hardware is that all running VMs in the availability set must be using the "If the VM you wish to resize is part of an availability set, then you must stop all VMs in the availability set before changing the size of any VM in the availability set. The reason all VMs in the availability set must be stopped before performing the resize operation to a size that requires different hardware is that all running VMs in the availability set must be using the same physical hardware cluster.

nchebbi
Nov 3, 2023

C. stopping all the VMs is the correct answer when you try resizing a VM it will attemp to resize on the current hardware cluster that is currently hosting the VM, if the cluster doesn't support it you will get an allocation failure. https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/restart-resize-error-troubleshooting

Samuel77
Dec 5, 2023

C is correct

Amir1909
Feb 26, 2024

C is correct

18c2076
Mar 21, 2024

C is correct. Key context here is the allocation failure “When you try to start a stopped Azure Virtual Machine (VM), or resize an existing Azure VM, the common error you encounter is an allocation failure. This error results when the cluster or region either does not have resources available or cannot support the requested VM size” https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/restart-resize-error-troubleshooting

3c5adce
May 11, 2024

C. You should stop all three VMs. Stopping all VMs in the availability set can help with the reallocation of resources, making it possible to resize the VM by potentially moving it to a different hardware cluster where the desired VM size is available.

JPA210Option: A
Oct 31, 2024

Check down Mr JR answer.

JPA210
Oct 31, 2024

Commanderbigmac and drainuzzo gave a very good reply to him, so I change my vote to C.

MaDotaOption: C
Dec 5, 2024

most important part of the question is: ".....which returns an allocation failure message" In this situation Stopping all the VMs in the availability set helps free up enough resources to allow the resizing operation to succeed

NeptonOption: C
Mar 9, 2025

In this case, to resolve the allocation failure when resizing a VM in an availability set, you would need to stop all the VMs in the availability set to ensure that there are no resource conflicts or issues that prevent the VM from being resized.

tangocqui010Option: A
Apr 15, 2025

To attach a data disk from one Azure VM to another with minimal downtime, the first action you should take is to Stop the VM that includes the data disk. This is necessary because you cannot detach a data disk from a running VM. Once the VM is stopped, you can then detach the data disk and attach it to the other VM.