ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    CentOS 7 VM on Hyper-V losing DHCP assigned address

    IT Discussion
    centos 7 dhcp failed hyper-v chrony
    8
    60
    13.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by JaredBusch

      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.

      1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch @stacksofplates
        last edited by

        @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.

        stacksofplatesS 1 Reply Last reply Reply Quote 1
        • momurdaM
          momurda
          last edited by

          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

          JaredBuschJ 1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @momurda
            last edited by gjacobse

            @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***.

            1 Reply Last reply Reply Quote 0
            • momurdaM
              momurda
              last edited by momurda

              @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.

              JaredBuschJ 1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @momurda
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch
                  last edited by

                  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
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • stacksofplatesS
                    stacksofplates @JaredBusch
                    last edited by

                    @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

                    1 Reply Last reply Reply Quote 0
                    • ObsolesceO
                      Obsolesce @JaredBusch
                      last edited by

                      @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>
                      

                      0_1487023176288_upload-dcf7870a-69c7-4de9-a003-cc359b10a384

                      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?

                      1 Reply Last reply Reply Quote 0
                      • jt1001001J
                        jt1001001
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 3 / 3
                        • First post
                          Last post