System clock updating

So if the snapshot was taken one month ago – the time and date will report that it is still one month ago.Interestingly enough, at this point in time we will be reporting the correct (with some caveats) time in the systems RTC.This real-time clock is backed by a small battery (you have probably seen the battery yourself if you have ever pulled apart a computer).Unfortunately virtual machines do not have any “batteries”.This is done without the use of the Hyper-V time synchronization integration servers (it happens long before the integration services have loaded).The downside of this approach is that this does not take into account any potential time zone differences between the management operating system and the guest operating system.While all computers contain a hardware clock (called the RTC – or real-time clock) most operating systems do not rely on this clock.Instead they read the time from this clock once (when they boot) and then they use their own internal routines to calculate how much time has passed.

In order to deal with time drift in a virtual machine – you need to have some process that regularly gets the real time from a trusted source and updates the time in a virtual machine.

The reason for this is that “time zones” are a construct of the software that runs in a virtual machine – and is not communicated to the virtual hardware in any way.

So – in short – when we start a virtual machine there is no way for us to know what time zone the guest operating system believes it is in. As I have mentioned above – all time synchronization that is done by the Hyper-V time synchronization integration service is time zone aware.

UTC (which is the computer techy version of saying GMT) time would solve this problem nicely with only one problem.

Windows does not support UTC time in the BIOS (Linux does).

Search for system clock updating:

system clock updating-81system clock updating-34

One partial mitigation we have for this issue is that when the Hyper-V time synchronization component loads for the first time – it does an initial user mode set of the time to ensure that the time gets corrected as quickly as possible (using the same technique as discussed in problem #2). So now that you understand how this all works – let’s discuss some common issues and questions around virtual machines and time synchronization. If you disable the Hyper-V time synchronization integration service you will disable all the time synchronization aspects of Hyper-V that are time zone aware – and only leave the initial RTC synchronization active – which is not time zone aware.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “system clock updating”

  1. Join my world as I explore jewellery and fashion from past to present with weird and wacky to the so so normal. One of the best ways is by reference through brochures, trade magazines or other paperwork produced by the jewellery company.