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
You can't add an existing VM to an availability set after it's created. When you create a VM with New-AzVM, you use the -AvailabilitySetName parameter to specify the name of the availability set. Now create two VMs with New-AzVM in the availability set. It takes a few minutes to create and configure both VMs.
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.
No. If autoscale rules require more VM instances as part of a scale set, a new VM instance is created.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With