VMware {code} Community
dikang85
Contributor
Contributor

How to get the summary information (like the os, memory, etc) of a VM on the ESX using the visdk4.0?

As per subject.

And I will appreciate it if you can supply some sample code to me.

Thanks

Dikang

0 Kudos
4 Replies
lamw
Community Manager
Community Manager

If you're looking to utilize the vSphere SDK, you won't be extracting this information from within the ESX Service Console, you'll be remotely connecting from either a Linux/Windows system and called from variety of languages (Powershell,Perl,C#, Java, etc.)

If you want to extract this using the Perl bindings (vSphere SDK for Perl), take a look at this vSphere health report which extracts this information:

You'll be able to find the majority of VM information using these two sections:

http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.Summary.html

http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.GuestInfo.html

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

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".

dikang85
Contributor
Contributor

Hi William,

Thank you very much for your help! And do you know where can i find the related java sample code using the vSphere SDK? (I have downloaded the visdk4.0, but have not found any helpful code yet)

Thank you again!

Dikang

0 Kudos
lamw
Community Manager
Community Manager

Take a look at: and http://communities.vmware.com/blogs/DeveloperCenter/2009/07/17/introduction-to-the-vsphere-sdk-vi-sd... which has plenty of samples from the vSphere SDK for Java

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

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".

0 Kudos
arpitmpatel13
Enthusiast
Enthusiast

Hi,

You can also check samples.jar file, which contains number of sample programs for sdk4.

It is located in sdk/samples/Axis/Java directory.

Thanks

0 Kudos