VM placement enforcement on ESXi host groups during initial deployment
search cancel

VM placement enforcement on ESXi host groups during initial deployment

book

Article ID: 442116

calendar_today

Updated On:

Products

VMware Cloud Director VMware Telco Cloud Platform VMware Telco Cloud Infrastructure

Issue/Introduction

  • Need to deploy new VMs or VNFs to be automatically instantiated directly onto a dedicated subset of ESXi hosts during the initial deployment phase.
  • Want to avoid post-power-on cluster-wide DRS placement vMotion migrations to satisfy affinity rules
  • Configure placement policy for newly deployed VMs during an automated deployment workflow initiated by CBAM

Environment

vCD: 10.4

TCP: 4.0

TCI: 3.0

Cause

  • Standard vSphere DRS affinity rules are often evaluated as a corrective measure after a VM has already been placed.
  • To ensure "placement at birth," the cloud management layer (vCD) must associate the VM with a DRS group at the moment of registration in vCenter.

Resolution

  1. In vSphere:
    1. Create an ESXi Host Group containing the subset of servers dedicated to these workloads.

    2. Create a DRS VM Group (this acts as a dynamic membership placeholder).

    3. Create a "Virtual Machines to Hosts" DRS rule linking the VM Group to the Host Group. Use "Must run on hosts in group" for strict hardware enforcement, or "Should run on hosts in group" for flexible deployment.

  2. In vCD:
    1. Create a Provider VDC Compute Policy and map it directly to the exact name string of the vSphere DRS VM Group.

    2. Publish this policy to the target Organization VDC where the workloads will reside. It can be set as the default policy for that Org VDC to enforce automated inheritance.

  3. In CBAM:

    1. Include the specific vCD Compute Policy reference (URN/href) within the API deployment payload (instantiateVAppTemplate or recomposeVApp) executed by CBAM.

    2. Upon receiving the instruction, vCD registers the new virtual machine inside the underlying vSphere DRS VM Group prior to initial power-on. Consequently, vSphere DRS evaluates the VM-to-Host affinity rule during the initial placement algorithm, booting the workload directly on the designated host subset.

  • Upon receiving the instruction, vCD registers the new virtual machine inside the underlying vSphere DRS VM Group prior to initial power-on.
  • Consequently, vSphere DRS evaluates the VM-to-Host affinity rule during the initial placement algorithm.

Additional Information