Is there a way to figure out the IP address of guest OS in the VM, using VIX API. I did notice in a couple of discussion threads, mention of trying to read VM specific variables using VixVM_ReadVariable method call as:
jobHandle = VixVM_ReadVariable(vmHandle,
VIX_VM_GUEST_VARIABLE,
"ip", // Name of IP address variable supposed to be populated by VMWare Tools
0, // options
NULL, // callbackProc
NULL); // clientData);
err = VixJob_Wait(jobHandle,
VIX_PROPERTY_JOB_RESULT_VM_VARIABLE_STRING,
&readValue,
VIX_PROPERTY_NONE);
readValue gets populated with the IP address (or so it claims) I tried this, but the readValue always shows an empty string ""
Is there a reliable way to retrieve the IP address of the ethernet adaptor on the VM. Help would be appreciated.