Синхронизация времени с NTP на Vmware Fusion VM

432
HP.

Я создал виртуальную машину Centos 6.9 в VMware Fusion с выключенным Synchronize Time и следовал этому документу:

https://kb.vmware.com/s/article/1006427?sliceId=1&dialogID=373948728&docTypeID=DT_KB_1_1&stateId=1+0+373966292

Тем не менее, у меня все еще есть проблема, когда я приостанавливаю и возобновляю виртуальную машину, часы все еще выключены, поскольку они не синхронизируются автоматически.

Вот что у меня есть:

uname -a

Linux demo.bluetalon.local 2.6.32-696.el6.x86_64 # 1 SMP вторник, 21 марта 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU / Linux

ntpd --version ntpd 4.2.6p5 ntpd 4.2.6p5@1.2349-o Thu Oct 26 10:57:32 UTC 2017 (1) 

/boot/grub/grub.conf

default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS 6 (2.6.32-696.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-696.el6.x86_64 ro root=/dev/mapper/vg_cdh-lv_root rd_NO_LUKS rd_LVM_LV=vg_cdh/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_cdh/lv_swap rd_NO_DM LANG=en_US.UTF-8 rhgb quiet clock=pmtmr divider=10 initrd /initramfs-2.6.32-696.el6.x86_64.img 

/etc/ntp.conf

# For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). tinker panic 0 driftfile /var/lib/ntp/drift  # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery  # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 restrict -6 ::1  # Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap  # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst  #broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # manycast client  # Enable public key cryptography. #crypto  includefile /etc/ntp/crypto/pw  # Key file containing the keys and key identifiers used when operating # with symmetric key cryptography. keys /etc/ntp/keys  # Specify the key identifiers which are trusted. #trustedkey 4 8 42  # Specify the key identifier to use with the ntpdc utility. #requestkey 8  # Specify the key identifier to use with the ntpq utility. #controlkey 8  # Enable writing of statistics records. #statistics clockstats cryptostats loopstats peerstats 

Единственный способ синхронизировать время - запустить:

service ntpd stop;ntpd -gq;service ntpd start;date

Есть идеи, как это исправить?

0

1 ответ на вопрос

0
HP.

Я решил НЕ использовать NTP, а вместо этого использовать Vmware Tools.

vi /etc/yum.repos.d/vmware.repo  [vmware-tools] name=VMware Tools for Red Hat Enterprise Linux $releasever - $basearch baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/$basearch enabled=1 gpgcheck=1 gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub  sudo yum install -y vmware-tools-esx-nox 

Похожие вопросы