user3320717
user3320717

Reputation: 11

How to prevent time synchronization on Azure VM

I'm trying to simulate a different date/time on an Azure VM to test an application, but the time keeps resetting itself to the current date/time. Is there a way to force the server to stay at a specific date/time until I manually change it back?

I have disabled the Windows Time service, the Hyper-V Time Synchronization Service and changed the time settings to not synchronize with an internet time server. Before doing this the server would immediately revert to the correct date/time. Now it will stay for an hour or more but then still reverts to the current date/time.

What causes this and is there a way to stop it?

Upvotes: 1

Views: 2530

Answers (1)

Vishal Saxena
Vishal Saxena

Reputation: 11

As described by Angshuman Nayak of Cloud Integration team at Microsoft on his blog post

"The Fabric Controller maintains operating system time synchronization for the system when roles are first booted. If you utilize administrative access startup scripts to change the localization settings (including local server time), but it is not recommended you do so. Doing so will introduce instability and the fabric controller may determine your role is out of sync. You will likely end up cycling your roles as fabric attempts to bring them to goal state in such a case. A better strategy is to write your applications to be aware that they actually run with UTC and default US CultureInfo settings."

it seems that what you are seeing is an expected behavior as fabric controller is marking the instance as dirty and trying to cycle it.

hope this helps


Please mark as answered if it helped

Vishal Narayan Saxena

Upvotes: 1

Related Questions