No alert mechanism to notify users when the memory guaranteed reservation allocation exceeds the available resources in VCD
search cancel

No alert mechanism to notify users when the memory guaranteed reservation allocation exceeds the available resources in VCD

book

Article ID: 383899

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When FLEX allocation is used with 100% memory guaranteed in an OVDC, all VMs will consume the full guaranteed memory. If memory runs out, new VMs won't power on.
  • The user is unaware of potential resource allocation mismatches or non-compliance issues until they explicitly modify the reservation, rather than being proactively alerted when the reservation exceeds available resources or when the VM is non-compliant.

Environment

VMware Cloud Director (VCD) 10.x

Cause

This behavior is likely due to the system not continuously monitoring the reservation compliance unless a configuration change occurs.

Resolution

Resolution:

  • Currently, there is no fix available for this issue. It is planned to be addressed in the next release.

Workaround:

  • You can run an API call on each VM to check for compliance with the new memory allocation policy.
  • Use the following API to check if a VM is compliant with the policy: 

POST https://<vcd-url>/api/vApp/vm-<id>/action/checkComputePolicyCompliance

  • You will receive a prompt to make the VM compliant.
  • Click "Make compliant", the compliance action will be successfully applied.

For large environments, writing an automation script will be the most efficient solution. To automate the process, follow these steps:

  • Fetch the List of VMs:
  • Query each VM to check for compliance by making the following API call:

POST https://<vcd-url>/api/vApp/vm-<id>/action/checkComputePolicyCompliance

  • Check Compliance:
  • For each VM, check the compliance status by looking for "checkComputePolicyCompliance" in the API response.
  • If a VM is non-compliant, trigger the reapplyComputePolicy API to apply the policy:

POST https://<vcd-url>/api/vApp/vm-<vm-id>/action/reapplyComputePolicy

  • After performing the POST request, respective VM users will start receiving the compliance alert.