I have 3 ESX 3.0.2 Udpate 1 servers, all with different date/times. I think it may be related to a VM time issue I'm having.
I've tried using the "date -s 05/13/08"
and "date -s 10:13"
to change it which works, but then when I restart I notice it says, "Synchornizing hardware clock with system time" and when it comes back from the restart the date and time is back to something incorrect.
What commands do I need to use to change it permanently? Thank you.
Your BIOS time is probably off. After you set the time, run 'hwclock --systohc' to force the correct time. Otherwise, when you reboot, check your BIOS and make sure the time is corrected before it starts.
-KjB
You can force writing the current system time to the hardware clock by running "hwclock --systohc".
Additionally, may I strongly suggest you set up NTP on your ESX servers, as described in http://kb.vmware.com/kb/1339.
Finally, for an advanced discussion on timekeeping inside of VMs (and some of this really is bedtime reading), you can reference this very detailed, very technical whitepaper: http://www.vmware.com/pdf/vmware_timekeeping.pdf)
I second setting up NTP for you hosts - having them all on the same time will help prevent some common issues and errors involved with inconsistent time on your hosts, VMs and with Virtual Cenetr
My service console is on a private LAN, so I couldn't impelement NTP without putting an NTP server on that private network, correct?
That is correct - unless you are able to route out to a public NTP source -
Do you have a firewall you can use as your NTP source?
Correct, or synchronise with a switch/router on your isolated network - these almost always have NTP daemons and, since the networking guys often have to correlate logs accross many devices, they usually make sure NTP is set up on them to synchronise with a public source through another interface.
If you still have no other source, synchronise amongst your ESX hosts (if you have multiple.) That way, at least you'll have consistent time between them to help you when correlating events in logs.
How can I synchronize between them without another NTP server?
The Linux NTP daemon running on the SC is, in addition to being an NTP client, also a fully-fledged NTP server. If you just point them at each other, they should synchronise.
You may need to adjust the settings in ntpd.conf so that one server is seen as authoritative. On the system you want to act as source, add the following line to the ntpd.conf file:
fudge 127.127.1.0 stratum 0
Please take note that this will prevent the server from synchronising with other sources, and will synchronise only with the local system clock.
(It's also generally a good practice to add "fudge 127.127.1.0 stratum 10" to the other servers, however they will default to stratum 5 if not explicitly configured.)
Your BIOS time is probably off. After you set the time, run 'hwclock --systohc' to force the correct time. Otherwise, when you reboot, check your BIOS and make sure the time is corrected before it starts.
-KjB