Voidn
08-09-09, 05:02 PM
I'm going to blert this out and assume most of you already know:
Linux vmware virtual machines tend to have fairly significant clock/time drift. Especially when the machine is on for days on end. I originally thought this was caused by idle vm's missing cycles (why give an idle vm resources another vm could use), cycles the clock needs to be accurate.
But even my folding vm's are drifting, and we all know folding != idle. NTP "should" solve the problem. But on some vm's I've experienced ntp turning itself off when the time variance is too high, or just plain not updating often enough. An alternative solution is to have a cronjob call ntpdate. Most linux/unix systems use cronjobs for one reason or another. If you have ntp installed you probably have ntpdate.
For example:
http://i820.photobucket.com/albums/zz126/voidn/vmwaretimedrift.jpg
My linux vm was 1 hour 10 mins off after being on for 26 hours.
Solution: Update time every 5 mins:
#change time/#s to suit your own needs
user@host$ echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * *" ntpdate ntp.pool.org >> /var/spool/cron/crontabs/root
##May need to run with sudu
##May need to write to /var/spool/cron/root
Linux vmware virtual machines tend to have fairly significant clock/time drift. Especially when the machine is on for days on end. I originally thought this was caused by idle vm's missing cycles (why give an idle vm resources another vm could use), cycles the clock needs to be accurate.
But even my folding vm's are drifting, and we all know folding != idle. NTP "should" solve the problem. But on some vm's I've experienced ntp turning itself off when the time variance is too high, or just plain not updating often enough. An alternative solution is to have a cronjob call ntpdate. Most linux/unix systems use cronjobs for one reason or another. If you have ntp installed you probably have ntpdate.
For example:
http://i820.photobucket.com/albums/zz126/voidn/vmwaretimedrift.jpg
My linux vm was 1 hour 10 mins off after being on for 26 hours.
Solution: Update time every 5 mins:
#change time/#s to suit your own needs
user@host$ echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * *" ntpdate ntp.pool.org >> /var/spool/cron/crontabs/root
##May need to run with sudu
##May need to write to /var/spool/cron/root