I was damn tired of time sync issues related to guest hosts running on top of VMware ESX 3.5 host. Even though I have installed ntp client on all the servers, but still the guest OS's are running out of Sync.
NTP Recommendations
Note: In all cases use NTP instead of VMware Tools periodic time synchronization. Also, you may need to open the firewall (UPD 123) to allow NTP traffic.
The following is a sample /etc/ntp.conf :
tinker panic 0
restrict 127.0.0.1
restrict default kod nomodify notrap
server 0.vmware.pool.ntp.org
server 1.vmware.pool.ntp.org
server 2.vmware.pool.ntp.org
driftfile /var/lib/ntp/drift
The following is a sample /etc/ntp/step-tickers :
0.vmware.pool.ntp.org
1.vmware.pool.ntp.org
The configuration directive tinker panic 0 instructs NTP not to give up if it sees a large jump in time. This is important for coping with large time drifts and also resuming virtual machines from their suspended state.
Note: The directive tinker panic 0 must be at the top of the ntp.conf file.
It is also important not to use the local clock as a time source, often referred to as the Undisciplined Local Clock. NTP has a tendency to fall back to this in preference to the remote servers when there is a large amount of time drift.
An example of such a configuration is:
server 127.127.1.0
fudge 127.127.1.0 stratum 10
Comment out both lines.
After making changes to NTP configuration, the NTP daemon must be restarted. Refer to your operating system vendor’s documentation.
VMware Tools time synchronization configuration
When using NTP in the guest, disable VMware Tools periodic time synchronization.
To disable VMware Tools periodic time sync you use one of the following options:
-
Set tools.syncTime = "0" in the configuration file (.vmx file) of the virtual machine.
OR
-
Deselect Time synchronization between the virtual machine and the host operating system in the VMware Tools toolbox GUI of the guest operating system.
OR
- Run the vmware-guestd --cmd "vmx.set_option synctime 1 0" command in the guest operating system.
These options do not disable one-time synchronizations done by VMware Tools for events such as tools startup, taking a snapshot, resuming from a snapshot, resuming from suspend, or VMotion. These events synchronize time in the guest operating system with time in the host operating system, so it is important to make sure that the host operating system's time is correct.
To do this for VMware ACE, VMware Fusion, VMware GSX Server, VMware Player, VMware Server, and VMware Workstation run time synchronization software such as NTP or w32time in the host. For VMware ESX run NTP in the service console. For VMware ESXi, run NTP in the VMkernel.
Virtual Hardware clock configuration
When configuring the Linux guest operating system, if you are given a choice between keeping the “hardware” clock (that is, the virtual CMOS time of day clock) in UTC or local time, choose UTC. This avoids any confusion when your local time changes between standard and daylight saving time (in England, "summer time").
64bit Kernels
Linux Flavor | Version | Kernel Parameters | Notes |
RHEL | | | |
| RHEL 5.3 | notsc divider=10 |
|
| | notsc divider=10 | |
| RHEL 5.1 with RHSA-2007:0993-13 | notsc divider=10 | |
| RHEL 5.1 without RHSA-2007:0993-13 | notsc |
|
32bit Kernels
Linux Flavor | Version | Kernel Parameters | Notes |
RHEL |
|
|
|
| RHEL 5.3 | divider=10 clocksource=acpi_pm |
|
| RHEL 5.2 | divider=10 clocksource=acpi_pm |
|
| RHEL 5.1 | divider=10 clocksource=acpi_pm |
|
| RHEL 5.0 | clocksource=acpi_pm |
Editing Kernel Configuration
Kernel command line parameters are specified in the /etc/lilo.conf or /boot/grub/grub.conf file, depending on your choice of boot loader.
For LILO, put the kernel command line parameters at the end of the "append" line. For example, if the append line looks like:
append="resume=/dev/hda6 splash=silent"
and you want to add "clock=pmtmr divider=10" the updated text is:
append="resume=/dev/hda6 splash=silent clock=pmtmr divider=10"
Remember to run /sbin/lilo after editing lilo.conf , so that your edits take effect.
For GRUB, put the kernel command line parameters at the end of the "kernel" line. For example if the kernel line looks like:
kernel /vmlinuz-2.6.18 ro root=/dev/hda2
and you want to add "clock=pmtmr divider=10" the updated text is:
kernel /vmlinuz-2.6.18 ro root=/dev/hda2 clock=pmtmr divider=10
Below given is the best practice, for time related issues on VMware guests.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427
0 comments:
Post a Comment