ESXi host time settings

From Notes_Wiki
Revision as of 12:58, 26 March 2021 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb self="VMWare vSphere or ESXi">VMWare vSphere or ESXi|VMWare vSphere or ESXi</yambe:breadcrumb> =VMWare vSphere or ESXi= It is critical for ESXi host to have...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb self="VMWare vSphere or ESXi">VMWare vSphere or ESXi|VMWare vSphere or ESXi</yambe:breadcrumb>

VMWare vSphere or ESXi

It is critical for ESXi host to have correct time. Problem with ESXi host time can also manifest as wrong time in VMs esp. vCenter. This may lead to issues with distributed vSAN storage and also lead to issues with log times being wrong. Hence to ensure that ESXi host has correct time, perhaps do the following:

  1. Configure NTP at OOBE level such as IMM / iDRAC / iLO / XClarity etc. In this case ensure that timezone is set to UTC. Note that ESXi host time is always in UTC and cannot be changed. We can set appropriate timezone in vCenter, if we want to see this converted to local time at vCenter UI level.
  2. Configure NTP at ESXi level using ESXi host or vCenter. Ideally this should lead to correct time. However, if host time was in future then ESXi may not correct it immediately using NTP else events that happened a few seconds ago (past) would end up looking like they happened in future. To avoid this the clock could slow down (Count only 30 seconds every 60 seconds) or speed up (count 120 seconds every 60 seconds, etc.)
  3. If we do want the clock to auto-correct gradually or if there is no NTP and we want to set correct time manually use:
    esxcli hardware clock set -d 23 -H 09 -m 59 -M 03 -y 2021
    esxcli system time set -d 23 -H 09 -m 59 -M 03 -y 2021
    Where
    hardware clock
    Refers to BIOS /CMOS hardware clock
    System time
    Refers to currently running system software clock
    -y
    Refers to year
    -M
    Refers to month
    -d
    Refers to day of month
    -H
    Refers to hour
    -m
    Refers to minute
    • Note the inconsistency where captial M is for month and small m is for minute. While capital H is for hour and small d for day.
  4. After this check the time using 'date' command or using Web UI


Refer:



<yambe:breadcrumb self="VMWare vSphere or ESXi">VMWare vSphere or ESXi|VMWare vSphere or ESXi</yambe:breadcrumb>