I looked and looked but probably overlooked . I have a vsphere cloud with over 300 virtual machines. Each machine name as it appears in the vsphere client is actually the hostname of each machine (I have done this manually). Those machines sometimes have to change their hostname. At this time I hope there is a way to obtain/get/read the guest machine name from the machine itself, and then if there is a mismatch, then I'll know and modify the machine name when needed.
vmware-toolbox-cmd or other tool (from the linux
open-vm-tools) can retrieve that info, the machine name ?
Let's take an example. I have a vm machine with it;s hostname a22.test.com I can ssh onto that machine. But on the vsphere it's name is b34.test2.com or some other name. And I have 300+ machines in this mismatched state. A vm name does not correspond to the hostname.