Monday, August 17, 2009

Clock in a VMWare FreeBSD Guest Runs More Slowly or Quickly Than Real Time

Method 1.
Add the following to /boot/loader.conf and reboot: kern.hz="100"

According to the author of this solution it has something to do with the amount of interrupts/second that various kernels generate. Reducing the load creates a work around for the problem.

Method 2.
Add the following to /boot/loader.conf and reboot: hint.apic.0.disabled=1

By disabling APIC device, FreeBSD is forced to fall back on the IRQ timers to avoid the rate of the clock and timer on emulated FreeBSD machine on VMware slows down. The down side to this resolution is that FreeBSD cannot runs in as SMP kernel mode as a virtual SMP machine on the emulated machine.

Another alternative is to comment out the “device apic” line in the kernel config file and rebuild the kernel, but only if you are technically know what you’re doing.

Anonymous said...

kern.hz="100" does not help me and I guess disabling APIC is no acceptable, because VM has 2vCPU on real Athlon64 X2 CPU Linux host.


No comments: