How to synchronize VMWare VM clock?

I noticed that our VMWare VMWare often have the wrong time on them. No matter how many times I reset the time that they continue to execute.

Has anyone else noticed this? What do other people do to synchronize the time of their VM?

Edit: This is CLI linux VMs btw ..

+50
vmware
Nov 10 '08 at 2:58
source share
11 answers

If your host time is correct, you can set the following .vmx configuration configuration to enable periodic synchronization:

tools.syncTime = true 

By default, this synchronizes time every minute. To change the periodic speed, set the required synchronization in seconds in seconds:

 tools.syncTime.period = 60 

To do this, you need to install VMWare tools in the guest OS.

For more details see http://www.vmware.com/pdf/vmware_timekeeping.pdf

+50
Nov 10 '08 at 15:21
source share

according to the VMware knowledge base, the actual solution depends on the Linux distribution and release, in RHEL 5.3 I usually edit the /etc/grub.conf file and add these parameters to the kernel entry: divider = 10 clocksource = acpi_pm

Then enable NTP, disable VMware time synchronization from vmware-toolbox, and finally reboot VM

A complete table with recommendations for each Linux distribution can be found here:

TOPIC PRACTICES FOR LINEAR GUESTS http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427

+8
Apr 09 '10 at 16:54
source share

I will be responsible for the Windows guests. If you have VMware tools installed, there is an icon for VMware Tools in the taskbar notification area (next to the clock). Double-click this and set your options.

If you do not have VMware Tools installed, you can configure time synchronization for Internet time with some NTP server. If your physical machine is running NTP for your guest machines, you can do this using a host-only network. Otherwise, you will have to allow your visitors to synchronize with a genuine NTP server on the Internet, such as time.windows.com.

+4
Nov 10 '08 at 3:13
source share

Something note here. We had the same problem with a Windows VM running on an ESXi host. Time synchronization was enabled in VMWare Tools on the guest, but the guest clock was sequentially disconnected (approximately 30 seconds) from the host clock. The ESXi host has been configured to receive temporary updates from the internal time server.

It turns out that we set the Internet time setting on the Windows VM tab (control panel> Date and time> Internet time), so the guest received temporary updates from two places and the time on the Internet won. We turned it off, and now the guest clock is good, getting its time exclusively from the ESXi host.

+4
Jul 01 '09 at 17:21
source share

In my case, we are running VMWare Server 2.02 on Windows Server 2003 R2 Standard. The host is also a standard in Windows Server 2003 R2. I had VMware tools installed and configured for time synchronization. I did my best that I found on various internet sites. We still had a terrible drift, although it was reduced from 15 minutes or more to 3 or 4 minutes.

Finally, in vmware.log I found this entry (located in a folder as a .vmx file): "Your host system does not guarantee TSC synchronization on different CPUs, so please set the / usepmtimer option in the Windows Boot.ini file to guarantee that runtime is reliable. See Microsoft KB http://support.microsoft.com/kb ... for more details and Microsoft KB http://support.microsoft.com/kb ... for more information. "

Cause. This problem occurs when the computer is equipped with AMD Cool'n'Quiet technology (AMD dual-core processors) in the BIOS or some Intel multi-core processors. Multi-core or multi-processor systems may experience a Time Counter Drift (TSC) when time between different cores is not synchronized. Problems can arise in operating systems that use TSC as a resource for timing. Newer operating systems usually do not use TSC by default if other timers are available on the system that can be used as a timing source. Other available timers include PM_Timer and the High Accuracy Event Timer (HPET). Decision. To fix this problem, contact your hardware vendor to find out if a new driver / firmware update is available to fix the problem.

Note. Installing the driver may add the / usepmtimer switch to the Boot.ini file.

Once this (/ usepmtimer switch) was completed, the clock was dead on time.

+3
May 02 '11 at 17:24
source share

This documentation solved this problem for me.

+3
Sep 25 '14 at 8:40
source share

CPU speed is dependent on power savings. I initially noticed this because VMware gave me useful advice on my laptop, but the same thing is mentioned on this page:

Quote: VMWare Tips and Tricks Energy Saving (SpeedStep, C-states, P-states, ...)

Energy-saving settings can significantly affect vmware performance. There are several levels of energy conservation.

CPU frequency

This should not lead to performance degradation beyond the apparent lower performance when starting the CPU at a lower frequency (either manually using knobs such as “ondemand” or “conservative”). The only problem with changing processor speed when starting vmware is that the Windows clock will get lost time. To avoid this, specify the total processor speed in kHz in / etc / vmware / config

host.cpukHz = 2167000

+1
Nov 10 '08 at 3:11
source share

VMware experiences a lot of clock drift. This is a Google search for links to "vmware clock drift" for several articles.

The first hit may be most useful to you: http://www.fjc.net/linux/linux-and-vmware-related-issues/linux-2-6-kernels-and-vmware-clock-drift-issues

+1
Nov 10 '08 at 15:01
source share

When installing VMware Tools on a Windows guest, Time Synchronization is not enabled by default. However, the “best practice” is to enable time synchronization in Windows Guests.

There are several ways to do this from outside the virtual machine, but I wanted to find a way to enable time synchronization from the guest himself, either during installation or after installation.

Surprisingly, it was not as easy as I expected. (I suggested that it would be possible to set this as the / config option during the installation of the tools)

After a bit of searching, I found a way to do this in a VMware article entitled "Using the VMware Tools Command Line Interface".

So, if time synchronization is disabled, you can enable it by running the following command in the guest system:

  VMwareService.execmd "vmx.set_option synctime 0 1″ 

Additional notes

For some (IMHO stupid) reason, this utility requires you to specify the current as well as the new value

0 = disabled 1 = enabled

So - if you run this command on a machine that is already installed, you will get the error "Invalid old value." Obviously, you can “ignore” this error at startup (so this is not a huge deal), but the current design seems a bit dumb. IMHO it would be much more reasonable if you could just indicate the value that you want to set, and not require indicating the current value.

i.e. VMwareService.exe -cmd "vmx.set_option synctime <0 | 1>"

+1
Aug 23 '11 at 7:24 a.m.
source share

I added the following work in crontab. These are hacks, but I think it should work.

* / 5 * * * * ntpd stop service && & ntpdate pool.ntp.org && ntpd start service

It stops the ntpd service updates from the service and starts ntpd again

0
Jun 27 '14 at 6:18
source share

In an Active Directory environment, it is important to know:

  • All member machines are synchronized with any domain controller.

  • In a domain, all domain controllers are synchronized with the PDC emulator (PDCe) of that domain.

  • The PDC domain emulator must synchronize with local or NTP.

It is important to consider this when setting up time in vmware or setting up time synchronization.

Extracted from: http://www.sysadmit.com/2016/12/vmware-esxi-configurar-hora.html

0
Dec 15 '16 at 15:22
source share



All Articles