Thursday, March 15, 2007

Date and time on virtual machine....

I had this problem with date/time synchronizing on a virtual machine with its host machine. Result of this was that the clock on my virtual machines ran slower than the real clock. So my date and time was always behind. Because I did not want to restart the timeserver (ntp server) every time from the command line (when restarting the ntp server, the date/time was correct for a few minutes....), a colleague of mine suggested to put the restart in a cronjob. Great plan and also tested on a few other virtual machines...
I placed the following lines in a fiel called time.cron

[root@vamisux32 ~]# crontab -l
# ntp update statement - workaround
0-59 * * * * /usr/sbin/ntpdate amisnt10 >>/var/log/ntpdate 2>&1

But on my Oracle Linux virtual machines, the cron job did not run. So, the virtual clock was still running slower than the real clock.

In the logfile of the crontab, the following error was shown

"ntpdate[23109]: the NTP socket is in use, exiting"

So it seems the cronjob cannot connect to the external time server, because the NTP socket is already in use.
I found out that Oracle Linux starts a NTPD process when booted. This NTPD process is blocking my NTP socket....So, I stopped the NTPD process and made sure it would not start up again when booting the virtual machine. Checked the date and time and everything seems oke now. Even the crontab logfile is without errors...

"ntpdate[18258]: step time server offset...."

So, don't run ntpd and ntpdate next to each other...


Anonymous said...

Bas, the solution described here is not the answer for VMware Virtual Machines.

The way to do it, is described here:

Microsoft Office 2007 said...

NEVERTHELESS, THE CIVIL LAW is and must be neutral about who has a more noble or rewarding faith. The breakaway parishes ought to win every Office 2010facet of the lawsuit not becauseMicrosoft Office 2010 their beliefs or their politics are better, Microsoft wordbut because both lawOffice 2007and equity, along with common sense, are on Microsoft Officetheir side.Microsoft Office 2007 Not only does Virginia state law (the Division Statute)Office 2007 keyexplicitly apply to just such a Office 2007 downloadsituation as now exists, but the history Office 2007 Professionalespecially of The Falls Church argues against the claims of Outlook 2010the Virginia Diocese with which theyMicrosoft outlookhave disassociated.Microsoft outlook 2010First, The Falls Church wasWindows 7 founded, formed, and developed long before the diocese, or the national Episcopal Church, even existed.

Unknown said...

Sridevi Koduru (Senior Oracle Apps Trainer
LinkedIn profile -
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, Oracle Manufacturing, OAF, ADF, SQL, PL/SQL, D2K at | +91 - 9581017828.