Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Situation:

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.

Goal:

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)

share|improve this question

1 Answer 1

When you clone the VM from a template, one of the options in the Wizard is to rename the clone. One of the options is to name the host the same as the name in the vSphere inventory.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.