Book Image

VMware vCenter Cookbook

By : Kostantin Kuminsky
Book Image

VMware vCenter Cookbook

By: Kostantin Kuminsky

Overview of this book

Table of Contents (15 chapters)
VMware vCenter Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Automating VM placement with VM affinity


The Affinity rules feature is a part of Distributed Resource Scheduler (DRS) described in the Balancing loads between hosts recipe in Chapter 5, Optimizing Resource Usage. This feature allows administrators to control the VM placement on cluster hosts. DRS provides its balancing recommendations or migrates VMs automatically if configured, taking into account all the configured affinity rules.

Two types of affinity rules can be created:

  • VM-to-Host, which controls whether particular groups of VMs can be placed on certain hosts.

  • VM-to-VM, which define whether VMs can be kept together on the same host.

One of the more common use cases for affinity rules is performance considerations when certain resource-intensive VMs should be run only on hosts with enough resources. Another scenario is related to license restrictions. For example, MS SQL virtual machines licensed for two processors should be placed on hosts with no more than two CPUs.

When a cluster is in...