We’re running Windows Server 2008 R2 for host and Windows Server 2008 R2 as a virtual machine using Hyper-V.
For some reason, the time synchronization doesn’t work well. No matter we disable the hyper-v time synchronization option on the host side or enable it. After the gap is more than 5 seconds, some issues will occur because of incorrect time.
We tried a lot and found there are several options:
- Restart the VM.
- Disable the time synchronization option in hyper v and enable it again.
- Write batch scripts in the VM to restart the time sync service.
We choose the last one because it can be automatically run:
1. Create a bat file as following:
net stop vmictimesync net start vmictimesync
2. Create a scheduled task to run the script at 1:00am everyday:
It works pretty fine now.