Here's what to do if your guest clock runs too fast under VMWare Server.
Host Operating System
1. Find your maximum CPU frequency:
cat /proc/cpuinfo |grep -i mhz
2. Add the following lines to /etc/vmware/config:
host.cpukHz = 2800000 (replace with your CPU MHZ * 1000)3. Restart VMWare.
host.noTSC = TRUE
ptsc.noTSC = TRUE
Guest Operating System
4. Change your kernel boot parameters according to the table found here.
5. Configure ntpd according to this document.
6. Ensure ntpd starts on boot.
7. Reboot.
This was tested under VMWare 1.0.9 running on a Centos 5.3 64bit host with CentOS 5.3 64 bit guests. All kernels are SMP.
Update:
Apparently even with the above procedure the guest clock still runs faster something like 1/2 minute per hour. If the applications running on the VM are not time-sensitive one can run an hourly ntpdate cron job instead of ntpd (ntpd doesn't work if the guest clock drifts too much).
It may be that disabling power management on the host helps but I wouldn't go that route given a "good enough" solution as described above, that will work well for the scenarios the guest is being used on.
2 comentários:
Cool tip! Thanks for sharing :o)
I find that passing the following parameters to the guest's kernel and using vmware-tools to synchronize the clock is usually good enough:
"noapic nolapic nosmp clocksource=acpi_pm"
Using "ntpd" is not a good way to keep the time in sync. It mostly works, but since it tries to keep the clock synchronized between checks to the ntp servers by tuning kernel parameters, it transforms small forward jumps in the clock into longer periods of desynchronization.
Enviar um comentário