kallischlauch
Enthusiast
Enthusiast

Guest OS customization - hostname added "-0"

hey everyone,

came across something I never saw before.

customization script is set to change the os hostname to whatever the VMname is.

today we had a VM, that instead of hostname3B it ended up as hostname3-0 (last letter removed and -0 added.

our automation script did everything else correctly: vm-name ok, dns entry ok, cno ok ... why would guest cusztomization decide to change the hostname (add this suffix?)

i checked sysprep log in windows\Panther and that set it to this weird hostname, but it seems it was instructed by it as the unattend.xml showed as such (see computername)

pastedImage_1.png

thanks for any ideas

Tags (1)
0 Kudos
3 Replies

Check the customization specification and make sure that the below check box is cleared.

Append a numeric value to ensure uniqueness

-------------------------------------------------------------------------------------
Davoud Teimouri - https://www.teimouri.net - Twitter: @davoud_teimouri Facebook: https://www.facebook.com/teimouri.net/
0 Kudos
Victorep
Contributor
Contributor

I have the same problem while using powercli to deploy a new VM with OS Customisaitons. The Vm name itself is fine but the OS name has -0 at the end. The option to append a number at the end is not available as Use vm name option is ticked in the OS customisation/COmputer name section. Also this happens randomly, some VMs were named correctly on same cluster, same datastore etc.

0 Kudos
mguidini
Enthusiast
Enthusiast

Check this thread might help you: Linux hostname issue

The person in that thread resolved by doing the following:

""I worked around this by substituting "-NamingScheme "Fixed" -NamingPrefix "$VMName""

As a troubleshooting step he also tried to use the wizard instead of the script and it worked fine.

0 Kudos