Understanding the LimitVMsPerESXHost Parameter in vSphere DRS
One of the common concerns when managing vSphere DRS is the lack of resources available to power on new virtual machines in case of host failures. However, what if there are sufficient resources available, but still cannot start a new virtual machine with an error message such as “DRS cannot find a host to power on or migrate the virtual Machine / Insufficient resources”? This article explores the reasons behind this issue and how to resolve it.
The Cause of the Issue
After researching the vSphere documentation and various blogs, I found that starting from vSphere 5.1, the DRS and HA teams included an advanced parameter that limits the maximum number of virtual machines that a host can have when DRS is enabled. This parameter is called LimitVMsPerESXHost. Although DRS does not and cannot provide equal distribution of virtual machines among hosts, this feature helps minimize the impact of host failures in cases where one host has many more virtual machines than others.
The Solution
In my scenario, I found that the LimitVMsPerESXHost parameter was set to 50, which limited the maximum number of virtual machines per host to 50. This was the reason why the virtual machine could not power on with the error message “DRS cannot find a host to power on or migrate the virtual Machine / Insufficient resources,” even though there were sufficient resources available. Once I modified the value to 60, the virtual machine successfully powered on without any issues.
The Takeaway
If there is no specific requirement to limit the number of virtual machines per host, it is recommended not to use this parameter. With this feature enabled, DRS will not perform migrations to a host that has reached the specified limit or prevent new virtual machines from being powered on, and in some cases, affect the performance of the machines by limiting the native resource balancing mechanism of DRS.
Conclusion
In conclusion, the LimitVMsPerESXHost parameter is a useful feature in vSphere DRS that helps minimize the impact of host failures by limiting the number of virtual machines per host. However, it should only be used if there is a specific requirement to do so, and not as a default setting. By understanding this feature and how it works, vSphere administrators can better manage their virtualized infrastructure and ensure optimal performance and availability.