With introduction to AOS 5.0 Nutanix had release one of the most competing feature as ADS which makes AHV fully enterprise ready and more competing.
Acropolis Dynamic Scheduling or ADS will proactively monitors AHV cluster for compute and storage I/O and migrate VMs to avoid any hotspots similar to VMware DRS or Hyper-V SC PRO, but as built-in intelligence u don’t have much to worry about configuring it properly.
ADS will be enabled default and to verify run
can be disabled from acli using
acli ads.update enable=false
and can be re-enabled using
acli ads.update enable=true
so now ADS is enable whats next, set rules configure affinity rules.
Currently AHV supports VM-Host and VM-VM anti-affinity policy only.
Using VM-Host affinity you can make sure that VM will only be able to run on selected hosts only.
VM-Host affinity cannot be configured if you have HA set for reserved host.
To verify run acli ha.get
acli ha.get .. reservation_type: "kAcropolisHAReserveSegments" ..
verify reservation_type is not set as kAcropolisHAReserveHosts.
To set reservation_type as Reserve Segments run
acli ha.update reservation_type=kAcropolisHAReserveSegments
To set VM-Host affinity you can select host list while creating VM or update VM later.
and selecting hosts you want to set affinity to.
so now you have list of host that VM is allowed to run on.
Now if you try to migrate that VM you will be allowed selected hosts only.
ADS will not allow to unset VM-Host affinity while VM is ON but you can do using acli
acli vm.affinity_unset vmname
VM-VM anti-affinity allows to make sure VMs will always run on different hosts. Currently it can be set using acli.
In order to define anti-affinity policy you have to create a VM Group and set anti-affinity on that group, so when the VMs are turned ON they are prefered to be on different host, but this policy does not limit ADS from taking action in resource constraints.
Create VM Groups
acli vm_group.create <vm_group_name>
List VM Groups
Add VMs in VM Group
acli vm_group.add_vms webservers vm_list=<vm1_name>,<vm2_name>
List VMs in VM Group
acli vm_group.list_vms <vm_group_name>
Get VM Group Information to see Anti-Affinity Policy
acli vm_group.get webservers
*Noticed no anti-affiity policy defined
Set Anti-Affinity Policy to VM Group
acli vm_group.antiaffinity_set <vm_group_name>
Get VM Group Information to verify Anti-Affinity Policy
acli vm_group.get <vm_group_name>
Now when the VMs will be turned they will be placed on different host.