If you have a hyper-v infrastructure and one of your VM time is not syncing with the host machine, enable time synchronisation on the effected VM. By following the steps below:
- On the host machine, launch Hyper-V Manager and right click on the effected VM and click on settings as shown below
- From the settings, scroll down and click on Integration Service and on the right hand pane, check time synchronisation and click Ok
If Time synchronisation is already enabled, uncheck it and click apply and Ok and go back to the same settings and check the box and click Ok. This will refresh the time sync on the VM and the time will point to the host.
If your host is pointing to itself and you would like to point the time to a different server, you can do this by running the commands below:
- Launch command prompt
- Type Net stop w32time – Stops w32time service
- W32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org” – This will configure the time to an external server (in this instance ntp.org)
- Resync time = w32tm /resync – Resyncs the time
- Net Start w32time – Start the w32time service
- W32tm /query /source – Confirm which server the time is pointing to
If an error appears saying access denied, you need to run the command prompt as an administrator by right clicking on the command prompt and select run as administrator.