VM - Time Drift Update
My previous post about time drift addressed the inherent problem with VMs and time drift. I previously explained how to set the Linux server to use NTP. After I configured the guest to use the NTP servers, I found the server's clock was still accelerating up to 4 minutes of virtual time, for every minute in real time. I found a good article on VM's site that was able to fit it:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427
Specifically:
1. Locate the correct Kernel parameters. There are different configuration settings that must be used depending on which version of Linux you may be using. Compare it with the chart on the above URL. There are separate settings for 32-bit and 64-bit environments.
2. Edit the Kernel configuration. On my system, I was able to do so with:
vi /boot/grub/menu.lst
Others may use LILO so chose the correct file for your system. I added the following at the end of the "append" line:
clock=notsc divider=10 nohpet
Other versions may use different parameters.
3. I had to make further changes to the server's NTP settings. I was able to edit the NTP config file with:
vi /etc/ntp.conf
I made the following changes:
A. Put "tinker panic 0" at the top of the config file. This command instructs the server to continue to use NTP if there is a large time drift. This is also handy if the VM was suspended or copied from another system.
B. Comment out the following:
#server 127.127.1.0
#fudge 127.127.1.0 stratum 10
If a large time drift occurs the system has a tendency use the local clock as the time source. Commenting out the above prevents this.
There were additional recommendations with the above VMWare article, but the 3 changes I listed were enough to fix my problem.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427
Specifically:
1. Locate the correct Kernel parameters. There are different configuration settings that must be used depending on which version of Linux you may be using. Compare it with the chart on the above URL. There are separate settings for 32-bit and 64-bit environments.
2. Edit the Kernel configuration. On my system, I was able to do so with:
vi /boot/grub/menu.lst
Others may use LILO so chose the correct file for your system. I added the following at the end of the "append" line:
clock=notsc divider=10 nohpet
Other versions may use different parameters.
3. I had to make further changes to the server's NTP settings. I was able to edit the NTP config file with:
vi /etc/ntp.conf
I made the following changes:
A. Put "tinker panic 0" at the top of the config file. This command instructs the server to continue to use NTP if there is a large time drift. This is also handy if the VM was suspended or copied from another system.
B. Comment out the following:
#server 127.127.1.0
#fudge 127.127.1.0 stratum 10
If a large time drift occurs the system has a tendency use the local clock as the time source. Commenting out the above prevents this.
There were additional recommendations with the above VMWare article, but the 3 changes I listed were enough to fix my problem.