I'm running a CentOS 7.4/KVM with an instance of CentOS 6.8 for legacy purposes. I have DHCP for everything on the LAN, all devices, workstations and servers. Using a Verizon FIOS Actiontec router they all show up, except when running CentOS 6.8 as an instance. I have instances on KVM of Ubuntu running and the CentOS 7.4 server shows up without a problem. The router shows that IP address as added to "new-host".
When I ran CentOS 6.8 on the actual hardware before it was retired there was no problem with the hostname showing up.
I do have the DNS set to 192.168.1.1 on the LAN in the KVM, but I'm not successful in getting the CentOS 6.8 instance to have its hostname appear.
Is there something with KVM? I am using a bridge network adapter with virt-manager so all the IP addresses are 192.168.1.X.
I gathered more information and found a workable solution.
At the shell, when you do the ifconfig command there is indeed a eth0 which is assigned an IP address from the router in this network bridge environment for the KVM instance.
However, if you go to /etc/sysconfig/network-scripts there is no ifcfg-eth0 file. There is a ifcfg-lo, but not one for the eth0. No idea why there isn't one there or how it is working on the network and the internet without one.
I did find there is an optional parameter that can be added to the ifcfg-eth0 file for the DHCP hostname. I added the following ifcfg-eth0 file that makes this work, by having the hostname appear in the router and makes is accessible to the rest of the devices on the LAN:
The DHCP_HOSTNAME option as stated in: https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-dhcp-configuring-client.html
DHCP_HOSTNAME — Only use this option if the DHCP server requires the client to specify a hostname before receiving an IP address. (The DHCP server daemon in Red Hat Enterprise Linux does not support this feature.)