Windows Server: Wrong time on boot after migration to PVE (XCP-ng vs. VMware)

McShadow

New Member
Sep 24, 2025
13
2
3
Hi,

I'm seeing different time behavior when migrating Windows Server 2022 VMs to PVE, depending on the source.


Scenario 1 - Migration from VMware to PVE:
  • Time is correct immediately after boot (e.g. 09:57, UTC+2 / local time)
Scenario 2 - Migration from XCP-ng to PVE:
  • Time is incorrect after boot until timesync is complete (e.g. 07:57, UTC instead of +2 / local time)

Workaround (on VM migrated from XCP-ng)
Code:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t REG_DWORD /d 1 /f
  • Time is correct immediately after boot

Why does this issue seem to only appear with VMs migrated from XCP-ng, but not from VMware?

How are you handling this? Any better approaches for a production environment?


Best regards
McShadow
 
I double checked the VM settings and realized that the OS type was set incorrectly. I assume that the 'Use local time for RTC' option (set to 'Default (Enabled for Windows)') depends on the selected OS type.

After removing the registry key and setting the OS type to Microsoft Windows 11/2022/2025, the time is now correct.

However, I have another VM with the OS type set to Linux that does not show this behavior.
 
FWIW in my experience, the "Use local time for RTC" setting doesn't matter/doesn't help, but if the W32Time service is set to automatic start it should fix itself immediately after boot. YMMV...