How to fix problem when linux guest on vmware has run time fast than host.

I have one server, it is installed CentOS5. After I installed Vmware Server program, I installed new Linux guest virtual machine which it is CentOS5 ,too.

I found this problem when I started it (Linux guest) about 3 days, I found it had shift time.

I try to find root cause of this problem. Ohhh I found.

This problem happen from , Kernel of Linux has function “lost ticks” which it correct real time from host to guest. Unfortunately, this function can trigger the correction spuriously in some case, so resulting in the Linux clock running more quickly than real time. And this is solution for fix it.

1. Install VMware tool. You can follow from this link.

2. Add these lines into the first line of /etc/vmware/config file.

host.cpukHz = 1700000
hostinfo.noTSC = TRUE
tools.syncTime = TRUE

** You can check your CPU speed in file /proc/cpuinfo.

3. Add the clock=pit boot option to your guest’s kernel command line in the /etc/lilo.conf or /boot/grub/grub.conf file.

The following example shows the syntax for LILO:

append=”resume=/dev/hda6 splash=silent clock=pit”

and this is for grub.

title Fedora Core (2.6.9-1.667)
root (hd0,0)
kernel /vmlinuz-2.6.9-1.667 ro root=/dev/hda2 clock=pit

4. Set your time of guest OS to later than host by date command such as , you want to set current date time to January 22, 1982 12:13:14

# date 012212131982.14

5. Shutdown your guest host.

6. Restart VMware program again.

7. Start you guest host.

Perfect :D.


0 0 votes
Article Rating
1 Comment
Inline Feedbacks
View all comments
14 years ago

Hi Mr.Aoddy,

It’s the first time in your web-site.
Your article is very very useful ja ^.^