ads

Style6

Style3[OneLeft]

Style3[OneRight]

Style4

Style5[ImagesOnly]

Style2

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.

Time Drift

My CentOS guest's time was constantly running ahead of the host server's actual time.

Time drift issues are common when working with virtualization.  I found a good article about Hyper-V time synchronization issues at Ben Armstrong's Blog at http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/11/19/time-synchronization-in-hyper-v.aspx.

I was able to resolve the issue by installing the NTP service:

           yum install ntp

The default NTP servers were OK but they can be changed with:

           vi /etc/ntp.conf
The following commands then started the service, synced the guest, and set the NTP service to start automatically.

          service ntpd start
          netpd -q
          hwclock --systohc
          chkconfig ntpd on