IP Address origin always remain unset for linux guests.
Describe the bug
After installing open-vm-tools on a guest os, it is expected that all the guest properties will be populated in vm object on VCenter.
Specifically, properties under guest.net which is of type GuestNicInfo[].
However, for linux vms, the IPAddress origin property always remains unset and this leads to no information regarding if guest is using dhcp or static ip address.
For windows VMs with vmware tools installed, this property gets populated correctly.
Reproduction steps
- Install open-vm-tools on VSphere VM with any linux distribution.
- Expected property is not populated.
Expected behavior
IP address origin should be populated for linux VMs.
Additional context
Same behaviour of empty or unset property is observed from PowerCLI and APIs.
For linux guest, we do not record the origin and status info for the nicinfo. https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/lib/nicInfo/nicInfoPosix.c#L641 https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/lib/nicInfo/nicInfo.c#L440
According for the current guest info api design, these two fields are optional. https://vdc-download.vmware.com/vmwb-repository/dcr-public/790263bc-bd30-48f1-af12-ed36055d718b/e5f17bfc-ecba-40bf-a04f-376bbb11e811/vim.net.IpConfigInfo.IpAddress.html
I filed an enhancement PR to collect the optional 'origin' and 'state' fields if available from the Linux guest.
These two fields are optional information as pointed out by @pengzhencao; there is no expectations the information needs to be consistent across guest OSes.
No guarantee when or if it is possible to implement.