3

We're building an environment in which VMs are automatically deployed. We need the VM its hostname to be identical to the VM name in vSphere (which is randomly being created). Is there a way to retrieve the vSphere/vCenter VM name from within the VM itself?

For now we're testing on Linux VMs, but eventually we'll also be deploying Windows Server VMs. VMwaretools is installed on the VMs.

tvlieg
  • 31

1 Answers1

3

It depends on how your VM's are being deployed, but you can use a Customization Specification to automatically set many options, including the hostname. One of the options is to set the hostname equal to the VM name.

screenshot

D34DM347
  • 1,471