Thursday, February 5, 2015

Time Synchronization Between Virtual Machine and ESXi Server


Time synchronization between virtual machine and ESXi server is very important. It would be really painful if you had to manually configure and sync the time between the host and virtual machines. But VMware ESXi have built in time management to make your life easier. Today I will show you how to configure NTP Server in ESXi host and sync time between the VMs and host machines.

Time Synchronization Between Virtual Machine and ESXi Server

Log in to VMware host via vSphere client. Click Inventory and select the particular host.You will now see bunch of tabs on right window. Click the configuration tab as you can see the picture below shows just that. Time Synchronization Between Virtual Machine and ESXi Server
Then click properties on top right corner. You will see the following dialog box after clicking it.
Configure NTP Server in ESXi Host
Now, click the Options button.
Time Synchronization Between Virtual Machine and ESXi Server
In the General tab, select Startup Policy as Start automatically if any ports are open, and stop when all ports are closed. Click Restart and click OK. Now select NTP Settings on the left pane. Here you can add the NTP server. Clickadd button and give the IP address or domain name ofĂ‚  the NTP server. Then click OK.
Configure NTP Server in ESXi Host
Select the check boxRestart NTP service to apply changes and click OK. Now, click the check box, NTP Client Enabled.
NTP Checked
Now your host gets IP address from NTP server. After getting IP from NTP server you now want to sync time between host and VMs. As we are already in vSphere client. Right click on any of the virtual machine and click edit settings. This will open up the properties of virtual machine.
sync time between vm and host
Here, select the Options Tab. Click on VMware Tools on the left pane. On the right pane select the check box,Synchronize guest time with host.  Now your virtual machine gets the time from your host machine.

References

  1. Configuring Network Time Protocol (NTP) on ESX/ESXi 4.1 and ESXi 5.0 – VMware Knowledge Base
  2. Troubleshooting NTP on ESX and ESXi – VMware Knowledge Base
  3. Verifying NTP on ESXi