Nutanix AHV VM Reporting Via REST API Version 1.1

A while ago I published a blog post that includes a script you can use to create Nutanix AHV VM reports. The blog post can be found here. Now it’s time for version 1.1 and it comes with additional VM information to make ย  it more useful. The new metrics included are:

  • Remote Protection Domain Snapshots
  • Volume Groups
    • Number of VGs
    • VG Names
    • VG Disk Allocated GB

This means the following information will be included for all your AHV based VMs:

  • 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ย or just copy and paste the script from this blog post you need to change the following parameters to make it work in your environment:

  • directory=”/Users/magander/Documents/script/REST”
  • clusterfqdn=”my.fqdn.com”
  • user=”scriptuser”
  • passwd=”Compl8!xPWD”

The script has been tested on AOS 5.1.3 and AHV20160925.90 and from a few versions of MaxOS and a few Linux OS:es as well. It works with MacBook regional settings set to Swedish as well ๐Ÿ™‚

Next improvement will be to change the script from a bash one to python….

Please provide feedback for improvements if you have any suggestion.