2

I am running Ubuntu 14.04 inside Vmware Player. However, Ubuntu doesn't seem to check for the current time. The time is usually off when I restart the virtual machine.

How can I fix this so it will check the time each time I start the VM?

0

1 Answer 1

1

In the VM, create a file /etc/cron.hourly/ntpdate containing:

#!/bin/sh
ntpdate ntp.ubuntu.com

Source

3
  • Don't thank me! ;-) Just click the little grey check-mark under the "0" now. If you do not like my answer, click on the little grey down-arrow below the 0 and if you really like my answer, click on the little grey checkmark and the little up-arrow... If you have any further questions, go to askubuntu.com/questions/ask
    – Fabby
    Jan 28, 2015 at 14:27
  • Does ".daily" mean the script will only run once a day? That is insufficient since time in the virtual machine runs much slower.
    – posfan12
    Feb 2, 2015 at 5:34
  • My bad: my machine is set this way and I just copy-pasted... Answer edited to hourly to reflect your use case. ;-)
    – Fabby
    Feb 2, 2015 at 9:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .