Esx3.5 NTP configuration error Solution

Source: Internet
Author: User
Document directory
  • ESX Server 2.0.1 and later
  • ESX sever 2.0.0

Esx3.5 NTP configuration error Solution

This article mainly solves the "failed to change host configuration" Error When configuring esx3.5 NTP using GUI. The solution is to manually modify the configuration file.

Note: After the manual modification is completed, the time configuration information displayed in the Vic does not match the actual configuration. To ensure consistency, restart MGMT-VMware. the startup method is/etc/init. d/MGMT-VMware restart.

The detailed procedure for manually modifying the configuration file is as follows (the red part is required, and other options are available ):

 

Installing and installing ing NTP on VMWare ESX Server
Products
VMware ESX
 
Details

How do I install and configure NTP on an ESX Server System?

Solution
Note:This article was updated March 16,200 7 to addVMWareTo the pool designation. All examplesX.pool.ntp.orgHave been changedX.vmware.pool.ntp.org. The last linePool.ntp.orgIn/Etc/NTP/step-tickersAnd/Etc/hostsHas been removed from the examples. This line is no longer required.

Beginning with ESX Server 2.0.1, NTP is installed by default during the installation of ESX Server. See the following instructions to configure this service.

For ESX Server 2.0.0, see the instructions later in this article to install and configure NTP.

ESX Server 2.0.1 and later

To configure NTP on the service console, you must:

  1. Edit the following configuration files, as described in the following sections:
    1. /Etc/NTP. conf
    2. /Etc/NTP/step-tickers
    3. /Etc/hosts

  2. For ESX Server 3.0 only, run the following command. This opens the appropriate ports and enables the NTP daemon to talk with the external server.

    [Root @ esxhost] # esxcfg-firewall -- enableservice ntpclient

  3. RestartNtpd.
Editing/etc/NTP. conf

Specify a pool of NTP servers to which your ESX Server System will sync (for more information about using NTP server pools, see http://www.pool.ntp.org/use.html ).

  1. Log on to the service console as the root user.
  2. You are going to replace the content/Etc/NTP. conf, So make a backup copy of this file:

    CP/etc/NTP. CONF/etc/NTP. conf. BK

  3. Edit the contents of the default/Etc/NTP. conf, Which the ESX Server Installation creates for you, so the file looks like this:

    Restrict 127.0.0.1
    Restrict default Kod nomodify notrap
    Server 0.vmware.pool.ntp.org (IP addresses can be used)
    Server 1.vmware.pool.ntp.org
    Server 2.vmware.pool.ntp.org
    Driftfile/var/lib/NTP/drift

    1. Restrict-the first restrict is required because ntpd needs to resolve hostname addresses via the loopback network. if this entry does not exist, the system log (/var/log/messages) will show something like this:

      Ntpd_initres: NTPD returns a permission denied Error

      For systems directly connected to the Internet, the secondRestrictLine provides a basic level of protection from General UDP spoofing of NTP.

    2. Kod-Sends a Kod packet when an access violation occurs.

    3. Nomodify-DeniesNtpqAndNtpdcQueries that attempt to modify the run-time configuration of the server. Queries that return information are permitted.

    4. Notrap-Declines to provide mode 6 Control Message trap service to matching hosts. The trap service is a subsystem ofNtpdqControl Message Protocol, which is intended for use by remote event logging programs.

For better protection, you may want to addNoquery, Which prevents remote queries, andNopeer, Which prevents a host from trying to peer with your server and to allow a rogue server to control the clock.

Refer to http://www.eecis.udel.edu /~ Mills/NTP/html/accopt.html for a full description of these access control commands.

The0,1, And2.vmware.pool.ntp.orgNames point to a random set of servers that change every hour.

TheDriftfileLine indicates the name of the file where the value for the system's clock drift (frequency error) is stored. For a more complete definitionDriftfile, See http://www.eecis.udel.edu /~ Mills/NTP/html/notes.html.

Editing/etc/NTP/step-tickers

Perform the following steps as the root user on the service console.

  1. If you want, make a backup copy of your/Etc/NTP/step-tickersFile:

    CP/etc/NTP/step-tickers/etc/NTP/step-tickers.bk

  2. Edit/Etc/NTP/step-tickersSo that the file looks like the following example:

    0.vmware.pool.ntp.org (IP addresses can be used)
    1.vmware.pool.ntp.org
    2.vmware.pool.ntp.org

Editing/etc/hosts

Perform the following step as the root user on the service console.

  1. Edit/Etc/hosts.
  2. Add the following list of NTP pool servers to the end of your existing hosts list.

    0.vmware.pool.ntp.org
    1.vmware.pool.ntp.org
    2.vmware.pool.ntp.org

    Adding this list of NTP servers minimizes the impact of DNS lookup failures during NTP synchronization.

ESX 3.0 only: Enabling NTP client for firewallas noted earlier in this article, remember to run the following command. This opens the appropriate ports and enables the NTP daemon to talk with the external server.

[Root @ esxhost] # esxcfg-firewall -- enableservice ntpclientRestarting and monitoring the NTP service

Perform these steps as root on the service console.

  1. After you have edited the previous files, restart the NTP service.

    • To restart the service now, run:

      Service ntpd restart

    • To enable the NTP daemon to autostart when the server is rebooted, run:

      Chkconfig -- level 345 ntpd on

  2. Now you can set the local hardware clock to the NTP synchronized local system time. Run:

    Hwclock -- systohc

    AsNtpdSuccessfully polls NTP servers, the kernel automatically sets the hardware clock to the system clock time periodically.

  3. Monitor the NTP service as desired:
    • To see the offset (in seconds) between the local clock and the source clock, run:

      Ntpdate-QTime_server_name_or_ip_address

      If the correction resulting from synchronizing the local clock with the time server is large enough, it cocould affect the operating systems or applications running in virtual machines when they synchronize their clocks with the ESX Server System on which they are running.

    • To watch the status ofNtpdProcess, run:

      Watch "ntpq-P"

      Press ctrl-C to stop watching the process.

      Note the information in the following columns:

      • The character in the first column indicates the quality of the source.

      • The asterisk (*) Indicates the source is the current reference.

      • RemoteLists the IP address or host name of the source.

      • WhenIndicates how many seconds have passed since the source was polled.

      • PollIndicates the polling interval. This value increases depending on the accuracy of the local clock.

      • ReachIs an octal number that indicates reachability of the source. A value377Indicates the source has answered the last eight consecutive polls.

      • OffsetIs the time difference between the source and the local clock in milliseconds.

      Note:IfNtpq-PReturnsNtpq: Read: Connection refused, Check/Var/log/messagesFor a more detailed error message.

Additional documentation for NTP is available at http://ntp.isc.org/bin/view/Main/DocumentationIndex.

ESX sever 2.0.0

To install and configure NTP on the console Operating System (service console ):

  1. Log on to the console as the root user.
  2. Mount the ESX Server CD on the console:

    Mount/mnt/CDROM

  3. Change to/Mnt/CDROM/RedHat/RPMSDirectory.
  4. Install the NTP package:

    Rpm-uhv ntp-*. i386.rpm

  5. Change to/EtcDirectory.
  6. You shoshould be able to find a file calledNTP. conf(AfterRpmInstallation) in/EtcDirectory (you changed into this directory in step 5). Edit this file using:

    Vi ntp. conf

  7. Find the line that reads:

    Server 127.127.1.0 # local clock

    Change it:

    Server 192.6.38.127 # this is an example only

    Save the file.

  8. Create a file namedStep-tickersIn/Etc/NTPDirectory. In this file, list the Host Name of your reference time server.
  9. To enable the NTP daemon to autostart when the server is rebooted, run:

    Chkconfig ntpd on

  10. To start it now without rebooting, run:

    /Etc/rc. d/init. d/ntpd start

    The time drift corrects after a while.

  11. Wait a few seconds (up to a minute), then run:

    Ntpq-P

    This lists the current status.

  12. UseUmountTo unmount the ESX Server CD:

    Umount/mnt/CDROM

These examples use a source server IP address obtained from a list of open access NTP servers. You may select one that suits you from the http://ntp.isc.org/bin/view/Servers/WebHome.

Product Versions
VMware ESX Server 2.1.x
 
VMware ESX Server 2.5.x
 
VMware ESX Server 3.0.x
 

Reprinted from:

Http://blog.chinaunix.net/u3/90963/showart_2047779.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.