Time synchronisation in KVM, Xen or VMWare guests is a difficult subject. The best solution depends on the type and version of hypervisor and the type and version of OS that runs in the guest. This way it gets quite complicated. Each hypervisor vendor has a document on timekeeping:

While it is useful to have all a solution for all hypervisors on all types of hardware with all sorts of guest OS’s, most virtualisation shops have quite a stable and homogeneous environment. We mostly run a recent (5.4 or higher) version of CentOS as guest OS on a KVM hypervisor running on CentOS 6 running on a recent Intel Xeon platform.

This means that if:

  1. The hardware has a Time Stamp Couter (TSC) $ cat /proc/cpuinfo | grep constant_tsc
  2. The Guest has the kvm-clock echo /sys/devices/system/clocksource/clocksource0/current_clocksource

If the above is true, it is not recommended to use NTP in the VM Guest. Using NTP on the VM Host Server, however, is still recommended.

Summarizing: If the hostserver has TSC, and the guest is using the kvm-clock, you should only run NTP on the hypervisor.

ZX-Spectrum, my first computer
ZX-Spectrum, my first computer

My collegues at work got me my first computer for my birthday! A fully function Sinclair ZX-Spectrum with tape drive, printer, manuals and lots of games! Not to forget, a couple of old issues of the MCN Magazine. This certainly brings back some good memories 🙂

Mac OSX uses a DNS cache. This cache stores the nameserver responses. While this is useful in general cases, it can be a pain when testing a website that is being moved to a different server. The cache will still serve the old ip address of the site, even if the DNS server already has the new ip address configured. To overrule the cache, and request the latest information with the authoritive DNS server, you can flush the DNS cache. To do this, open a Terminal window and enter the following command:

$ sudo dscacheutil -flushcache