📜 ⬆️ ⬇️

Disable full time synchronization between the virtual machine and the VMware ESXi hypervisor

A small but rather useful article. I hope to help someone avoid problems in the future.
Recently, on one of our projects, there was an unexpected storm of incidents caused by the time out of sync between virtuals and NTP servers. The reason was found rather quickly: at this time there was a massive online migration of vMotion between hosts, caused by updating the BIOS of hypervisors. Moreover, the hosts also received time from the NTP server, but the virtual machines started to migrate to them immediately after switching on the hypervisors, when the latter did not have time to fully synchronize the time, respectively, there was a time difference between the hosts between which the migration occurred. Obviously, this was a mistake on the part of the virtualization team, however this caused a storm of incidents on us, the UNIX team.

The situation caused a great surprise, because the setting “Synchronize time with host” was turned off on all virtual machines. The reason was found in VMware KB-shka :
Of particular note are the lines:
In the VMware Tools control panel, it is possible to experience these symptoms:
  • When you suspend your virtual machine, it will keep you up to date.
  • Time is resynchronized when you migrate your virtual disk (or rebooting the virtual machine).

Here so nezhdanchik. It turns out that Mayor forcibly synchronizes time during migration, removal of snapshots and in other "special" cases. If there is a time difference between the two hosts, and you migrate the virtual machine between them, this time difference will affect the system clock, which can lead to known problems with ntpd.

And finally, the most important thing for the sake of which I wrote the article: in the same place, the article talks about how to permanently get rid of this problem - you need to make certain settings for the properties of each virtual machine, namely, to make changes to the virtual machine vmx file:
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"

The same can be done through the vSphere Client interface.
Thus, you can protect yourself from any incorrect time settings on the hypervisor side, caused by human factors or objective reasons.

')

Source: https://habr.com/ru/post/233497/


All Articles