LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-01-2009, 12:11 PM   #1
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
Question 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!
 
Old 03-01-2009, 12:26 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 03-01-2009, 12:26 PM   #3
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
In grub.conf add to kernel line: 'clock=pit'
At command prompt, type: 'hwclock=systohc '

Whoops, beaten to the punch

Last edited by TBC Cosmo; 03-01-2009 at 12:28 PM. Reason: add comment
 
Old 03-01-2009, 01:28 PM   #4
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
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!
 
Old 03-01-2009, 02:12 PM   #5
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
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...
 
Old 03-01-2009, 02:39 PM   #6
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Change
Code:
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet
to
Code:
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet clock=pit
 
Old 03-01-2009, 03:42 PM   #7
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Talking

Yes! Thank you both, your solution seems to have fixed my problem.

I probably should have looked first but what exactly does the "clock=pit" do to your kernel/system?
 
Old 03-01-2009, 04:50 PM   #8
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
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.
 
Old 03-01-2009, 07:06 PM   #9
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Exclamation

Bad news, that didn't actually help... My server is still jumping into the future... So what else should I try, "acpi=off" ???

Currently:
Quote:
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet clock=pit
Suggested:
Quote:
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet clock=pit acpi=off
Just to confirm that is all I should have to add and hope that it helps...
 
Old 03-01-2009, 07:30 PM   #10
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Okay so this is what I tried and the time is still drifting into the future:

Quote:
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet clock=pit acpi=off noacpi
Anything else I can try?
 
Old 03-01-2009, 08:54 PM   #11
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Arrow 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!
 
Old 03-02-2009, 02:53 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
cool, btw it was noapic, not noapci.
 
Old 03-02-2009, 01:21 PM   #13
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
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?
 
Old 03-02-2009, 01:38 PM   #14
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
I doubt the host kernel needs to be modified. Possibly try ntp in conjunction with the new timer setting.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slow SSH Login --> CentOS 5.0 --> VMware Server --> Plesk Control Panel 8.4.0 bskrakes Linux - General 12 01-05-2015 05:32 AM
Can't access Plesk on vmware Centos 5 server on LAN goodgirl Linux - Server 6 09-11-2008 11:25 PM
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 09:58 PM
Time server needed to sync clock, CDT harisund Linux - General 2 10-05-2005 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration