Resize VM within Availability set

%3CLINGO-SUB%20id%3D%22lingo-sub-2823642%22%20slang%3D%22en-US%22%3EResize%20VM%20within%20Availability%20set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2823642%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20I%20resize%20the%20VM%20in%20below%20different%20scenarios.%20For%20Example%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScenario%20%231%3C%2FP%3E%3CP%3E%3CSTRONG%3EAvailability%20Set%201%20(DC%20Region%20Europe)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EVM1%20(%20Windows)%2C%20VM%202%20(%20Windows)%20and%20VM%203%20(Windows)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScenario%20%232%3C%2FP%3E%3CP%3E%3CSTRONG%3EAvailability%20Set%202%26nbsp%3B(DC%20Region%20USA%20Central)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EVM1%20(%20Windows)%2C%20VM%202%20(%20Linux)%20and%20VM%203%20(Windows)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScenario%20%233%3C%2FP%3E%3CP%3E%3CSTRONG%3EAvailability%20Set%203%26nbsp%3B(DC%20Region%20Canada)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EVM1%20(%20Windows)%2C%20VM%202%20(%20Linux)%20and%20VM%203%20(Ubuntu)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuestion%3A%3C%2FP%3E%3CP%3E%231)%20Is%20the%20scenarios%20valid%3F%20Will%20a%20availability%20set%20can%20contain%20different%20images%20under%20same%20group.%3C%2FP%3E%3CP%3E%232)%20How%20would%20I%20change%20the%20size%20of%20the%20VM%3F%3C%2FP%3E%3CP%3EAns%3A%3C%2FP%3E%3CP%3EFor%20Scenario%20%231%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B--%20If%20the%20size%20is%20%3CEM%3Eavailable%20within%20the%20region%3C%2FEM%3E%2C%20then%20change%20it%20seamlessly.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B--%20If%20the%20size%20is%20%3CEM%3Enot%20available%20in%20the%20region%3C%2FEM%3E%2C%20change%20it%20by%20stopping%20all%20the%20VM's%20within%20the%20availability%20set%20%2C%20update%20the%20size%20and%20restart%20the%20VM%3C%2FP%3E%3CP%3EFor%20Scenario%20%232%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B--%20If%20the%20size%20is%20%3CEM%3Eavailable%20within%20the%20region%2C%3C%2FEM%3E%20%26lt%3B%26lt%3B%20What%20should%20be%20my%20next%20step%26gt%3B%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B--%20If%20the%20size%20is%20%3CEM%3Enot%20available%20in%20the%20region%3C%2FEM%3E%2C%26nbsp%3B%26lt%3B%26lt%3B%20What%20should%20be%20my%20next%20step%26gt%3B%26gt%3B%3C%2FP%3E%3CP%3EFor%20Scenario%20%233%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B--%20If%20the%20size%20is%3CEM%3E%20available%20within%20the%20region%3C%2FEM%3E%2C%20%26lt%3B%26lt%3B%20What%20should%20be%20my%20next%20step%26gt%3B%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B--%20If%20the%20size%20is%3CEM%3E%20not%20available%20in%20the%20region%3C%2FEM%3E%2C%26nbsp%3B%26lt%3B%26lt%3B%20What%20should%20be%20my%20next%20step%26gt%3B%26gt%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2843250%22%20slang%3D%22en-US%22%3ERe%3A%20Resize%20VM%20within%20Availability%20set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2843250%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1178810%22%20target%3D%22_blank%22%3E%40devops2022%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ECan%20I%20resize%20the%20VM%20in%20below%20different%20scenarios.%20%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EYes%20with%20conditions%26nbsp%3B%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E-%20VMs%20are%20in%20the%20same%20region%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E-%20VMs%20use%20managed%20disks%20when%20it%20is%20required%20(sku%20%3D%20aligned)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20the%20scenarios%20valid%3F%20Will%20a%20availability%20set%20can%20contain%20different%20images%20under%20same%20group.%20%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EYes%20check%20in%20the%20attached%20files%20you%20can%20see%20an%20availability%20set%20with%20both%20Windows%20and%20Linux%20VMs.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EHowever%20i%20would%20not%20use%20this%20configuration%20in%20production%20i%20would%20use%202%20windows%20%2B%202%20Linux%20to%20ensure%20that%20the%20service%20in%20the%20Linux%20will%20not%20stop%20in%20case%20of%20planned%20or%20unplanned%20maintenance.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3BHow%20would%20I%20change%20the%20size%20of%20the%20VM%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIn%20fact%20in%20any%20case%20the%20only%20condition%20you%20need%20to%20meet%20is%20%3A%26nbsp%3B%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E-%20%3CSTRONG%3EThe%20target%20VM%20size%20is%20available%20on%20the%20underlying%20hardware%20not%20only%20the%20region%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3ETo%20get%20all%20available%20sizes%20for%20virtual%20machines%20that%20you%20can%20deploy%20in%20the%20availability%20set%20you%20can%20use%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Faz.compute%2Fget-azvmsize%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGet-AzVMSize%3C%2FA%3E%26nbsp%3Bcommand%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3EExample%26nbsp%3B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3EGet-AzVMSize%20%60%3CBR%20%2F%3E-ResourceGroupName%20%22rg-dev-test%22%20%60%3CBR%20%2F%3E-AvailabilitySetName%20%22avail-dev-test%22%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2844401%22%20slang%3D%22en-US%22%3ERe%3A%20Resize%20VM%20within%20Availability%20set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2844401%22%20slang%3D%22en-US%22%3Ethanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F540591%22%20target%3D%22_blank%22%3E%40ibrahimambodji%3C%2FA%3E%3CBR%20%2F%3EI%20agree%20for%20production%20we%20need%20to%20have%20at%20least%202%20fault%20domain%20and%203%20update%20domain%20so%20that%20(un)planned%20maintenance%20could%20be%20handled.%3CBR%20%2F%3EI%20couldn't%20see%20the%20attached%20file.%3CBR%20%2F%3EResource%20group%20will%20sit%20on%20top%20of%20availability%20set.%3CBR%20%2F%3Eor%20can%20i%20have%20multiple%20availability%20set%20within%20a%20resource%20group%3F%20which%20of%20the%20statement%20is%20correct%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
New Contributor

Can I resize the VM in below different scenarios. For Example

 

Scenario #1

Availability Set 1 (DC Region Europe)

VM1 ( Windows), VM 2 ( Windows) and VM 3 (Windows)

 

Scenario #2

Availability Set 2 (DC Region USA Central)

VM1 ( Windows), VM 2 ( Linux) and VM 3 (Windows)

 

Scenario #3

Availability Set 3 (DC Region Canada)

VM1 ( Windows), VM 2 ( Linux) and VM 3 (Ubuntu)

 

Question:

#1) Is the scenarios valid? Will a availability set can contain different images under same group.

#2) How would I change the size of the VM?

Ans:

For Scenario #1

   -- If the size is available within the region, then change it seamlessly. 

   -- If the size is not available in the region, change it by stopping all the VM's within the availability set , update the size and restart the VM

For Scenario #2

   -- If the size is available within the region, << What should be my next step>>

   -- If the size is not available in the region, << What should be my next step>>

For Scenario #3

   -- If the size is available within the region, << What should be my next step>>

   -- If the size is not available in the region, << What should be my next step>>

5 Replies

@devops2022 

 

Hi  

 

Can I resize the VM in below different scenarios. ? 

 

Yes with conditions  

- VMs are in the same region 

- VMs use managed disks when it is required (sku = aligned)

 

Is the scenarios valid? Will a availability set can contain different images under same group. ? 

Yes check in the attached files you can see an availability set with both Windows and Linux VMs.

However i would not use this configuration in production i would use 2 windows + 2 Linux to ensure that the service in the Linux will not stop in case of planned or unplanned maintenance.

 

 How would I change the size of the VM?

 

In fact in any case the only condition you need to meet is :   

 

- The target VM size is available on the underlying hardware not only the region

 

To get all available sizes for virtual machines that you can deploy in the availability set you can use the Get-AzVMSize command

 

Example 

Get-AzVMSize `
-ResourceGroupName "rg-dev-test" `
-AvailabilitySetName "avail-dev-test"

 

thanks @ibrahimambodji
I agree for production we need to have at least 2 fault domain and 3 update domain so that (un)planned maintenance could be handled.
I couldn't see the attached file.
Resource group will sit on top of availability set.
or can i have multiple availability set within a resource group? which of the statement is correct

@devops2022 

 

Resource group will sit on top of availability set.
or can i have multiple availability set within a resource group ?

Yes you need  to keep all (vms,  resource groups and availability sets ) in the same region and that's it . 

 

 

 

Tbanks again.
I was just thinking to post another question but got answer.

So, a resource group can be used to logically group the resource within a Region and
CANNOT BE USED across grouping resources across regions.

You're welcome  

 

So, a resource group can be used to logically group the resource within a Region and
CANNOT BE USED across grouping resources across regions. Not really because in most of scenarios you can group resources in a resource group even if it is in a different region. However you can have some constraints like in the scenarios above  where the availability set and the resource group should be in the same region same for virtual machines that will use those as.