VMware

This Question is Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
2 Replies Last post: Jul 4, 2009 7:05 PM by duyuyang  

Can SDK for perl execute an ESX service console command: esxcfg-info? posted: Jul 4, 2009 6:42 PM

Click to view duyuyang's profile Novice 16 posts since
Jul 4, 2009
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
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
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:
VMware Health Check Report v0.9.4
VMware vSphere Health Check Report v1.2

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: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
http://twitter.com/lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

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

Developer Social Media

Communities