I have a DHCP server that issues "hostnames" to virtual machines when they boot up, based on their MAC addresses. It looks something like this:-
host VM01 {
hardware ethernet c0:18:85:e3:13:31;
fixed-address 10.1.1.129;
option domain-name "example.org";
option host-name "VM01";
ddns-hostname "VM01.example.org";
}
This is working fine for my CentOS based VMs, but not for Windows VMs. Any ideas how to fix this?
option host-name
(which is standard DHCP option 12), is ignored by Windows. To my knowledge, there is no way to force Windows to use this name.I have just done a big DHCP migration from infoblox (which uses dhcpd under the hood) to Microsoft DHCP, and this behavior was consistent in both environments.
In fact, what will happen if your DHCP server is doing dynamic DNS updates, is that the Windows client will tell DHCP what its host name is, and DHCP will use that regardless of what the option 12 setting is.