locked
RedHat Enterprise 5.4 Clock running fast under Hyper-V 2K8 R2 RRS feed

  • Question

  • The title says it all.  We have done everything we can think of at the guest level.   We have not been able to locate much information on the issue.  Does any one have any ideas or fixes?

     

    Thank you

    Sunday, March 28, 2010 6:10 PM

Answers

  • Set up an NTP time sync within your virtual machine.
    • Edited by John Paul Cook Tuesday, March 30, 2010 12:20 PM fix typo
    • Marked as answer by Vincent Hu Thursday, April 8, 2010 5:40 AM
    Sunday, March 28, 2010 6:23 PM

All replies

  • Set up an NTP time sync within your virtual machine.
    • Edited by John Paul Cook Tuesday, March 30, 2010 12:20 PM fix typo
    • Marked as answer by Vincent Hu Thursday, April 8, 2010 5:40 AM
    Sunday, March 28, 2010 6:23 PM
  • Monday, March 29, 2010 11:04 AM
  • Disable the Windows Time service from the Services control panel in the guest machine. If you have any other clock synchronization tools in the guest machine, disable them. After that, select the "Time Synchronization" of the Integration Services and reboot the guest machine.

     

    From


    http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/d4d65433-8da6-4e67-8811-541a9ad22848

    iSCSI SAN Software Support Department

    http://starwindsoftware.com

    Monday, March 29, 2010 3:32 PM
  • Dear Anatoly Vilchinsky

     

    Again???!!!!!!

     


    Read My thread

     

    As I say, the Hyper-V Time Synchronization for RedHat guest hosts DOSN'T WORK.

    Monday, March 29, 2010 3:48 PM
  • OK, time.... How about dates?

    Have you contacted the MS support? Do you have such possibility?

     


    iSCSI SAN Software Support Department http://starwindsoftware.com
    Monday, March 29, 2010 9:40 PM
  • By default RHEL 5  (and other 2.6 kernels) uses the the PIT delivering interrupts at 1000Hz to provide a time source, and uses techniques for lost tick correction. This works poorly in a virtualized environment, as intrerrupt handling is virtualized, and you might loose ticks, then the kernel algorithm might overcompensate for lost ticks, and the clock goes too fast.

    VMware has an kb article about setting the system clock algorithm best suited for the different RHEL kernels: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427

    Please note that we also have experienced serious issues with interrupt handling on guests (both Linux and Windows) on Hyper-V on hardware under load. You would want to configure some kind of NTP on the guest as well, and lower the synchronize intervals.

    Tuesday, March 30, 2010 8:26 AM
  • John is correct. However, I also had to add the following kernal parameter to both my RHEL 5.4 and RHEL 5.5 virtual machines (both x86_64):

     

    notsc divider=10

     

    Source: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427

    Here are the EXACT steps taken on both VMs (tested for validity on both):

    1. From Hyper-V, turn off 'Time synchronization' within the VM's Integration Services section

    2. Adjust the Date & Time within Red Hat

    - Enable NTP

    - Within Advanced options

    + Select 'Synchronize system clock before starting service'

    + uncheck 'Use Local Time Source' (if selected)

    3. (using Grub boot loader) Modified: 

     

    /boot/grub/grub.conf

     

    - Added the following kernel command line parameters at the end of the "kernel" line

    notsc divider=10

    - Saved grub.conf and restarted Linux VM

    4. Time drift is no more!

    kernal details:

    (RHEL5.5) Linux version 2.6.18-194.el5

    (RHEL5.4) Linux version 2.6.18-164.el5

     

    Monday, May 10, 2010 10:34 PM
  • Realisator is also correct about Hyper-V's time sync with Linux VMs (Read 'Device and service support' here). And it appears he has answered this thread's question in his posted link

    Dear Anatoly Vilchinsky

     

    Again???!!!!!!

     


    Read My thread

     

    As I say, the Hyper-V Time Synchronization for RedHat guest hosts DOSN'T WORK.


    using the following kernal parameter:

    divider=10 clocksource=acpi_pm

     

    I'm assuming that he was running the x86 version of RHEL5?

    Monday, May 10, 2010 11:06 PM
  • I think this one deserves to be in "[Knowledge Sharing] Hyper-V FAQ" ;-)

    Edit: I guess, better to add one more - how to install IS componets into inactive kernel, right after kernel update AND before reboot!

     

    Thursday, May 13, 2010 4:22 AM
  • I'd successfully used the fixes described here, however ever since upgrading to kernel 2.6.18-164.el5 I have had troubles again - the clock gaining about 3 minutes every day.  Has anyone else had issues since the kernel upgrade?

     

     

    Friday, July 16, 2010 12:15 AM
  • I am using x64 RH 5.5 so far I have NTP Configured but I have not tried the kernel parameters

    I already disabled Time Sync in VM Settings for Hyper-V

    notsc divider=10

    are these enough?

    these is my action plan:

    1. Kernel parameters

    notsc divider=10

    2. Install adjtimex rpm

    not sure if adjtimex must be installed when using NTP

    let's see but any other input would be appreciated 

    • Edited by karlo- Friday, October 14, 2011 1:39 AM
    Thursday, October 13, 2011 6:27 PM