0

I want to scan and view information about ESX hosts which have "ESXi 5.0 Update 1" as their OS inside my asp.net web application. mainly to be able to retrieve the ESX specification and all the vms that are inside the ESX. where all the VMs are windows and unix based.

now currently we can do this using PowerCLI application, where I can view the ESX host info + all the VMs it contain directly inside the PowerCLI application. but I need to be able to read these info programmatically inside my asp.net web application, and store them inside our own database. now seems there are two main approaches that allow me to scan ESX hosts from my asp.net :-

  • Using asp.net WMI.

OR

  • Integrating with the PowerCLI, either using any available API (not sure if powercli provides any API) OR by directly executing powerCLI scripts from my asp.net web application..

so can anyone advice which approach is preferred ? and are there specific prons/cons or limitation for each approach ?

I am trying to do these 2 main functions:-

  • the ability to scan ESX using IP or name.
  • after the scan is completed to be able to programmatically read the ESX info and the VM names it contain...

Thanks in advance for any help.

3
  • Do you have a vCenter server, or just standalone ESXi hosts?
    – GregL
    Aug 4, 2015 at 12:03
  • @GregL we have a vCenter server...
    – John John
    Aug 4, 2015 at 12:50
  • Good, then follow the thinking of Helvick's answer below.
    – GregL
    Aug 4, 2015 at 12:59

1 Answer 1

1

What you are looking for is called the vSphere API. You can find the documentation for Version 5 of the API here.

5
  • Actually, that link you provided is for the 5.1 API. The 5.0 one is here. They're probably the same, but maybe not.
    – GregL
    Aug 4, 2015 at 11:58
  • 1
    Good point, I edited the answer to point to the v5.0 API documents.
    – Helvick
    Aug 4, 2015 at 12:28
  • @Helvick thanks a lot for the help, I think this is what I am looing for . so I can using the API to send http request to query certain ESXi host and get it info , is this correct? second question since we already have PowerCLI application installed on one of our servers and we can view the ESX info, so I do not need to install the PowerCLI inside my asp.net host server (the server where the asp.net web application is hosted using IIS )....?
    – John John
    Aug 4, 2015 at 12:54
  • 1
    Shouldn't need to, provided you've got a development platform that can work with the API. You will need to read the SDK docs to see how to setup your development environment so you can then make calls to the API inside you application.
    – Helvick
    Aug 4, 2015 at 13:54
  • @Helvick seems it does not provide a modern http API. where for example I can call the API using a web browser and display the result either xml or json. seems it provide an SDK which is called using SOAP..
    – John John
    Aug 4, 2015 at 14:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .