[SOLVED] Time Sync Issues - Clock Drift Way Off - CentOS 5.2, VMware 1.0.8, Plesk CP 8.6.0
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Rep:
Time Sync Issues - Clock Drift Way Off - CentOS 5.2, VMware 1.0.8, Plesk CP 8.6.0
Good morning all, or afternoon depending on where you are!
I have a very strange issue and I have searched Google many, many times now to try and find a solution but I have had little success. I have learned a few things but not how to solve my problem.
So I am running a host machine with CentOS 5.2 and it currently is running VMware Server 1.0.8. My Virtual Machine is running CentOS 5.2 as well with Parallels Plesk Control Panel 8.6.0. My VM-Guest server time is way out of whack. I have tired using the ntpd server option in the Plesk Control Panel and have had zero luck. I have also tried configuring my NTPD service but the drift time is way, way out (I don't really want to do this anyway as Plesk seems to have all of its own modules). I cannot post the data as I did not save it how ever I am willing to go through all of the process again if someone should need me to. I also have made the entry in my VM-Guest .vmx config file for VMware-Tools to set the time sync to true:
Quote:
tools.syncTime = "TRUE"
At this point I am thinking about creating a new Virtual Machine and seeing what happens. I really rather not do this but I have searched high and low but cannot figure out why my VM-CentOS-5.2 time is so far out. I don't think is has to do with VMware so much as it seems to be the actual server itself, maybe a Kernel issue?
Any help would be greatly appreciated, thank you in advance!
I've had plenty of issues with clocks under vmware. One thing you should avoid is ntpd as you've found, so stay clear of that and trust the host clock. The main thing I play with is the clock type under the guest, using clock=pit on the kernel line, as well as often wanting to disable acpi (acpi=off), add noapic and also possibly nosmp.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
Right on, I will check into that ASAP - just finished a late breakfast and now I have to hit the shower... Once I have tired I will post back... Probably within the next couple of hours, thank you both!
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
So my grub.conf looks like this:
Quote:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol01
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet
initrd /initrd-2.6.18-92.el5.img
Where and how should I add the:
Quote:
clock=pit
I don't want to mess up this machine as its my production server...
My understanding is that this causes the kernel to use a different timer than the default, which tries to compensate for lagging behind the hardware clock. In a VM, this seems to cause a wild advance in system time compared to actual time. So the pit timer seems to be a less aggressive reference.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
VMware Server Time Drift - Host CPUSPEED
Alright so here is what I found after a full day of searching, reading and learning... I found the following site http://drakkhen.net/posts/2009/01/20...vmware_guests/ and it appears to have the fix I needed for my situation. Thanks to a service called "cpuspeed" I spent my day trying to fix the kernel of the VM-Guest rather than looking at the host, maybe I should have been trying all of the above in the host and not the guest??
So what I did: (on the host machine)
Quote:
[root@server ~]# service cpuspeed status
cpuspeed is running
[root@server ~]# service cpuspeed stop
cpuspeed is stopped
[root@server ~]# chkconfig cpuspeed off
[root@server ~]# shutdown -r now
The guest VM now seems to be keeping time. I still have set the value of time sync in the .vmx file to the following:
Quote:
tools.syncTime = "TRUE"
I think that did it, I will post back if the situation should change. Thank you all for you help!
Cheers
PS: this program/service "cpuspeed" is designed to save energy when the computer is idle, EXAMPLE why would you need 3.0GHz of processing power to read a PDF??? You don't need that much power to read... so that's where the program/service "cpuspeed" kicks in. As the poster said "I probably wasted more power and caused more pollution from using Google for 3 hours straight." On be half of him and my self I hope his post and mine helps a few more people!
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
Ok, I might go back and try that as the cpuspeed does conserve power when its not needed, its kind of silly to disable it. The other issue is I was unclear where I should be making the changes, on the Host or the Guest? I tried all of the above minus the type O on the Guest machine, should I have been modifying the Hosts Kernel?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.