VMFAQ.com - FAQing about virtualization since 2008
Search:     Advanced search
Browse by category:
Contact Us

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

Add comment
Views: 581
Votes: 1
Comments: 0
Posted: 21 Jan, 2008
by: Huhtinen H.
Updated: 13 Oct, 2008
by: Huhtinen H.

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)

 

 




Also read
document Recommended performance tuning options for Linux guests

Others in this Category
document I have 64bit CPU but I can't boot/install 64bit guests?
document Can I grow an existing virtual disk (.vmdk file)?
document I have a Linux host and can't bridge connections via a wireless NIC
document Accessing content in VMDK files without booting a VM
document Recommended performance tuning options for Linux guests
document Using USB devices in virtual machines
document Setting up samba between host and guest
document Booting an existing physical Windows installation as a virtual machine
document I need more performance out of my VMware environment



RSS