CentOS, NTPD, VMware and sleeping.

I have a MacPro at home, and I am running VMware Fusion on it. At night, I sleep the machine to save electricity. I have a CentOS guest running and the time is always out of sync. After the VM is restored from sleep, the NTP service is no longer running and my time really drifts.

I finally sat down and tried to figure out my time sync issues on CentOS and VMware. This document explains it all. At the bottom they say you should turn off VMware tools time sync and use NTPD.

To install NTPD (with the recommended changes from the above document)

  1. yum install ntp
  2. chkconfig ntpd on
  3. sed -i 1i”tinker panic 0″ /etc/ntp.conf
  4. sed -i “s/^server\t127.127.1.0/#server\t127.127.1.0/g” /etc/ntp.conf
  5. sed -i “s/^fudge\t127.127.1.0/#fudge\t127.127.1.0/g” /etc/ntp.conf
  6. service ntpd start

The “tinker panic 0” is the most important part. Now when my VMware Fusion wakes and the CentOS guest powers on, NTP gets everything setup correctly.

,

Comments are closed.

Powered by WordPress. Designed by WooThemes