Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get ntpd working on a virtual machine?

Our development team has just recently started using virtual machines to develop on and one issue we are having is keeping the clocks sync'd. I remember in the past there was an issue with ntpd not working on virtual machines. I also recall it not being a good idea to put ntpdate in as a cron. So my question is, is there another solution to this? Or am i stuck putting in ntpdate into the crontab?

like image 637
Hawk Kroeger Avatar asked Jan 24 '23 19:01

Hawk Kroeger


2 Answers

Time is a little more complicated in virtual environments. I would suggest reading the vmware whitepaper on timekeeping.

They have thought this issue through quite thoroughly, including recommended options for ntp and using the vmware tools time support.

like image 97
Gary Avatar answered Jan 26 '23 09:01

Gary


Install VMWare tools and set

tools.syncTime = "TRUE"

in your *.vmx file, this lives in your vm install dir

Vmware-Tools and time synchronization

like image 27
Andrew Clark Avatar answered Jan 26 '23 07:01

Andrew Clark