Using Powercli to create a NUMA report for your VMware clusters

NUMA has been a big topic recently. I've run into issues with VM's being oversized and not fitting into a NUMA node. So I found the need to be able to know what the NUMA Architecture was for the host in different vsphere clusters. Then I would also like to know if there are any VM's in the cluster that do not fit into a NUMA node either by CPU or RAM. I did some research online and ran across a script that someone had written. so before I go any further I want to be sure to give credit where credit is due. The bulk of this script I found on this site http://ymmit.net/2017/09/06/powercli-numa-report/

After downloading a copy of the script I began to experiment with the code. the output was not quite what I was looking for and I wanted to add more detail. Lets go through the updated script;

The script starts with getting the vCenter information and connecting.

Next the script goes through each cluster and gathers information.

After the cluster info is gathered the script goes through each VM to check and see if the VM fits into the cluster NUMA architecture, if the VM does not fit into a NUMA node it will report the VM by either a Memory over-commit, a CPU over-commit, or both.

Once this part is complete, the reporting process begins. there is a foreach loop here to go through all the clusters and VM's in the vCenter. Here is what the output looks like. Right now the output is just on the screen. The script can very easily be changed to outpu to a CSV.

I am also working taking this script and using the powershell module PScribo to have a report that is very nice looking. this way it could be presented to a Customer if the need should arise, or as part of a documentation set.

Here is a link to the current script, feel free to use it and modify if necessary.

https://github.com/shanermoore/scripts/blob/master/NUMAReport.ps1

Enjoy! Once the PScribo version is ready I will update the blog post with the new information.