VMware VMs tend to correct the OS time by syncing with the host. You can disable this but it still syncs during vMotion and some other tasks. This was causing trouble with our Exchange environment as there was a few seconds difference between our hosts and one of the Exchange VMs had its time go back by 5seconds after a vMotion. So we decided to totally disable time sync with the host.
Instructions are simple – https://kb.vmware.com/s/article/1189.
I am supposed to add the following to the VM’s config file after shutting it down:
1 2 3 4 5 6 7 8 |
tools.syncTime = "0" time.synchronize.continue = "0" time.synchronize.restore = "0" time.synchronize.resume.disk = "0" time.synchronize.shrink = "0" time.synchronize.tools.startup = "0" time.synchronize.tools.enable = "0" time.synchronize.resume.host = "0" |
Sounds simple, but it didn’t go smooth. After doing this the VM refused to start and gave errors about an invalid config file. After some trial an error I figured that the first line was causing trouble. Remove that and now the VM starts as expected. Odd that no one else seems to have encountered this issue!
Curious about what these options do? This PDF is a trove of information on timekeeping and VMware. From the PDF I found the following:
What else? This KB helped me with reloading the VM config file after I made changes. Do vim-cmd vmsvc/getallvms
to get a list of VMs and note the ID of the one we are interested in. Then do vim-cmd vmsvc/reload <vmid>
to reload.
Update: I realized why things broke. My VM was already set to not update time via VMware Tools, so it already had a line like tools.syncTime = "FALSE"
. That’s why the first line was causing a conflict.