微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用CentOS 6.2在HyperV上进行时间同步

我在HyperV下运行了一个CentOS VM(6.2版).我安装了集成服务(现在是基础的一部分),CentOS显示当前的clocksource是hyperv_clocksource,但是在一周的正常运行时间后,我在VM中的时间大约是10分钟.我对新IC和可插拔时钟源的理解是,这不应该再发生了.是否需要任何其他配置才能使可插入的clockource“工作”?

我知道有很多关于将内核选项设置为PIT的链接以及各种类似的东西,但这些都似乎早于集成的clockource支持,并且据我所知它不应再需要了. ntpd也不应该是adjtimex.

编辑:运行3.2的IC(装有Centos 6.2),今天升级到3.3,机器已经运行1小时22分钟,时钟已经快5秒.所以我现在正在运行最新的IC,但仍然遇到同样的问题.

我以前遇到过这个问题并通过调整启动开关(notsc divider = 10)和ntp设置来纠正它:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/,eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.6.1.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-164.6.1.el5 ro root=/dev/VolGroup00/LogVol00 hda=noprobe hdb=noprobe notsc divider=10
    initrd /initrd-2.6.18-164.6.1.el5.img
title CentOS (2.6.18-164.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.18-164.el5.img

示例ntp.conf:

tinker panic 0
restrict 127.0.0.1
restrict default kod nomodify notrap
server 0.vmware.pool.ntp.org
server 1.vmware.pool.ntp.org
server 2.vmware.pool.ntp.org
driftfile /var/lib/ntp/drift

资源:

更正Server 2008 R2上的Hyper-V上的Linux时钟漂移
http://hardanswers.net/correct-clock-drift-in-centos-hyper-v

原文地址:https://www.jb51.cc/centos/373936.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。