Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

Skip to main content

Products and Accounts

Support

Knowledge

Communities

Success

Learning

My Subscriptions

Loading

Knowledge Base

Guide to configure NTP on ESX servers (1003063)

Last Updated: 8/12/2014Categories: How toTotal Views: 190405Language:
Chinese (Simplified)JapaneseEnglish

7 like this article

Subscribe to get an email
newsletter with new updates

7 people found this helpful Please provide article feedback:

Details

System time is an issue of great importance to many computer applications. Databases, security monitoring tools, e-mail systems, syslog and other logging tools all use time stamps in writing transactions and/or noting various events. VMtools has an option for virtual machines to sync with the ESX host they are running on. It should be obvious that all of the ESX hosts in a given resource cluster should have their own system clocks synchronized so that when a virtual machine is vMotion'd from one ESX host to another, its system time would remain consistent.

ESX hosts include NTP software and start the ntpd service by default. ESX hosts are not configured to actually make use of NTP upon installation, nor is there anything in the standard installation process which gives the administrator a chance to set this. Proper NTP usage only occurs when the administrator is knowledgeable of NTP and its administration, and has as standard practice, configuration of NTP as one of their post-installation tasks. This is often not the case.

This article is intended for adminstrators and VMware Tech Support Engineers as a guideline to configuring ESX hosts for NTP use.

Note: For ESX 3.5 and above, NTP can be configured from vSphere Client and no longer requires manual configuration. For more information, consult the Datacenter & Cloud Infrastructure section of VMware documentation for your version of ESX.

Solution

Setting time on your ESX host:

Connect to an ESX host using an SSH client.

Log in with an user having administrative privileges.

To open up the ntpClient port in the internal ESX host firewall, run the commands:

esxcfg-firewall -q ntpClient
esxcfg-firewall -e ntpClient
esxcfg-firewall -q ntpClient

Note: The first line tells the status of the ntpClient port. The second line enables the ntpClient port. The third line shows you that it is open.

Now set the system time to the right time. If your ESX host has ntp access to the Internet, you can just issue the ntpdate command, with the -u switch, and point it at an ntp server. If your ESX host is blocked by your corporate firewall, you have to point it at an internal ntp server. If you do not have one, you have to set one up. Any of these ntpdate command should work:

ntpdate -u pool.ntp.org
ntpdate -u north-america.pool.ntp.org
ntpdate -u 0.us.pool.ntp.org

Or for example, if your internal ntp server was called ntp.yourdomain.com, you would issue the command:

ntpdate -u ntp.yourdomain.com

Note: Some programs react badly to sudden large changes in system time. For this reason, just updating and restarting ntpd as described below is preferred by some ntpd updates the system clock slowly for this reason.

Configure the ESX host as an ntp client. Make a backup copy of /etc/ntp.conf using the command:

cp /etc/ntp.conf /etc/ntp.conf.bak.`date +%d%m%y`

Create a new ntp.conf file that contains this information:

restrict 127.0.0.1
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
server north-america.pool.ntp.org
server pool.ntp.org
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008

Note: This ntp.conf assumes that the ESX host can send an ntp request out to the Internet. If you have outgoing ntp traffic blocked by your corporate firewall, you must instead set up an internal ntp server and make sure that it has access to the Internet so it can get an accurate time. While it is possible for you to configure one of your ESX hosts as an ntp server as well as a client, we recommend that ESX hosts be used solely as ESX hosts, and that they not be used for supporting IT infrastructure needs like ntp.

If your corporate firewall has ntp access blocked to the Internet, then your ntp.conf file should contain something like this, under the assumption that you have an internal ntp server, which separately has Internet ntp access:

restrict 127.0.0.1
server ntp.yourdomain.com
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008

Restart the ntpd service using any of these commands:

service ntpd restart
/etc/init.d/ntpd restart

Update the hardware clock with the current time of the system clock. Even though the system clock is updated from a known ntp server which has the right time and reconfigured ntp and restarted ntpd service, when the machine reboots, it sets its system clock based upon the time from the internal hardware clock.

/sbin/hwclock --systohc

Related KB Articles

Adjusting ESX Server Time Zone (1436)

Using ESX as an NTP server (1002864)

Installing and Configuring NTP on VMware ESX Server (1339)

Additional Information

For translated versions of this article, see:

日本語：ESX サーバでの NTP の構成ガイド （1033366）

简体中文: 在 ESX Server 上配置 NTP 指南 (2086210)

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)JapaneseEnglish

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware ESX Server

Related Versions:

VMware ESX Server 3.5.x

VMware ESX Server 3.0.x

VMware ESX Server 2.5.x

VMware ESX Server 2.1.x

VMware ESX Server 2.0.x

VMware ESX 4.1.x

VMware ESX 4.0.x

Take Our Survey

Was this article helpful?

YES

NO

Copyright © 2005-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

Terms of Use

Your California Privacy Rights

Privacy

Accessibility

Cookie Settings

Support Assistant