Azure: VM's not assigned fault or update domains - azure

I provisioned a few Azure VM's in an Availability set using the Azure Java SDK. The VM deployed successfully and is running. However, one of the VM's, the one provisioned first, does not display a fault domain or an update domain.
Why is my VM not being assigned a fault domain or an update domain?

Why is my VM not being assigned a fault domain or an update domain?
No, your VM is in an availability set. Your availability set name is SG-*. When VM in an availability set, it will assign a fault domain and update domain automatic.
You could get your VM's fault domain and update domain value on Azure Portal.
Resource group-->Availability set-->Virtual Machines
Update:
However, one of the VM's, the one provisioned first, does not display
a fault domain or an update domain.
Based on my knowledge, it is a design behavior. The first VM's fault domain and update domain is 0 0. You could all domain on Availability set.

Related

Azure VM's not assigned to different fault domains

I have created two vm's in azure and assigned an availability set.
But in the overview I see that both the vm's are assigned under same Fault Domain.
Should the vm (Vm availability-test-vm2) have been assigned to Fault domain 1 instead of 0 ?
By default, the virtual machines configured within your availability set are separated across up to three fault domains for Resource Manager deployments.
If there are only two VMs within an availability set, each VM should be in a different fault domain. However, If there are more than two VMs(for example, 3 VMs in 2 fault domains) or you have created three VMs(even you delete one of them), it's possible that the remaining 2 VMs are assigned to the same fault domain because the original three VMs should be in fault domain 0, 1, 0.
For example,
You can create and deploy virtual machines in an availability set using Azure PowerShell. Please note that A VM can only be added to an availability set when it is created.

Azure Availability Sets and adding VM to specific fault domains

So I have 2 classes of VM. Lets call them serverA and serverB.
Within my availability set I want to make sure each Fault domain has 1 of each VMs (ServerA and ServerB). Is it possible to have this level of fine control? From what I can tell it looks like this is achieved by adding the Servers in a specific order i.e. serverA, server A, server B server B assuming I had 2 fault domains.
Is this true? Is it the only way?
When you deploy Virtual machines in an Availability Sets, Azure takes care of placing machines in different fault domains and update domain. We do not have granular level control on deciding which VM needs to be in which Fault domain.
In a high level, if you deploy 2 VMs, then Azure will make sure those 2 VMs are part of different Fault domain and update domain.

Fault domain of Virtual Machines in an availability set

I read the following in the AZURE214x Azure Fundamentals openedx course:
Each virtual machine in an availability set is placed in one update
domain and two fault domains.
I don't understand why a VM in an availabilty set is placed in two fault domains? I mean a VM can only sit in one fault domain or am I wrong? Can someone explain?
Each virtual machine in an availability set is placed in one update
domain and two fault domains.
No, this is wrong.
Each virtual machine in your availability set is assigned an update domain and a fault domain by the underlying Azure platform.
Also, you could refer to Mistake in Module3, Review question 2 (AZURE202x Microsoft Azure Virtual Machines).
I guess its just a wording thing, VM cannot be in 2 fault domains at the same time.
"Each virtual machine in your availability set is assigned an update domain and a fault domain by the underlying Azure platform."
Reference: https://learn.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-manage-availability

Domain Controller in Azure VM slow to respond

I have set up a simple domain in my Azure subscription by creating a domain controller in an Azure VM, with all of the associated DNS setup and following documented best practices. This is a cloud-only domain on a cloud-only vnet; there is no on-premises connectivity. I have provisioned and joined a handful of VMs to the domain. Now, when I provision new VMs, they have trouble joining the domain (often failing to join at all) and DNS lookups from these machines often times out, especially to internet addresses. How can I fix this?
Details
I have set up a domain controller on an Azure VM following the practices and steps in "Install a new Active Directory forest on an Azure virtual network" and "Guidelines for Deploying Windows Server Active Directory on Azure Virtual Machines", with the exception that I did not put the AD database on a separate data disk. In addition, I have added 168.63.129.16 as a second DNS address (the first address is the internal vnet address of the DC, which I have made static using Set-AzureStaticVNetIP) in the Virtual Network settings so that the machines on the domain can reach the internet.
I use the PowerShell cmdlets to provision new machines and have them automatically joined to the domain using the -WindowsDomain switch and associated parameters of Add-AzureProvisioningConfig when creating the VMs. I have provisioned the DC in one cloud service, and all other machines in another cloud service. All are on the same vnet subnet, and all of this is in one affinity group. I have provisioned and joined about 15 machines, about ten of which are still running (others deleted).
Usually provisioning a new VM takes about 11-12 minutes. Now I'm seeing that it takes upwards of 30-35, and upon completion, the machine failed to join the domain. DNS lookups across the board are slow and often time out (especially for internet addresses), and on these new machines that were not able to join the domain, often fail completely. Pinging the DC from these machines fails, while on machines that successfully joined the domain earlier, it succeeds.
I am not sure if the number of machines on the domain/vnet/cloud service/subscription are the cause of this problem, but I didn't see this problem until I had been using the domain for a while and spun up a number of machines.
One of the more common causes could be your AD DNS is returning an IP that cannot be resolved internally to join the domain. When you do an nslookup on yourdomain.local, does it respond with only IPs that can resolve on the internal, private network?

Understanding availability set in Windows Azure

I am reading the explanation of Availability Sets on Microsoft' website but can't 100% understand the concept.
http://www.windowsazure.com/en-us/documentation/articles/manage-availability-virtual-machines/
There are many questions people ask in comments, but there is no technical support from Microsoft is there to answer them.
As I properly understand with availability sets you can duplicate your VM with IIS application and VM with SQL, which means you have to use 4 VM(pay for 4) instead of 2. This means that whenever IIS1 virtual machine is down, website will still be online with help of IIS2 virtual machine and vice versa? Same goes for SQL1 and SQL2 virtual machines?
Am I going to the right direction? If this is the case, how do I keep the data synchronized in SQL1 and SQL2, IIS1 and IIS2 virtual machines at the same time, so website will still be up with latest data and code if one VM is down for updates?
An availability set combines two concepts from the Windows Azure PaaS world - upgrade domains and fault domains - that help to make a service more robust. When several VMs are deployed into an availability set the Windows Azure fabric controller will distribute them among several upgrade domains and fault domains.
A fault domain represents a grouping of VMs which have a single point of failure - a convenient (although not precisely accurate) way to think about it is a rack with a single top or rack router. By deploying the VMs into different fault domains the fabric controller ensures that a single failure will not take the entire service offline.
The fabric controller uses upgrade domains to control the manner in which host OS upgrades (i.e., of the underlying physical server) are performed. The fabric controller performs these upgrades one upgrade domain at a time, only moving onto the next upgrade domain when the upgrade of the preceding upgrade domain has completed. Doing this ensures that the service remains available, although with reduced capacity, during a host OS upgrade. These upgrades appear to happen every month or two, and services in which all VMs are deployed into availability sets receive no warning since they are supposedly resilient towards the upgrade. Microsoft does provide warning about upgrades to subscriptions containing VMs deployed outside availability sets.
Furthermore, there is no SLA for services which have VMs deployed outside availability sets.
As regards SQL Server, you may want to look into the use of SQL Server Availability Groups which sit on top of Windows Server Failover Cluster and use synchronous replication of the data. For IIS, you may want to look at the possibility of deploying your application into a PaaS cloud service since that provides significant advantages over deploying it into an IaaS cloud service. You can create a service topology integrating PaaS and IaaS cloud services through the use of a VNET.
Availability set is combination of these two feature
Fault Domain(you have option to select max 3 when creating new Availability Set)
Update Domains (you have option to select max 20 when creating new Availability Set)
Fault Domain is the physical(like rack, power) set lets you selected 2 fault domain in your availability set and your machine in that availability set will have value 1 and 2 so at least one can be available in case of power failure at any physical set.
Update Domain is set which will be updated by azure system update at once.
if select 4 update domains and your 2 VM have value 2,3 that means they will not be updated together for any planed maintenance
For high availability duplicate VM should not be on same Fault Domain or same Update Domain
Now You can not change availability set after creation of a VM it should be set at the time of creation

Resources