ESXCLI to Check & Change Time on VMWare ESXi Host

Legacy example — originally published April 10, 2020. The command later in this article sets the clock to a date in 2020. Do not run that example unchanged. Check your installed ESXi release and approved time-synchronization design before making a clock change.

Broadcom’s time-synchronization guidance uses UTC for ESXi manual time settings and points to NTP for ongoing synchronization. Start with the read-only check below. For the wider operational context, see Operations & Resilience.

I haven’t had to change the time on a VMWare ESXi server in a while but the opportunity presented itself today. I thought I would publish this quick article as a refresher.

Check the host’s current system time with esxcli system time get. This is a read-only check; it does not change the clock. For available arguments on your installed release, use esxcli system time set --help or the ESXCLI system command reference.

Base Syntax

esxcli system time set accepts -d for day, -H for hour, -m for minute, -M for month, -s for second, and -y for year. Uppercase and lowercase flags are different. Supply the intended UTC values; the dated command below is a historical example, not a command to paste unchanged.

If I wanted to change the time to today’s UTC time and date 0930 April 10th 2020
#esxcli system time set -d 10 -M 4 -y 2020 -H 9 -m 30 -s 0

Summary:
As you can see changing the time on a ESXi host is pretty simple. As always, I hope y’all found this article useful.

Continue reading

Advisory Severity Critical VMware vCenter Server updates address sensitive information disclosure vulnerability in the VMware Directory Service (vmdir) (CVE-2020-3952)

Explore another guide in this topic and build on what you have just read. Read the article

Leave a Comment