Python

Automated addition of VMware VM to Host Affinity Rules

Automated addition of VMware VM to Host Affinity Rules

Bradley Bishop

6 minute read

Background VMware Affinity rules can solve many issues in a virtualized environment with out the need to create different clusters or datacenters to separate Virtual Machines. The specific need that we at Encore had for this was that when a vm is being cloned, if the VM was migrated to a different Host due to a vMotion, the custom spec with Kickstart files or Autounattended Syspreps would fail. This was a random error that would only happened when vCenter or a host was overloaded.