Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all articles
Browse latest Browse all 34639

IP address of guest OS (VIX API)

$
0
0

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.


Viewing all articles
Browse latest Browse all 34639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>