I have following setup for web development: Windows laptop with Microsoft Virtual PC 2007, in it i have Centos virtual machine.

Problem i have is that every time when laptop goes to sleep with virtual machine running or every time i close virtual machine using Save state and then start it again it is stuck with time before it went to sleep.

If i restart OS in virtual machine is syncs its time with host operating system, what i also want to add it ability to do it regularly to avoid time drift.

link|improve this question

57% accept rate
I so want to be able to fix this question. – Brad Gilbert Jul 22 '09 at 4:45
Brad, is it better now? :) – alexeit Jul 22 '09 at 12:10
feedback

2 Answers

up vote 1 down vote accepted

You can try using ntpdate, which may be in /usr/sbin or /sbin:

sudo ntpdate pool.ntp.org

For more info try:

man ntpdate

I hope this helps.

link|improve this answer
@Alexeit, it may be a good idea to edit your title - change "synchtonise" to "synchronize" so that Googlers can find it. :) – Kevin Worthington Jul 22 '09 at 7:45
Done, thanks for that :) – alexeit Jul 22 '09 at 12:11
thanks for answer, i used both of them to figure out how to sync time, debug why it was not working (firewall issues, man helped) and how to set it to run – alexeit Jul 22 '09 at 12:17
feedback

try running ntpdate when you bring the server up, or run it every 15 minutes out of cron:

(eg */15 * * * * * /usr/sbin/ntpdate)

link|improve this answer
thanks for answer, i used both of them to figure out how to sync time, debug why it was not working (firewall issues, man helped) and how to set it to run – alexeit Jul 22 '09 at 12:17
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.