Changing Zone in Azure Virtual Machine - azure

I have a AvailabilityZone set to my deployed VMSS, i would like to know how can i add and change AvailabilityZone to my current vmss but i cant find any option to do so.
I would really appreciate any inputs
Change the Availability Zone Sets

You can't add an existing VM to an availability set after it's created. VMs must be created within the availability set to make sure they're correctly distributed across the hardware. A VM can only be added to an availability set when it is created. To change the availability set, you need to delete and then recreate the virtual machine.
Please refer to the below documents for more information :- https://learn.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-availability-sets
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set

Related

Can't select availability set when creating a backend pool

When I try to create a backend pool in the azure portal, I don't get prompted for an availability set; I just see a drop-down list of virtual networks but the list is empty.
When I first tried this I didn't know about availability sets. I have now created an availability set but I still don't get any option to select an availability set either when creating a backend pool or when creating a new VM.
I have seen tutorials and videos on setting up load balancing on azure, but on my azure portal I just don't see the same options they have in the screenshots.
Are availability sets still relevant or are they now deprecated? if they are still in use, is there anything I need to do to enable them?
Availability Sets are not deprecated.
If you create an Availability Set in the same Resource Group with the Load Balancer you must be able to see it.
And one more thing, when you must select the Availability Set while you create a Virtual Machine you cannot add it if the virtual machine already exists.
Hmm, after looking more closely I realized that in the 3rd step for creating the VM, the screen wasn't loading completely. As well as the Availability Set selection being completely blank, a couple of the other drop-down boxes just said "loading..." next to them so basically I couldn't create a VM at all.
I tried waiting for a while, logging out and back in etc but it made no difference. I tried on a different Azure subscription and everything worked as expected. The original subscription used to work, so I suspect my Availability set had somehow not been created properly and this was causing the screen to bork.
I deleted the Availability set and created another one with all the same parameters, and now it seems to be working properly.

Set Virtual Machine Availability Set

When creating a VM in Azure, you have the option of setting an Availability Set and Fault/Update domain. I have some VMs where I need to set the Availability Set and another set of VMs where I need to update the Fault/Update domain.
As far as I can see, this isn't available with the new Resource Group-based Virtual Machines and cmdlets, thus this previous post isn't applicable. Without recreating the VMs, what is the proper way to set these resources?
Because availability set membership determines which stamp (cluster) a VM will be created in, it isn't possible to configure the availability set after the machine is deployed.
The simplest solution would be to delete the VM, while retaining the disks, then create your availability set and create and add new VMs with the existing disks.

Availability Set not in Dropdown

I'm trying to set up to machines in the same availability set in Azure so that I can make sure that my MongoDB database is always available.
I created an availability set for the first machine.
When I go to select an availability set for the second machine, it's not in the dropdown. It still lets me create a new one, but the existing availability set is not there.
What am I doing wrong?
I'm using OpenLogic 7 for both machines, standard instance.
Looks like both machines need to be in the same cloud service.
I changed that and it works.

unable to add a vm to an Availability Set in azure

I just created a standard vm inside Azure, and created a new Availability set.
I created another vm, with the same specs, in the same region, but when I go to configurare the availability set I don't see it in the list.
I'm missing something?
Luca
So... just posting this as an answer, to properly close the loop based on the comments under the question:
When setting up a Virtual Machine, you can choose which Cloud Service to place the Virtual Machine in. The Cloud Service is essentially a container which gets assigned a specific IP address, gets a cloudapp.net name (e.g. myservice.cloudapp.net), and gets assigned to a region (or affinity group, which is region-specific).
Availability Sets are specific to a given Cloud Service. You may place any of your Cloud Service's VMs in the same Availability Set (or even have multiple Availability Sets, with groups of VMs assigned to specific Availability Sets). However: An Availability Set does not span across Cloud Services.
So: When you went to set up your second Virtual Machine, and you didn't see your Availability Set, that is because you were attempting to deploy to a different Cloud Service.
Below screenshot shows the wizard page where we can select existing cloud service to which we can associate a new VM

Adding Azure Virtual machine to an existing availability set

I want to create two virtual machines in Azure which should not be connected to each other. I created first virtual machine and also created an availability set as part of its creation process.
Now when I create the second virtual machine then I don't get the availability set created as part of first virtual machine in the drop down list of availability sets.
However if I try to connect the second virtual machine as part of first one then I am able to see the availability set created as part of first virtual machine.
Is it mandatory for virtual machines to be connected to each other so that I can add them to the same availability set? Is this a limitation only from azure portal and there is a workaround using powershell?
UPDATE:
If we connect two virtual machines then we can get the benefit of availability set. However, at the same time both virtual machine becomes part of same cloud service and hence are load balanced by azure which does not support sticky session.
My scenerio is that I have identical front-ends which needs to support sticky session. Therefore I don't want to connect them to each other. However, I want to get the benefits of availability sets as mentioned in the article on Availability sets.
So can I set availability set for two identical virtual machines not connected to each other?
The term "Availability Set" means that you want to bring one or more VM within one service group for maximize the availability during an event of downtime. So what you see on Azure Portal is correct behavior however you might have some misunderstanding with regard to Availability Set. You can read more on "Availability Set" here.
So when you try to connect second virtual machine as part of first, you do see the availability set, because this way you want your VM to use the settings from the first and add another VM to the same group to maximize the availability. This second VM becomes the part of first one.
When you create an independent VM (call is second or 3rd or any) you are actually creating a brand new VM which is going to run independent to any other VM you may or may not have and thats why you dont see "availability set" instead you can create a new "availability set" based on this new VM.
Set AvailabilitySet using Powershell
Get-AzureVM -ServiceName "savilltech101" -Name "WebSrv3" | Set-AzureAvailabilitySet -AvailabilitySetName "IIS" | Update-AzureVM

Resources