Nutanix AHV VM Reporting Via REST API Version 2.0

So this will be the third release, version 2.0, of the AHV VM Reporting script using Nutanix REST API. You might be aware of that Nutanix moved Self Service Portal functionality from Prism Element (management of single Nutanix cluster) to Prism Central which can manage many Nutanix clusters (PEs) in AOS version 5.5.

What you need to do is decide if you want to include “Self Service Portal Project” and “Self Service Portal VM Owner” information in the script output.

It is controlled in the beginning of the script via the below section meaning you specify Y or N and if you want the information you also provide PC information:

# Is Prism central in use. Available options are Y and N

This means the script still includes the following metrics:

  • VM Name
  • Total Number of vCPUs
  • Number of CPUs
  • Number of Cores per vCPU
  • Memory GB
  • Disk Usage GB (not including CD-ROM)
  • Disk Allocated GB (not including CD-ROM)
  • Number of VGs
  • VG Names
  • VG Disk Allocated GB
  • Flash Mode Enabled
  • AHV Snapshots
  • Local Protection Domain Snapshots
  • Remote Protection Domain Snapshots
  • IP Address/IP Addresses
  • Network Placement
  • AHV Host placement
  • Self Service Portal Project
  • Self Service Portal VM Owner

Sample output from the script after some excel magic 🙂

After downloading the script from My GitHub Reporting Repository  you need to change the following parameters to make it work in your environment:

  • directory=”/Users/magander/Documents/script/REST”
  • clusterfqdn=”pe.fqdn.com”
  • user=”scriptuser”
  • passwd=”Compl8!xPWD”
  • pcinuse=”y”
  • pcfqdn=”pc.fqdn.com”
  • pcuser=”scriptuser”
  • pcpasswd=”Compl8!xPWD”The script has been tested on AOS and AHV 20170830.48 and from a few versions of MaxOS and a few Linux OS:es. It works with MacBook regional settings set to Swedish as well 🙂

In addition to the above versions Frederic Lhoest has confirmed the works for Nutanix CE version 2017.12.12 as well. Tnx Frederic.

Feel free to provide feedback for improvements if you have any suggestion.

9 pings

Skip to comment form

Comments have been disabled.