CentOS 7 VM on Hyper-V losing DHCP assigned address
-
Do I blame integration services for this one? Microsoft has a different line of Integration services that can be installed, but then it breaks the built in package method.
-
This would also be why @scottalanmiller never sees this. I do not believe that he has hyper-v running anywhere with a bunch of CentOS systems on it, that are also using DHCP.
-
@stacksofplates said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
You could also just go back to ntpd. It's still available and might not have the issue. It also has a file under /etc/sysconfig/ntpd where you can set ntpd to update the hw clock.
Looks like
chrony
was actually keeping things good. It was just not catching the weird skew from the hardware good enough. -
I dont have a specific answer for you, but I always seem to have a problem with pool.org ntp servers. So much so that i dont use them anymore.
I use nist servers instead.
time.nist.gov global address for all servers Multiple locations
time-nw.nist.gov 131.107.13.100 Microsoft, Redmond, Washington
There are probably other regional ones nearer to you -
@momurda said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
I dont have a specific answer for you, but I always seem to have a problem with pool.org ntp servers. So much so that i dont use them anymore.
Problem seems to not be with the ntp.org servers. It is the hardware clock seemingly being random as f***.
-
@JaredBusch said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
Look what I found..
grep clock /var/log/messages* /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: Switched to clocksource hyperv_clocksource /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: rtc_cmos 00:00: setting system clock to 2017-02-28 13:17:53 UTC (1488287873) /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: Switched to clocksource hyperv_clocksource_tsc_page
I just noticed the time skew here 1488287873 seconds is the real time, inseconds, since Unix Time began. Is it possibly something wrong with the clock on the hw itself? Battery, something else not easily fixable.
edit: unless the time wasnt actually 00:00 jan 1 1970 when it was changed
edit2: your clock was actually in the future here and set back in time a couple weeks. ignore what i say. -
@momurda said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
@JaredBusch said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
Look what I found..
grep clock /var/log/messages* /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: Switched to clocksource hyperv_clocksource /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: rtc_cmos 00:00: setting system clock to 2017-02-28 13:17:53 UTC (1488287873) /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: Switched to clocksource hyperv_clocksource_tsc_page
I just noticed the time skew here 1488287873 seconds is the real time, inseconds, since Unix Time began.
That is not displaying a skew, that is displaying the time it is setting it to.
-
A little more digging, but no answers yet.
cat /sys/devices/system/clocksource/clocksource0/current_clocksource hyperv_clocksource_tsc_page cat /sys/devices/system/clocksource/clocksource0/available_clocksource hyperv_clocksource_tsc_page hyperv_clocksource acpi_pm
-
@JaredBusch said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
@stacksofplates said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
You could also just go back to ntpd. It's still available and might not have the issue. It also has a file under /etc/sysconfig/ntpd where you can set ntpd to update the hw clock.
Looks like
chrony
was actually keeping things good. It was just not catching the weird skew from the hardware good enough.Ya I have found chronyd to be more reliable than ntpd, but that's anecdotal. I can't say I've seen this happen, but I don't have any Hyper-V servers at all. Even though I don't have DHCP setup (I want to move all of our static stuff to reservations though), I would at least notice because we authenticate to all of the RHEL systems with Kerberos
-
@JaredBusch said in CentOS 7 VM on Hyper-V losing DHCP assigned address:
Look what I found..
grep clock /var/log/messages* /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: Switched to clocksource hyperv_clocksource /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: rtc_cmos 00:00: setting system clock to 2017-02-28 13:17:53 UTC (1488287873) /var/log/messages-20170213:Feb 28 07:17:53 jaredweb kernel: Switched to clocksource hyperv_clocksource_tsc_page
How in the fuck do I fix this?
Time sync from the host has never been enabled. I realize it always gets it at boot and I did reboot last night because I updated the Hyper-V host.
The host also has the correct time.
C:\>time /t 04:03 PM C:\>date /t Mon 02/13/2017 C:\Users\bnaadmin>
Can you remind me again why you will not or can not use the Hypervisor time? Does the time match the host if you actually enable the "Time Synchronization" service?
-
Question: have you tried setting up the DHCP server as the time master, and having the Centos system sync time to the DHCP server (with said DHCP server syncing to NIST or whatever time source you prefer) instead of the NTP Pool? That way theoretically DHCP server and Centos should be at the same time. Just a thought.