0

Is there any way to get a virtual guest to only query it's current host for NTP?

I'm not talking about configuring ntp.conf with the host's IP here either as VLAN's & firewalls may block that traffic. Also migration to a different host would require ntp reconfig & restart. A direct (intercepted?) query from the guest to the host.

I've tried various NTP solutions and it seems to me (theoretically) that it might be best for a guest to query only it's current host for an NTP sync (notwithstanding the VMware advice not to use their sync-with-host option).

It might/would require a version of NTP that is virt-aware.

Only one NTP source would be required as the guest wouldn't be running if the host wasn't available.

  • Install the VMware tools. They can manage time synchronization between guest and host. – Peter Lamby Aug 21 '14 at 12:13
  • 1
    "VMware recommends using NTP instead of VMware Tools periodic time synchronization." kb.vmware.com/kb/1006427 – Duncan Innes Aug 28 '14 at 14:14
1

You can't really use NTP here because you can't know where the "host" is on the network.

Some hypervisors provide a way to synchronize time with the host. For instance, VMware provides a userspace tool in VMware Tools for this purpose. KVM has a paravirtualized RTC. And so on.

Though in my experience these are all less than perfect, and trusting the host to have the correct time is a bad idea, necessitating running NTP in every VM (and having it use reliable servers) anyway.

  • Thanks. This is what I figured. There's no great solution to keeping time on a virtual guest as far as I can see. I hoped there might be something that would allow me to remove the extra physical clocks somehow (i.e. my physical NTP servers). I have to ensure these keep the right time, so getting the virtual hosts to do the same thing isn't a great leap I don't think. Properly configured NTP client on the host allows me to trust it's time as much as I trust my physical NTP servers. – Duncan Innes Aug 28 '14 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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