Friday, June 3, 2016

Windows 10 TH2 - date and time are frozen (continously revert to some date in the past)

I've noticed something strange with my Windows 10 TH2 labs running as guest on Hyper-V host Windows Server 2016 TP5. After some time of operating, labs enter some bad state:
  • Date and time is frozen at some time in the past.
  • Win10 VM utilizes 100% of one CPU core (by svchost.exe)
  • VM stops responding after some time of operating in this state.
I've also noticed that bug appears only when there is no Internet connection (LAN without routes to the Internet and without the proxy).

How to fix that issue

Just start a command prompt as an administrator:
reg.exe add "HKLM\System\CurrentControlSet\Services\W32Time\Config" /v "UtilizeSslTimeData" /t REG_DWORD /d 0 /f
net stop w32time
net start w32time
Or you can apply Group Policy setting:
\Computer Configuration\Policies\Administrative Templates\System\Windows Time Service\Global Configuration Settings     UtilizeSslTimeData=0
\Administrative Templates\System\Windows Time Service\Global Configuration\Settings\UtilizeSslTimeData=0
* If you do not have "UtilizeSslTimeData" setting in your Group Policy Editor, you can use custom ADMX file W32Time_custom.admx to make it available (copy ADMX and ADML to C:\Windows\PolicyDefinitions\ folder and "UtilizeSslTimeData" will be accessible under \Computer Configuration\Policies\Administrative Templates\System\Windows Time Service (Custom)\Global Configuration Settings)

What causes that issue

As I realised reading this article, there is a new feature in the time synchronization service: 'Secure Time'. When the Internet connection is available, Windows 10 host automatically synchronizes time with SSL server (what server? I have no idea. It can be server for windows telemetry, windows update server or maybe this could be any https server?). And there is a bug in this logic: when the computer have no Internet access for some time, this logic is activated and reverts time to the time in the past again and again, to the time when Internet connection was available last time.

How I investigated this issue

WinDbg helped me to find out who freezes the time and date

I've attached to Windows 10 x86 VM with WinDbg as kernel debugger (KDnet & Hyper-V are really useful for kernel mode debugging and are my friends!).

Then I installed breakpoint on KeSetSystemTime function:

Tuesday, May 24, 2016

The problem while uprgading Windows Server 2016 TP4 to TP5 (BCD is invalid or corrupted)

I've got an error while upgrading Windows Server 2016 Technical Preview 4 (TP4) to Tech Preview 5 (TP5):

Something happened. Windows Server 2016 Technical Preview 5 installation has failed

Advanced error description can be found in the file:

In my case the file setuperr.log has the following content:

Error                 IBSLIB OSRollbackService::CBootFilesRestoreCheckpoint::Finalize: Failed to backup BCD database from "G:\Boot\BCD" to "C:\$WINDOWS.~BT\Sources\Rollback\Boot\BCD".[gle=0x00000006]
Error      [0x064199] IBSLIB SetCheckpoint(WinPEBootFilesRestoreCheckpoint): threw exception.: class RollbackException: RollbackException: Error(6), CSystemVolumeSelectionCheckpoint: Failed to backup BCD database. void __cdecl OSRollbackService::CBootFilesRestoreCheckpoint::Finalize(const unsigned short *,struct OSRollbackService::ICheckpointParameters *)[gle=0x00000006]