On vCenter server, random ESXi hosts across the clusters are reporting alarm "Unable to apply DRS resource settings on host"
Possible symptoms will be:
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.
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:
Workaround 2: Clear Virtual Machine Memory reservations on ESXi hosts: (Virtual Machine downtime will be required here)
Power-off the respective Virtual Machine with Memory reservations, Reset reservation values to 0 from ESXi host UI.
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 "