Date: 15/02/2007
Issue: VMWARE: Linux Guest Machine Clock gains or loses time.
Detail: When using VMWARE with a Linux guest machine installed on it, the clock drifts and either gains or loses time. This is due to the way in which linux keeps time and counts clock ticks on a virtual CPU.
Resolution:
- Firstly ensure that VMWARE Tools is installed on your guest machine.
- If your clock is running fast Add the clock=pit boot option to your guest's kernel command line in the /etc/lilo.conf or /boot/grub/grub.conf file.
- Sample Syntax for LILO:
image=/boot/vmlinuz
label="linux"
root=/dev/hda1
initrd=/boot/initrd.img
append="resume=/dev/hda6 splash=silent clock=pit"
read-only
- Sample Syntax 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
- Adding this boot option disables the kernel's correction for lost ticks, so be sure to also install VMware Tools and turn on time synchronization.
- If your clock is running slow Add nosmp noapic nolapic options to your guest's kernel command line in the /etc/lilo.conf or /boot/grub/grub.conf file.
- Sample Syntax for LILO:
image=/boot/vmlinuz
label="linux"
root=/dev/hda1
initrd=/boot/initrd.img
append="resume=/dev/hda6 splash=silent nosmp noapic nolapic"
read-only
- Sample Syntax for Grub:
title Red Hat Linux (2.4.20-28.9)
root (hd0,0)
kernel /vmlinuz-2.4.20-28.9 ro root=/dev/hda2 nosmp noapic nolapic
- I find applying both of the boot modifications works best, and remember to reboot your guest machine after applying them!
|