Setting the right time in Guest OS
Keeping accurate time is very important for any operating system. Unfortunately, the methods that operating systems use to keep track of time on physical machines do not work well in a virtual environment. Many OSes use a method called tick counting to keep accurate time. This method uses hardware interrupts at a known frequency, then the OS counts the ticks to come up with the current time. In a virtual environment, the hardware is virtualized and shared among many VMs. Because of this, VMs may lose ticks and cause the time to become inaccurate.
Newer operating systems use a tickless timekeeping method, which is easier to support in a virtual environment. In this method, a hardware device keeps track of the number of time units since the system booted, then the operating system reads this counter as needed. This method causes less CPU overhead than tick counting. In order to use tickless timekeeping, the VM must be alerted so that the OS is using tickless...