i have a question if suppose i have two esxi hosts:-
one is esxi1 and other is esxi2 and on esxi2 two vm's are running one is vCenter Server and other is a windows 2003 vm. for windows 2003 vm VM to host affinity rule is configured
esxi2 is down now then vCenter vm is restarted on esxi1 but windows 2003 vm is not restarted on the esxi1. My question is why it is not restarted even if the vCenter server is down then who is checking all these rules?
As you should be aware there are 2 type of VM-Host Affinity rules.
1) Should Run
2) Must Run
If the VM is part of MUST run group HA will respect the rule and will not restart the VM but if it is part of Should Run it HA would restart the VM.
The HA/FDM agents running on the ESXi hosts take care of that.
The information on the current power states of the VMs and what VMs can/should run on what hosts (so-called "compatibility lists") are stored on the datastores in a hidden directory called ".vSphere-HA". In case of an HA failure the remaining hosts check these files to determine what VMs need to be restarted on what hosts.
I think when you configure the HA with DRS and If any such policy exist, Every host in the cluster store that information within Compatlist " It contains the actual compatibility info matrix for every HA protected virtual machine and lists all the hosts with which it is compatible." file within HA cluster.
I admire your quest for knowledge, but there is no need to shout when no one has replied in the last hour or so. Please respect others and realize that 98% of your questions can mostlikely be answered by using google or searching this forum.