Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

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.

share|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
add comment

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

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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