vSphere ESXi 7.0 U3 and later versions configuration files for NTP and PTP can no longer be edited
book
Article ID: 313808
calendar_today
Updated On:
Products
VMware vSphere ESXi
Issue/Introduction
As part of the bigger goal of moving away from using stickybit files, VMware have moved the configuration stored in these files to ConfigStore. These files are used just as cache files by the services, the configurations in these files are now stored in the ConfigStore. The ConfigStore is the single source of truth in ESXi 7.0 Update 3 and later.
Symptoms:
The ESXi configuration files /etc/ntp.conf and /etc/ptp.conf can no longer be edited directly. It is no longer possible to make changes to NTP, PTP by editing these config files directly. From ESXi 7.0 Update 3, files under /etc are read-only and edits do not persist across reboot.
Environment
VMware vSphere ESXi 7.0.3
VMware vSphere ESXi 8.x
Resolution
Use the following esxcli commands to configure NTP, PTP on ESXi. The commands have been modified to read/write to configstore instead of interacting with a stickybit file.
To display current configuration:
# esxcli system ntp get Here is a typical output: Enabled: true <== NTP service is enabled Loglevel: warning PID: ###### <== PID of the NTP daemon ntpd Runtime Seconds: ## <== Runtime in seconds Servers: ###.###.###.### <== NTP server name or IP address Service Providing Kernel Time: Network Time Protocol Time Service Enabled: true Time Synchronized: true <== Time synchronization is successful.
#esxcli system ptp get
To change configuration:
# esxcli system ntp set 1. Run the command "esxcli system ntp set --help" to view the list of configurable options. 2. To specify a NTP server along with optional parameters, refer to the KB 313810 3. To specify a single NTP server without any additional parameters, run the command "esxcli system ntp set -s NTP_server -e 1" 4. To specify multiple NTP servers, run the command "esxcli system ntp set -s NTP_server1 -s NTP_server2 -e 1" 5. These settings will persist across host reboots.