Sync clock with VMWare Player

I run Windows on my laptop but oftentimes fire up Linux Virtual Machines using VMWare Player. Because I use my virtual machines to build source code stored on my physical host, it is important to have the clock synced between my physical and virtual hosts.

If you search the web, the typically answer to accomplish this is to setup NTP in Linux. NTP will sync the clock to time servers on the Internet. This solution is a non-starter for me, as I want to instantiate VMs with synced time even if I do not have internet access (such as on an airplane).

As it turns out, the VMWare tools can sync the clock in a virtual host to the physical host. Why there is not an option to enable this in the VMWare player GUI is beyond me. Here is what to do to sync your guest OS clock to the physical OS every 30 seconds:

  1. Install VMWare tools in your guest OS, if you haven't already.
  2. Edit the .vmx file for your virtual machine to contain the lines:
    tools.syncTime = "TRUE"
    tools.syncTime.period = 30 
     

No comments: