LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Time drift Vmware (https://www.linuxquestions.org/questions/debian-26/time-drift-vmware-771513/)

dreamlemon 11-25-2009 01:06 PM

Time drift Vmware
 
Hi debianers
I install debian (lenny) in VMWARE ACE 6.3
I met a time drift of 7 seconds per day.
Is it posible to completly get rid of time drift in a VM?
Or is it VMWARE-specific?
In QEMU or virtualbox it will be better?

EricTRA 11-25-2009 01:10 PM

Hello,

I have several Debian servers running in VMWare ESX and have installed ntp on all of them. They synchronize perfectly.

To install ntp from the console:
Code:

apt-get ntp
Kind regards,

Eric

dreamlemon 11-25-2009 01:13 PM

Hi EricTRA,
How often you sync time of your machines?
I did use ntp.
But sometimes this issue even made ntp fail to do.

EricTRA 11-25-2009 01:21 PM

Hello,

I don't have any frequency set, the ntp daemon should take care of that automatically. The larger the offset the more frequent the daemon will send out packets to synchronize the system time.

One thing I have encountered is when the hardware clock wasn't set correctly. This happened once and I had strange behavior too.

To check hardware clock:
Code:

hwclock
To update the system time to the hardware clock:
Code:

hwclock --systohw
Also if the starting time of the server was too much off comparing to the real time then you'll have to adjust the time once before starting and relying on the ntp daemon.

You could try with ntpdate to find out if there is a problem connecting to the ntp pool, but you'll have to install the package first:
Code:

apt-get install ntpdate
Also while the ntp daemon is running you cannot execute ntpdate, it will give you an error.

Kind regards,

Eric

dreamlemon 11-25-2009 01:46 PM

Hi EricTRA,
I am using xp as host.
I use ntpdate to adjust that debian
via internet.
So Windows has no hwclock.
And I dont have much interest(unless necessay) to build a ntpd in XP.
Do you have more suggestion?

EricTRA 11-25-2009 01:49 PM

Hi,

Well, that's as far as my knowledge and experience goes with with the whole ntp thing. Maybe this site can help you a bit more to fine tune and/or find an error:

Time synchronization with NTP

Kind regards,

Eric

anomie 11-25-2009 02:02 PM

In general: you really don't want to be querying an NTP server at frequent intervals to try to correct this. (That's impolite in terms of network traffic and sheer requests.) If the drift is pronounced enough, your clock is going to be all over the place. Seven seconds per day is actually not bad.

Besides, this is a known, documented issue: http://kb.vmware.com/selfservice/mic...rnalId=1006427

Read through that KB article and try a google query for "linux vmware clock" if you need more info.

dreamlemon 11-25-2009 02:25 PM

Quote:

Originally Posted by anomie (Post 3769555)
In general: you really don't want to be querying an NTP server at frequent intervals to try to correct this. (That's impolite in terms of network traffic and sheer requests.) If the drift is pronounced enough, your clock is going to be all over the place. Seven seconds per day is actually not bad.

Besides, this is a known, documented issue: http://kb.vmware.com/selfservice/mic...rnalId=1006427

Read through that KB article and try a google query for "linux vmware clock" if you need more info.

1.yes.Unless setting up a ntpd on host or LAN.
2.Actually I did mind even 0.1 second per day
what if you would like to simply time a command or script?
that willl lose precision.
3.that kb does not contain debian 5.X ( only 4.x)


All times are GMT -5. The time now is 02:34 PM.