I'm assuming you mean from the server.
So I finally figured this out, but with some problems.
1- I have to have vmware tools installed on the VM's I want to check
2- I have to install the vmware viperl package
/usr/lib/vmware-viperl/apps/vm/vminfo.pl --url
http://target-host-server/sdk/vimService --username root --password passwd ipaddress"
this will return the VM's machine hostname, IP and the label in the GUI.
However, on some servers (3 out of 25), it fails. (I use the same image of SLES to install all my servers, and the same VM image for all VM's), and I'm very confused as to what this error is trying to tell me:
Can't locate object method "deserialize" via package "VirtualMachineVMCIDevice" (perhaps you forgot to load "VirtualMachineVMCIDevice"?) at /usr/lib/perl5/site_perl/5.8.8/VMware/VICommon.pm line 1799, <STDIN> line 2.
All servers use VMware server 2.0 with the same vmware-viperl package that I just downloaded a couple days ago.
Any ideas?
Cheers