Setting hostname with DHCP options

Issues related to configuring your network
Post Reply
dbharsh
Posts: 1
Joined: 2014/08/20 16:51:20

Setting hostname with DHCP options

Post by dbharsh » 2014/08/20 17:44:48

I'm installing some new XenServer-based VMs using CentOS7 to check it out. The hostname is "kinda" being set - at least our local lan ddns server is being notified because I can use it to ssh into the VMs - but the hostname actually reported by the CentOS7 VM (ie with "hostname" or "hostnamectl") just stays the same as what was set in the Xen template used to create the new VM. I can change it manually after the fact, but that's annoying.

Our dhcpd server is an older CentOS 5 based machine, running for years and successfully updating the hostnames for other VMs via this sort of config for each machine:

host bh-vdw1 {
hardware ethernet 9e:a4:24:e8:90:23;
fixed-address 192.168.1.100;
ddns-hostname "bh-vdw1";
option host-name "bh-vdw1";
}


These same config lines in the dhcpd.conf do successfully set the hostname in the VM when CentOS5 or Ubuntu are started, just not working with CentOS7.

Anything different about a CentOS7 VM taking the "option host-name" I should know about?

Thanks for any comments...

Post Reply