[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dhclient keeps sending old hostname



I have a kvm virtual machine whose disk was initially a copy of another
virtual machine.  The original machine's hostname was vm-lenny00. I
changed the new machine to vm-migrate07
in /etc/hostname, /etc/hosts, /etc/dhcp3/dhclient.conf (send host-name
"vm-migrate07";), /etc/dhcp/dhclient.conf, and other places (e.g., mail
and backup system).  I tried several reboots of the vm, although it is
possible I have only edited some of those files since the last reboot.
In particular, /etc/dhcp/dhclient.conf is a recent change.

The new vm has had a distinct MAC address from the start.

dnsmasq on my host (lenny) system continues to report
Jun 20 23:46:48 markov dnsmasq[4243]: DHCPREQUEST(tap0) 192.168.8.88 52:54:a0:12:07:01
Jun 20 23:46:48 markov dnsmasq[4243]: DHCPACK(tap0) 192.168.8.88 52:54:a0:12:07:01 vm-lenny00
This is a mess, since the real vm-lenny00 is also talking (below is from
a reboot of that vm):
Jun 20 23:30:32 markov dnsmasq[4243]: DHCPRELEASE(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPDISCOVER(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPOFFER(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPREQUEST(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPACK(tap0) 192.168.8.140 52:54:a0:12:01:01 vm-lenny00

/var/lib/dhcp/dhclient-xxxxx-eth0.lease (on vm-migrate07) shows only
entries on with
  option host-name "vm-lenny00";

Since I'm accessing the vm via ssh I'm reluctant to bring networking
down.  I do have vnc setup if necessary.  Since I'm in the middle of an
upgrade, I'm also reluctant to restart the vm.  At one point after the
upgrade the disk filled.

I used the vm to test upgrade to squeeze, and so it is now basically
running squeeze.  I tried to reset the name (and did reboots) before the
upgrade.  vm-migrate07 has network-manager installed, and it appears the
both the old (dhcp3) and new (dhcp) clients are running:
# ps -Alc | grep dhc
5 S     0  1052     1 TS   19 -  1593 -      ?        00:00:00 dhclient3
4 S     0 12286 12276 TS   19 -  1687 -      ?        00:00:00 dhclient

# netstat -nlp | grep dhc
udp        0      0 0.0.0.0:68              0.0.0.0:*                           12286/dhclient
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1052/dhclient3

So I'm not entirely sure who is in control.  I assume the vm-lenny00
name in the dnsmasq exchanges is coming from the client, but perhaps
it's not.

I tried using omshell on the vm to  talk to dhclient, but it says
"dhcpctl_connect: no more" when I try to connect.  The docs don't
indicate any way to signal it to re-read its configuration file.

How can I fix the name of the system?

Thanks for any assistance.
Ross




Reply to: