"Unable to apply DRS resource settings on host" reported on the host summary page due to "invalidProperty=spec.memoryAllocation.reservation"
search cancel

"Unable to apply DRS resource settings on host" reported on the host summary page due to "invalidProperty=spec.memoryAllocation.reservation"

book

Article ID: 433311

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • ESXi hosts in the cluster reporting "Unable to apply DRS resource settings on host. This can significantly reduce the effectiveness of DRS"
  • Issue is limited to Tanzu/Workload enabled cluster
  • journalctl on vCenter server:

journalctl -xe | grep -i <ESXi hostname>

MM DD TT:MM:SS <vCenter Server FQDN> vpxd[PID]: Event [<event ID>] [1-1] [YYYY-MM-DDTHH:MM:SS] [vim.event.DrsResourceConfigureFailedEvent] [error] [] [Datacenter] [<event ID>] [Unable to apply DRS resource settings on host <esxi FQDN> in <datacenter name>. A specified parameter was not correct: spec.memoryAllocation.reservation. This can significantly reduce the effectiveness of DRS.]

  • /var/log/hostd.log:

YYYY-MM-DDTHH:MM:SS In(166) Hostd[PID]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<datastore UUID>/<tanzu machine name>/<tanzu machine name>.vmx opID=HB-SpecSync-host-<host ID>@####-12631eac-d7-#### sid=######## user=vpxuser:<no user>] Invalid memory reservation spec 32 while locked

YYYY-MM-DDTHH:MM:SS In(166) Hostd[PID]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<datastore UUID>/<tanzu machine name>/<tanzu machine name>.vmx opID=HB-SpecSync-host-<host ID>@####-12631eac-d7-#### sid=######## user=vpxuser:<no user>] State Transition (VM_STATE_RECONFIGURING -> VM_STATE_ON)
YYYY-MM-DDTHH:MM:SS Wa(164) Hostd[PID]: [Originator@6876 sub=Hostsvc.ResourcePool pool22 opID=HB-SpecSync-<host ID>@####-12631eac-d7-#### sid=######## user=vpxuser:<no user>] UpdateChildResourceConfiguration: N5Vmomi5Fault15InvalidArgument9ExceptionE(Fault cause: vmodl.fault.InvalidArgument
YYYY-MM-DDTHH:MM:SS In(166) Hostd[<PID>]: --> (vmodl.fault.InvalidArgument) {
YYYY-MM-DDTHH:MM:SSIn(166) Hostd[<PID>]: -->    invalidProperty = "spec.memoryAllocation.reservation",

Cause

The error occurs when a reduction in memory reservation fails at the host level but is recorded as a success by vCenter Server during VM power-on operation. This desynchronization typically happens when All Guest Memory is reserved, the associated swap file adjustment fails due to host-side memory constraints leaving the ESXi host and VCSA reporting an inconsistent state regarding the VM’s resource specifications.

The same can be validated from the vmx file using the below

  • Log in to the ESXi using ssh
  • Navigate to the reported VM path from hostd log

cd vmfs/volumes/<datastore UUID>/<tanzu machine name>/

  • List the memory configuration

grep mem "<tanzu machine name>.vmx"

memSize = "131072"
sched.mem.min = "131072"
sched.mem.minSize = "131072"
sched.mem.shares = "normal"
sched.mem.pin = "TRUE"

The above output will have the value for memSize,sched.mem.min & sched.mem.minSize as equal with sched.mem.pin being TRUE

Resolution

The memory pinning for the Tanzu machines are set via the virtualmachineclass and reconfiguring the same would apply to all the new machines attached to the machine class.

Note: Editing a VM class does not result in automatic reconfiguring of the VMs that were previously deployed from this class. If you scale out a TKG
cluster after editing a VM class used by that cluster, new cluster nodes use the updated class definition, but existing cluster nodes continue to use the initial class definition. Refer to Scale a Workload Cluster 

In order to modify the virtualmachineclass, refer to the steps below:

  1. Identify the virtual machine class & Namespace from the "VM Details" tile on the Summary page
  2. Click the Hamburger icon -> Workload Management
  3. Navigate to Services tab on the right pane
  4. Under VM Service click Manage
  5. Navigate to VM Classes under VM Service
  6. Select the virtualmachineclass from "VM Classes” and click MANAGE -> EDIT
  7. Click Next till the Configuration page
  8. Expand the Memory and uncheck “Reserve all guest memory (All locked)”
  9. Procced to update and save the configuration