VMFAQ.com - FAQing about virtualization since 2008

Add comment
Name:
Email:
* Comment:
(Use BBcode - No HTML)


My virtual machine's clock is inaccurate. What can be done to make it more accurate?

First off, for those who are not familiar with the basic concepts of time keeping and why time is not accurate in virtual environments, this document is heartily recommended: http://www.vmware.com/pdf/vmware_timekeeping.pdf. If you can't tolerate a few seconds of clock skew, achieving clock accurate enough for your needs may require some effort.

General guidelines.

Disabling host power saving options from host BIOS is recommended:
Linux hosts: http://kb.vmware.com/kb/1591 
Windows hosts: http://kb.vmware.com/kb/1227


Linux kernels, especially SMP kernels, have a tendency to lose ticks, ie. their clock runs slow. VMware Tools service can fix this by nudging the clock forwards once a minute. This is usually sufficient. Note that at present Tools will not turn the clock backwards.

Use NTP on host and use VMware tools on guests to synchronize the time. To do this, set tools.synctime = TRUE in the guest's .VMX file.

On VMware ESX 3.x and Workstation 6.x you may consider using the descheduled time service: http://www.vmware.com/pdf/vi3_esx_vmdesched.pdf.

Relevant VMware KnowledgeBase articles:
http://kb.vmware.com/kb/892 (Virtual Machine Seems Slow when Running a Particular Program (Clock Issue))
http://kb.vmware.com/kb/1420 (Clock in a Linux Guest Runs More Slowly or Quickly Than Real Time)
http://kb.vmware.com/kb/1006427 (Timekeeping best practices for Linux)

 

 







RSS