VMWare guest clock too slow
Ok, so earlier we discussed the VMWare guest clock being too fast. That one could be fixed by setting the CPU frequency in the VMWare.conf file.
However one thing that’s driving me nuts for ages is why my 2.6 kernel guests are losing time. Really badly – like 1 minute every 2, almost. Of course, it’s been one of those “I’ll fix it later” issues but tonight I decided the time had come and I was going to fix it now.
Unlike the clock running too fast, this one requires work on the guest OS, not the host. We have to modify the grub.conf file (in Redhat varients, you’ll find this in /boot/grub/grub.conf), so the kernel boots with the following switches:
clock=pit noapic
E.g.
title CentOS (2.6.18-92.1.13.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=/dev/md0 rhgb quiet
initrd /initrd-2.6.18-92.1.13.el5.img
would become
title CentOS (2.6.18-92.1.13.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=/dev/md0 rhgb quiet clock=pit noapic
initrd /initrd-2.6.18-92.1.13.el5.img
This is, frankly, kind of annoying. In my case the box was only using one CPU so I don’t mind the NOSMP switch. I honestly couldn’t tell you if it’s essential, so you may wish to play with it. Some people report success with just clock=pit but others report that doesn’t help.
