Sunday 29 July 2007

NTP time synchronisation in VMWare/Ubuntu linux

I don't know why VMWare can't just do it like Xen- but time synchronisation in VMWare is not perfect.

So, it's important to run an NTP client in each VM.  However, by design, if NTP finds there is a large difference between "real time" and the VM time... e.g. every single time you Resume a VM, it will correct the time- but slowly.  Very slowly.  So slowly you'll probably never see it.

So, ntpdate to the rescue.  This is a small ntp client (part of the main distribution), designed to be run at the booting of a system.  Or for place where for some strange reason, NTP isn't used.  Just run "ntpdate uk.pool.ntp.org" and the clock will be corrected.  From then on, the normal ntp client can do its magic and keep the Linux time correct.

Unlike VMWare or Windows...