0

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.

alexeit
  • 906
  • 2
  • 16
  • 19

2 Answers2

1

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.

Kevin Worthington
  • 327
  • 2
  • 6
  • 19
  • @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 07:45
  • 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
1

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

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

Tim Howland
  • 4,728
  • 2
  • 27
  • 21
  • 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