VMware

This Question is Answered

5 Replies Last post: Jun 19, 2009 5:29 AM by Chandrashekhar  

why do ip address of virtual machine is null? posted: Jun 2, 2009 10:06 PM

Click to view Chandrashekhar's profile Enthusiast 53 posts since
Mar 19, 2009
Hi,

I want to know IP address of virtual machine. I am able to get the ip address, but its null for all the virtual machines. How come its null ?

I am getting VM's IP address using following hierarchy :

VirtualMachine -> VirtualMachineSummary -> virtualMachineGuestSummary.getIpAddress()

I tried following hierarchy also :

VirtualMachine -> GuestInfo -> IpAddress.

With both the methods, I am getting IP address as NULL.

Does anyone knows what is the problem?

Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
This information is only available if the VM has VMware Tools installed, make sure you have the latest tools installed else this information will not be available.

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

Click to view stumpr's profile Expert 451 posts since
Sep 26, 2007
Without the VMware Tools, VMware has no information on the Operating System configuration. Once you install the VMware Tools, you can get information regarding the network, disks, etc.
Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
I'm sure there is a document somewhere stating this information, but its a known fact that information such as this will not be available w/o VMware Tools.

The only thing I can find with a quick search on the net is: http://itknowledgeexchange.techtarget.com/virtualization-pro/vmware-tools-faq/

Do I lose out on any other functionality if I don’t install VMware Tools?
When using the VMware Infrastructure Client without VMware Tools some of the information such as IP address will not be available.

VMware Tools allows for it to access some guest attributes, so without tools it will not be able to extract some of this information and will not be accessible through the API's.


=========================================================================
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