Nutanix-tools-for-AHV v1.2 | Nutanix Community
Skip to main content
Hello, I want to share a development in python to collect information from the Nutanix cluster with AHV, very similar to an RVTOOLS. I have it published in Github. I hope you find it useful. Any questions or queries can write to dlira96@gmail.com



https://github.com/dlira2/Nutanix-tools-for-AHV



Example running :





Example INFO:

Summary



VMINFO :



And lot more info




  • SUMMARY
  • VM INFO with Prism Central info ( Project )
  • VM DISK INFO
  • VM NETWORK
  • STORAGE CONTAINER
  • HOST AHV
  • VOLUME GROUP
  • VDISK INFO
  • IMAGE



The name of the file for the output of the script is something like this: NTNX_VM_INFO_PE_(ST-NTNX-01)_DATE_(11_04_2019_17_12HRS).xlsx
Could you help me, I receive below error when try to login, i am sure username and password is correct.



Nutanix tools for AHV v1.7

Prism-Element-IP: 10.10.208.120

Username: admin



Warning (from warnings module):

File "C:\Users\gamalaa\AppData\Local\Programs\Python\Python37-32\lib\getpass.py", line 100

return fallback_getpass(prompt, stream)

GetPassWarning: Can not control echo on the terminal.

Warning: Password input may be echoed.



Password: *****************



Error: HTTPSConnectionPool(host='10.10.208.120', port=9440): Max retries exceeded with url: /PrismGateway/services/rest/v2.0/vms/?include_vm_disk_config=true&include_vm_nic_config=true (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Tunnel or SSL Forbidden')))

Login Failed to API V2, Bad Password , Bad IP/FQDN Prism Element or networks problems. Run again the script
You have problem with your terminal



GetPassWarning: Can not control echo on the terminal.

Warning: Password input may be echoed.



Try on Linux, i can help you better arround 17:00hrs from Chile.
Thanks Dlira for your support,



Now i can connect successfully to prism after open ports on firewall, but unfortunately face below error after connect :



Prism-Central-IP: 10.10.208.120

Prism Central has same user/password Prism Element?('y' , 'n'):y



##########################################

Prism Central URL https://10.10.208.120:9440

##########################################

Login Succesfully API V3 on Prism Central

Cluster Name : spt-nutx-clu01

Version AOS : 5.10.0.2

Total VM in Prism Central : 44

Total VM in Prism Element : 44

Recollecting VM info

Please wait....



Traceback (most recent call last):

File "C:\Users\Ahmed\Desktop\NUTANIX_TOOLS_FOR_AHV_v1.7.py", line 663, in

row_last,raw_last = vminfodef()

File "C:\Users\Ahmed\Desktop\NUTANIX_TOOLS_FOR_AHV_v1.7.py", line 521, in vminfodef

if metadata == "ok" and proyect_reference == "ok" and project['spec']['name'] == vm[0]:

UnboundLocalError: local variable 'proyect_reference' referenced before assignment
Hi, Try V1. 6 is more steable



I'll check that error when I have time
Hi Gamalaa,



Try again with version 1.7.1



https://github.com/dlira2/Nutanix-tools-for-AHV/blob/master/NUTANIX_TOOLS_FOR_AHV_v1.7.1.py


Thanks dlira Too Much For Your Prompt Support, It Is Done Now.



##########################################

Prism Central URL https://10.10.208.120:9440

##########################################

Login Succesfully API V3 on Prism Central

Cluster Name : spt-nutx-clu01

Version AOS : 5.10.0.2

Total VM in Prism Central : 44

Total VM in Prism Element : 44

Recollecting VM info

Please wait....

File :

NTNX_VM_INFO_PE_PC(spt-nutx-clu01)_DATE_(14_05_2019_12_45HRS).xlsx saved on C:/Users/Ahmed/Desktop/new/

Enjoy :)

--- 54.750678300857544 seconds ---
Nice, please leave a feedback in my github.



Thanks
Hi,



A great looking tool but can't get it working. From the logs it says:



Timeout in seconds: 120

local variable 'pe_success_login' referenced before assignment



And comes back saying its done but its getting stuck at that point. This is just one cluster without Prism. I've doubled checked my login details etc.



Any ideas?



Thanks,



Peter
Hi,



A great looking tool but can't get it working. From the logs it says:



Timeout in seconds: 120

local variable 'pe_success_login' referenced before assignment



And comes back saying its done but its getting stuck at that point. This is just one cluster without Prism. I've doubled checked my login details etc.



Any ideas?



Thanks,



Peter




Hi,



Please download the latest version :



https://www.dlisoft.com/



If you have a error you can send me the log file to my email , dlira96@gmail.com

Got it working with help from Dlira - I wasn’t running it as a Nutanix admin :sunglasses: The export then worked perfectly - thank you for a great tool.


Hi,

A great looking tool but can't get it working. From the logs it says:

Timeout in seconds: 120
local variable 'pe_success_login' referenced before assignment

And comes back saying its done but its getting stuck at that point. This is just one cluster without Prism. I've doubled checked my login details etc.

Any ideas?

Thanks,

Peter

 


Hi,

Please download the latest version :

https://www.dlisoft.com/

If you have a error you can send me the log file to my email , dlira96@gmail.com

 



I am having the same issue as Peter… Entered correct IP address and credentials and getting the same error.


 

The user must have the following privileges.

 

 The user must have the following privileges.

I verified this just now and ran again.  User has full rights.  And still get the same error.  

We do not have Prism central.  See attached screenshot below. 

 


 

 The user must have the following privileges.

I verified this just now and ran again.  User has full rights.  And still get the same error.  

We do not have Prism central.  See attached screenshot below. 

 

Please,

Open log file “menu → log file” and send me.

Maybe you have problem with timeout.


 

 The user must have the following privileges.

I verified this just now and ran again.  User has full rights.  And still get the same error.  

We do not have Prism central.  See attached screenshot below. 

 

Please,

Open log file “menu → log file” and send me.

Maybe you have problem with timeout.

Posted log file in reply back… awaiting approval it said


 

 The user must have the following privileges.

I verified this just now and ran again.  User has full rights.  And still get the same error.  

We do not have Prism central.  See attached screenshot below. 

 

Please,

Open log file “menu → log file” and send me.

Maybe you have problem with timeout.

Posted log file in reply back… awaiting approval it said

Send log to my email,

dlira96@gmail.com