How can I read the paramater called
displayName in the .vmx file or "Virtual Machine Name" in vSphere Client from within the VM. If this is possible with vmtoolsd I haven't found it yet.
I have CentOS6 virtual machine templates running under VMware ESXi 5.1. They will get an IP from DHCP when they first come up by randomly generating the last half of the MAC address. However they always have the hostname set as it was when the template was created.
Synchronize virtual machine's hostname (and thus the name it registers in DHCP/DNS) with the name displayed in the vSphere Console.
(If there is a different or better way to get to this goal, that's just as good)