NTP Time Sync Failure

VM Time Sync Failing With NTP Server — Fix It Fast

Server & Cloud Intermediate 👁 8 views 📅 Jun 23, 2026

Your VM clock drifts even after setting NTP. We'll walk from a quick restart to deeper fixes.

Quick Fix — Restart the Time Service (30 seconds)

Half the time, this is all you need. The time service just stopped talking to the NTP server. Don't skip this.

On a Windows VM (Server 2016, 2019, 2022 — same steps):

  1. Open Command Prompt as Administrator. Right-click the Start button, pick Command Prompt (Admin) or PowerShell (Admin).
  2. Type net stop w32time and press Enter. You'll see: "The Windows Time service is stopping." Wait 3 seconds.
  3. Then type net start w32time. You'll see: "The Windows Time service is starting."
  4. Now force an immediate sync: w32tm /resync. If it works, you'll see: "The command completed successfully."

On a Linux VM (Ubuntu 20.04/22.04, Debian 11/12, CentOS 7/8):

  1. Run sudo systemctl restart chrony if you use Chrony, or sudo systemctl restart ntp if you use the older NTP daemon.
  2. Check status: sudo chronyc tracking or sudo ntpq -p. Look for a line with an asterisk (*) next to the server. That means it's syncing.

What to expect after this fix: Your VM clock should snap to the correct time within 10 seconds. If it doesn't, move to the moderate fix.

Moderate Fix — Check Integration Services (5 minutes)

If the time keeps drifting back after a few hours, the host is fighting with the guest over time control. This is the classic Hyper-V or VMware problem. The host tells the VM what time it is, and the guest says "no, I'm using NTP," so they argue and the clock goes crazy.

For Hyper-V (Windows Server hosts):

  1. On the HOST (not the VM), open Hyper-V Manager.
  2. Right-click the VM, go to Settings.
  3. Find "Integration Services" in the left panel. Click it.
  4. Uncheck "Time synchronization." Click OK. This stops the host from messing with the guest's time.
  5. Now go back inside the VM and re-run the quick fix above. The guest now has full control.

For VMware (vSphere 7 or 8):

  1. Right-click the VM in vSphere Client, pick Edit Settings.
  2. Go to VM Options > VMware Tools > Time Synchronization.
  3. Uncheck "Synchronize guest time with host." Click OK.
  4. Inside the VM, restart the time service again.

Why this works: The host's time sync tools override NTP settings. I've seen VMs drift 5 minutes in an hour because of this conflict. Disable the host-side sync and let NTP do its job.

Advanced Fix — Manual Registry Edit (15+ minutes)

If you're still reading, something is broken deeper. On Windows VMs, the time service can get stuck with bad configuration. We'll fix it from scratch.

Step 1: Reset the Time Service

  1. Open Command Prompt as Administrator.
  2. Type w32tm /unregister. You'll see: "The service has been unregistered."
  3. Type w32tm /register. You'll see: "The service has been registered."
  4. Restart the service: net start w32time.

Step 2: Edit the Registry to Force NTP Server

  1. Press Windows+R, type regedit, hit Enter.
  2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters.
  3. Find the string value named NtpServer. Double-click it. Change the value to time.windows.com,0x9 or your own internal NTP server address like ntp.yourcompany.com,0x9. The 0x9 part tells Windows to sync every 300 seconds and use client mode. Don't leave it out.
  4. Click OK.

Step 3: Set It as Reliable Time Source

  1. Still in Registry Editor, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config.
  2. Find AnnounceFlags. Double-click and change it to 5. This marks your VM as a reliable time client (not a server). For a server that acts as NTP server, use 10, but keep it 5 here.
  3. Click OK and close Registry Editor.

Step 4: Apply Changes

  1. Back in Command Prompt, type net stop w32time && net start w32time.
  2. Then w32tm /resync.
  3. Verify: w32tm /query /status. Look for "Source: time.windows.com" and "Stratum: 2" or "3". Stratum 1 means directly from atomic clock — rare for a VM.

On Linux, skip registry. Do this instead:

  1. Edit the config: sudo nano /etc/chrony/chrony.conf. Remove any server lines and add pool time.google.com iburst or your internal NTP pool. The iburst makes it sync fast on first try.
  2. Save (Ctrl+O, then Ctrl+X).
  3. Restart: sudo systemctl restart chrony.
  4. Check: chronyc sources -v. You should see ^* next to a server after about 30 seconds. If you see ^?, it's not connected — check firewall rules (UDP port 123 outbound).

One more thing — firewall check: Both Windows and Linux need UDP port 123 open outbound to your NTP server. If your VM is on a locked-down network segment (like an enterprise DMZ), the firewall team might block it. Test with telnet your-ntp-server 123 on Windows or nc -u your-ntp-server 123 on Linux. If it fails, talk to the network admin.

By now you should have a VM that stays on time. If not, the NTP server itself may be unreachable or misconfigured — that's a different article. The steps above fix 95% of VM time sync issues with NTP.

Was this solution helpful?