VMware – How to Force Time and Date Settings to Refresh from Internet

datevirtualizationvmware

I'm running Ubuntu 12.04 LTS under vmWare. When I restart a suspended image, the system clock doesn't detect that the system time is out of date. In the Time and Date settings dialog, I've selected "Set time automatically from the Internet", but no amount of clicking on the two options (the other is "Set time manually") makes the System actually "check the internet" and use the correct time. Is there a way that I can force the local system (running under vmWare) to change the time to the "internet time"?

Best Answer

Install an NTP service on the virtual machine:

sudo apt-get install ntp

That way the virtual machine (assuming it has internet access) will set its time from a remote NTP server.

If this is already installed, check that the service is running:

sudo service ntp status

If it is not, start it:

sudo service ntp start

Finally, you can force it to get the time from the server with

sudo ntpdate 1.debian.pool.ntp.org