Alarm on ESXi hosts "Unable to apply DRS resource settings on host"
search cancel

Alarm on ESXi hosts "Unable to apply DRS resource settings on host"

book

Article ID: 313924

calendar_today

Updated On:

Products

VMware vSphere ESXi 7.0 VMware vSphere ESXi 8.0 VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

On vCenter server, random ESXi hosts across the clusters are reporting alarm "Unable to apply DRS resource settings on host"

Possible symptoms will be:

  • When Virtual Machine Reservations exist in the environment but not visible on vCenter server.
  • On vCenter server Virtual Machine Memory reservations will be reflecting as "0", but on ESXi hosts Virtual Machine Memory reservations will be visible.
  • Virtual Machine reservation values are grayed out on ESXi host.
  • Alarm persist even after restarting ESXi host management services "/etc/init.d/services.sh restart" or after rebooting ESXi host.

Cause

On vCenter server when you apply Memory reservations to Virtual Machines, when the Virtual Machine is initially powered on with memory reservation a swap file is created of memsize with value sched.mem.min.

And when you reset the reservations back to 0 on vCenter server for the Virtual Machine, this operation fails on ESXi host when minLimit for the Virtual Machines is reached during the runtime.

Here, though the vCenter server shows Memory Reservation value of affected Virtual Machine as "0", but each time this call fails on ESXi host due to minLimit already reached. 

And due to this inconsistency, DRS issues the warning "Unable to apply DRS resource settings on host" on vCenter server.

Resolution

Step 1: Identify the Virtual Machines with Memory reservations using any of the below methods:

Method 1: by directly connecting to ESXi hosts using vSphere Client ( as Memory Reservations will be "0" on vCenter server)

Refer this link to check Virtual Machine reservation values.

Method 2: by browsing *.vmx file of Virtual Machines running on ESXi host (located at /vmfs/volumes/DatastoreName/VirtualMachineDirectoryName/) and look for below values:

/vmfs/volumes/DatastoreName/VirtualMachineDirectoryName/VirtualMachine-Name.vmx:sched.mem.min = "192072"
/vmfs/volumes/DatastoreName/VirtualMachineDirectoryName/VirtualMachine-Name.vmx:sched.mem.minSize = "192072"

 

Step 2: Use any of the below possible workarounds to correct Memory reservations 

Workaround 1: Correct Virtual Machine Memory reservations on vCenter server:

      • Restore/Reapply Memory reservations on vCenter server to match the existing reservations of the affected Virtual Machine. (e.g. If Virtual Machine has sched.mem.min = "1024" in .vmx file then apply the same value on vCenter server for the respective Virtual Machine)
      • This is a viable solution to temporarily address the inconsistency if you cannot afford the Virtual Machine downtime. 

Workaround 2: Clear Virtual Machine Memory reservations on ESXi hosts: (Virtual Machine downtime will be required here)

      • If Memory Reservation values are editable on ESXi hosts:

Power-off the respective Virtual Machine with Memory reservations, Reset reservation values to 0 from ESXi host UI.

      • If Memory Reservation values are grayed out on ESXi hosts:

Power-off the Virtual Machine

Modify .vmx file of the Virtual Machine and change below memory reservation values to "0" (located at /vmfs/volumes/DatastoreName/VirtualMachineDirectoryName/ on ESXi host)

sched.mem.min = "0"
sched.mem.minSize = "0"

Power on the Virtual Machine

 

After executing Step-1 and Step-2, check whether Virtual Machine Memory Reservations values are cleared on ESXi as well as on vCenter.

It will also clear the DRS Error message on Cluster: "Unable to apply DRS resource settings on host "

Additional Information