Daniel Moreira
Daniel Moreira

Reputation: 31

Vsphere API Script for getting Information

I am playing with the vSphere API and it worked good over the Web Interface, now I would like to write a Python Script that communicates with the API and give me some answers to my question like how many VM´s do I have in my Environment or which VM is currently running, for that I need to pass my Username and password to enter the vCenter, and ask the vCenter this questions, have somebody already did it this? and have the code for me or somebody a idea for fixing this problem?

Upvotes: 3

Views: 5743

Answers (1)

Kyle Ruddy
Kyle Ruddy

Reputation: 2121

Are you using an SDK to connect to the vCenter server?

Here's a sample to use Python to interact directly with the REST service, instead of an SDK: https://blog.dchidell.com/2016/11/23/vcenter-6-5-rest-api-w-python/

Upvotes: 2

Related Questions