Manually adjust ESX local time
VM-Aware.com posted Amending ESX Time which is a great guide for setting the time on an ESX host when you can not automatically sync with a NTP server. The post explains how to use the standard Linux date command. Personally, I can never remember the parameter order when using date because it’s not the expected mm/dd/yy format. Finally, the guide shows how to use the hwclock command to make sure the ESX internal clock matches the newly adjusted OS time.
Follow the link above for the original post. I have slightly modified the command syntax in the following steps here based on my experience.
These commands can be entered on the service console locally, or remotely via putty or any similar tool.
To see the current ESX time:
To manually adjust the time:
for example to set the date and time to May 02, 2008 an 6:23 pm enter the following:
#date -s 0502182308
To check the current time for the hardware clock type:
Sync the hardware clock with the Service Console:
Of Course, this is a manual, one time adjustment. You should monitor your ESX hosts to make sure that time is always current by repeating these commands as necessary. That’s the advantage of automated syncing with an NTP server.
**Note that the post from VM-Aware.com uses the following parameter syntax for using the date command:
date -s “MM/DD/YYYY HH:SS”
So in my case it looked something like this:
date -s “05/01/2008 15:07?
I’ve never tried that syntax so I can’t verify if it works or not. It did putty to one of our ESX hosts just to verify the date command’s manual syntax instructions. You can see that result in the screenshot above.
Technorati Tags: virtualization, vmware, esx, ntp, hwclock, date, linux, vmetc.com









