نحوه پیکربندی NTP در VMware VCSA
One of the tasks that an admin has to do when deploying VMware VCSA is to configure NTP. There are several ways to do that and I’ll try to cover those in this post. Perhaps there are also other ways too, feel free to add your thoughts in the comment sections.
VMware VCSA can have two different time settings. Firs it via VMware tools and host time. The second is via ntp server. Depending of your environment you may or may not need one or the other. VMware VCSA and NTP config can be done several ways. Through UI, from the console or Putty SSH session. We’ll start first with the easiest method.
Option 1: VMware VCSA – Configure NTP Through the VAMI – login to the VCSA at this address: https://ip_of_VCSA:5480 and
- login: root
- pass: yourpassword
Option 2: VMware VCSA – Configure NTP Through the console session – open the console session and press ALT + F1 or via Putty session. I prefer putty… -:)
- login: root
- pass: yourpassword
When you first deploy the VCSA, you have a choice to setup NTP. Depending on what was your selection, the NTP settings can vary. There are two options:
- Synchronize appliance time with ESXi host
- Use NTP servers
You can verify what’s the selected option from the CLI, from the putty session. After login as a root, run the command to verify NTP synchronization.
timesync.get
Now, if you run the command to enable NTP-based time synchronization
timesync.set –mode NTP
you’ll get an error saying that no NTP servers are configured…. True -:)
So to Add an NTP server. Do this:
ntp.server.add –servers IP-addresses-or-host-names
Use IP-addresses-or-host-names is a comma-separated list of IP addresses or host names of the NTP servers. For me, it’s a lab test, so I entered only one….
Optional – To Delete:
ntp.server.set –servers IP-addresses-or-host-names
This command sets the NTP servers entered as active NTP servers for the VCSA. NTP daemon is restarted to validate the config.
Once we have entered at least one NTP server we can then enable the NTP mode based time synchronization
timesync.set –mode NTP
(It’s case sensitive)
Optional – To Verify:
Optional – to verify the status:
Yum. We have successfully added an NTP server and activated NTP config on our VCSA. Lab Mission accomplished. Another VCSA lesson done….
You can put a pool of VMware NTP servers if you like….
0.vmware.pool.ntp.org
1.vmware.pool.ntp.org
2.vmware.pool.ntp.org