Monday, December 15, 2014

Synchronizing VMWare guest Operating System Time

I run Ubuntu as a VM on my Mac using VMWare Fusion and it has problems synchronizing the time with the host operating system. The VMWare commands are to do this are:

vmware-toolbox-cmd timesync status
vmware-toolbox-cmd timesync enable
vmware-toolbox-cmd timesync disable

And they simply don't work. So I had to find another way to get the time synced. Running the command:

sudo ntpdate -s

Syncs the time splendidly, so the question is how to do this at boot time automatically. After all automatic is what computers are all about. To do this, edit the file /etc/rc.local and add following anywhere in the file before the "exit 0":

ntpdate -s

And that should keep your clock synced. If you sleep your VM, the time could get out of sync and I haven't come up with a automatic solution for that but I don't usually sleep because shared directories are sometimes gone when it wakes and the VM has a big problem with that.

No comments:

Post a Comment