Ubuntu guest with VMware tools may have guest time over corrected if ntpdate script is running
search cancel

Ubuntu guest with VMware tools may have guest time over corrected if ntpdate script is running

book

Article ID: 400317

calendar_today

Updated On:

Products

VMware vSphere ESX 7.x

Issue/Introduction

Ubuntu Guest OS time is ahead of the current time after a reset or reboot

Environment

  • VMware vSphere 7.0.3
  • Ubuntu guests 18.04/16.04/14.04

Cause

  • This issue occurs due to a race condition between VMware tools and /etc/network/if-up.d/ntpdate script if they attempt to correct the guest operating system time at the same time.

Example Scenario:

  • Change the guest operating system time backward by X mins and sync to hardware clock
  • Reboot/Reset the guest operating system
  • After the reset, VMware tools will correct the guest operating system time with an offset of +X mins. At almost the same time, /etc/network/if-up.d/ntpdate script may also correct time with offset of +X mins.
  • Guest operating system time is now corrected twice and will have current time + X mins.

This is not likely to happen but it is possible.

Resolution

To prevent the issue from occurring modify the file name from /etc/network/if-up.d/ntpdate to /etc/network/if-up.d/ntpdate.disabled

Note: No service restart is required for the changes to take effect. During the next reset or reboot, ntpdate will not act and only VMware tools will do the time correction.