Is it true that one has to go into the cmd line (not that I fear it!) to enable a VMguest to sync its time with the ESX host by either:
a) Editing the vmx file directly or...
b) Entering vmware-cmd vmname.vmx setconfit tools.syncTime TRUE
For at least a year now, working with both ESX 2.5 and 3.x, I've been under the impression that you could just go into a Windows guest, for example, and check the VMware Tools checkbox to sync time with the host, disable Windows Time Service, and be done with it.
So I tried comparing the vmx file for one such VM to what VMware Tools has set (to sync time with host) and guess what? There is no resulting line in the vmx file! (tools.syncTime = "TRUE") is expected, right?
Time 'seems' fine with my AD servers and NTP servers, etc. but I just came across message ID 625315 in here and it made me wonder/worry a bit. Thanks.
Yes, this is not stored inside the OS at all, when you check the time sync option in VMware- Tools it updates the vmx file. You should only use one time source, if you use VMware-tools then disable Windows Time service (the exception being your PDC). In a Windows domain it's best to sync your ESX servers with NTP and then you can sync your domain controller with the ESX host via VMware-tools and it will sync the rest of your Windows domain via Windows Time Service.
Also see this post...
Here's some good links to read about timekeeping...
Configuring windows time service (not in ESX) - http://www.windowsnetworking.com/articles_tutorials/Configuring-Windows-Time-Service.html
Vmware time sync and windows time service (understand windows time first) - http://kb.vmware.com/kb/1318
Timekeeping in VMware virtual machines - http://www.vmware.com/pdf/vmware_timekeeping.pdf
How to configure an authoritative time server in Windows Server 2003 - http://support.microsoft.com/kb/816042
Fyi if you find this post helpful, please award points using the Helpful/Correct buttons.
Visit my website: http://vmware-land.com
Message was edited by:
Thanks for all the reference.
However, I've confirmed that when I go into any given VM, then make sure that the box is checked for time to sync with host, then check the vmx file, that line just plain does NOT exist. Wondering why that wouldn't get written, and, further, wondering if my VM's are 'at risk' of losing time as a result?
I've been standardizing on the approach you outline for about a year now. All our ESX hosts sync their time via common NTP resources, and those are all nice and sync'd. Yes, I disable Windows time service on all our templates/'builds' for VMs as well.
Of course, some simple 'net time' and/or w32tm tests will ultimately tell me whether the VMs are out of sync with their respective host/s, but again, I must wonder why the GUI (VMtools) is not writing to the respective VMX files for the VMs?
Not sure why it is not taking effect in the VMX. I did some tests, my VM was originally set to Time sync and had tools.syncTime = "TRUE" in the vmx file. I unchecked it in the VM and check the vmx file again and it was set to FALSE. I then removed the line completely, saved the vmx file and check the box again to enable it and it added the line back in with a value of TRUE. Do you have any other time. parameters in your VMX file?
I found this thread when googling with the same issue.
The solution for me was that my guest whose time was not being corrected was AHEAD of time by 1.5mins.
What this meant was real time was 11:38am and the VM would say 11:39.30am
VMware Tools cannot turn a clock backwards as the guest may get confused about the same exact time happening again.
Once I turned back the clock by 2 mins, the guest corrected itself to the host instantly.
To watch it happen in the windows guest, run this command and let it run while you set the clock backwards:
w32tm /stripchart /computer:
I hope this helps someone else out there.