Virtual Machine CPU RDY Alarm – PowerCLI Script
As I know and I have read it in many blogs that DRS is not sensitive to CPU ready time and when your cluster has enough CPU frequency and memory, cluster is balanced. There is a simple solution to resolve the issue or reduce the issue in your environment. Of course, this is not true solution and you need to analyze your platform, calculate your requirements especially CPU cores for your VMs and add more physical cores to by adding more physical servers.
At first step, you need to define an alarm in your vCenter for virtual machine CPU ready:
- Create a user-defined alarm and enter a name as you wish.
- In Triggers tab, select “VM CPU Ready Time (ms) and define waning and error values and condition length. Default values are fine for most platforms.
- Just that, click on OK and our job is done.
- If you have virtual machines with high CPU ready, it will be detected by vCenter and alarm will be generated.
Note: Please copy your alarm name and paste it in the below script. Also you can change exception time, if you need to run it after working hours.