duyuyang
Contributor
Contributor

Can SDK for perl execute an ESX service console command: esxcfg-info?

Hi,

I want to get an esx/esxi host's esxcfg-info result from a vMA, can I do that from a SDK for perl script?

Regards,

Shawn

0 Kudos
2 Replies
lamw
Community Manager
Community Manager

So esxcfg-info is not a command that is available from vMA, because the information that it gather is not all available through the vSphere SDK for Perl/VI Perl Toolkit. You can get a subset of that information which is exposed through the API, and it depends on what you're looking for.

Here are two health scripts I wrote for both ESX(i) 3.5 and vSphere ESX(i) 4.0 which gives you an idea of some of the details available through the API:

You can access esxcfg-info by SSHing into the classic ESX hosts that have the traditional Service Console from vMA, but you won't have that with ESXi which does not have the Service Console. For a list of commands that are available with the vCLI, you'll want to take a look at the documentation: http://www.vmware.com/support/developer/vcli/

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

duyuyang
Contributor
Contributor

Thank you again.

If SSHing to ESX service console is not an option, we can not execute esxcfg-info to an ESX host and fetch the output back from vMA, am I right?

I am wondering if vSphere SDK API objects provide such capability. And I badly want to get that full set of host information.

Regards,

Shawn

0 Kudos