dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
5790
share rss forum feed

batsona
Maryland

join:2004-04-17
Ellicott City, MD
Reviews:
·Vonage
·Verizon FiOS

ESXi 5.0 Question: NTP....

I bet this is simple... I can't keep my freeBSD virtual machine in the right timezone. I manually set the clock & it's correct, but when I reboot, the clock is perfectly 4h in the future! Here's more info:

----Time on ESXi srvr set by NTP, and is in UTC timezone

----Time on win7 host running ESX Vsphere Client (that I use to control ESXi) is set by ActiveDirectory, and is in Eastern timezone

----Time on freeBSD has been set manually, and is configured for "UTC" as well.

Is there something funky going on regarding my workstation, which is 4h behind the ESXi srvr, in the eastern timezone, that causes the freeBSD guest to be 4h ahead of UTC?


Drex
Beer...The other white meat.
Premium
join:2000-02-24
Not There
kudos:1
Reviews:
·AT&T U-Verse
Don't know if this will be of any benefit, but I found a couple articles:
»support.ntp.org/bin/view/Support/VMWareNTP

»www.vmware.com/files/pdf/techpap···ines.pdf

»kb.vmware.com/selfservice/micros···=1003063

Can't say I've done much configuring of NTP in the VMware environment though.
--
I'm actually not funny, I'm just really mean and people think I'm joking.


netboy34
Premium
join:2001-08-29
Kennesaw, GA
kudos:1
reply to batsona


exocet_cm
Free at last, free at last
Premium
join:2003-03-23
New Orleans, LA
kudos:3
reply to batsona
Click for full size
You mentioned upon reboot, is this option set/not set?


Modus
I hate smartassery on forums
Premium
join:2005-05-02
us
Reviews:
·Verizon FiOS
said by exocet_cm:

You mentioned upon reboot, is this option set/not set?

Yep that is best practice right there. Maybe sure the time is correct on the host
--
Think Ahead. Learn More. Solve Now!

batsona
Maryland

join:2004-04-17
Ellicott City, MD
Reviews:
·Vonage
·Verizon FiOS
reply to exocet_cm
Thanks! I'll have a look at this & post with what I found. Question: Does this cause VMtools on the guest to periodically sync the time, or is the time synced upon starting the guest os? I ask, because some of the guests on this ESXi server are Linux, and will be running 'ntpdate' against an NTP host all on their own, after boot.

I read thru the docs linked earlier in this post, thanks! It would seem that ESXi will present the guest OS with a 'clock' that it will use to set the OS clock upon boot. As long as ESXi itself is set by NTP (which mine is), that I should have a fairly accurate time @ boot, even before 'ntpdate' takes over time-sync inside Linux...


exocet_cm
Free at last, free at last
Premium
join:2003-03-23
New Orleans, LA
kudos:3
said by batsona:

Thanks! I'll have a look at this & post with what I found. Question: Does this cause VMtools on the guest to periodically sync the time, or is the time synced upon starting the guest os? I ask, because some of the guests on this ESXi server are Linux, and will be running 'ntpdate' against an NTP host all on their own, after boot.

I read thru the docs linked earlier in this post, thanks! It would seem that ESXi will present the guest OS with a 'clock' that it will use to set the OS clock upon boot. As long as ESXi itself is set by NTP (which mine is), that I should have a fairly accurate time @ boot, even before 'ntpdate' takes over time-sync inside Linux...

Let us know if this solved your problem.
--
"All newspaper editorial writers ever do is come down from the hills after the battle is over and shoot the wounded." - Bruce Anderson
"I have often regretted my speech, never my silence." - Xenocrates


exocet_cm
Free at last, free at last
Premium
join:2003-03-23
New Orleans, LA
kudos:3
reply to batsona
Time keeping best practice with Linux distros on ESXi:
»kb.vmware.com/selfservice/micros···=1006427

batsona
Maryland

join:2004-04-17
Ellicott City, MD
Reviews:
·Vonage
·Verizon FiOS
reply to exocet_cm
OP Here: I think I got it. The way ESXi deals with its time is weird & confusing. The time you see thru the VSphere Client is translated to the local time of that VSphere client. In my case this is eastern time, or GMT-5 (not the 4hr difference I saw earlier in this thread -- I can't count..) So let's say:

eastern time: 13:00
UTC: 18:00 (the time I set for the ESX server via the VSphere client)

My guest OS would boot up & its time would be 23:00

So, I set "13:00" as the current time on my ESXi server, via the VSphere client. (weird, I noticed when I did this, the time turned from red to black). NTP didn't yell at me at all when I set the time to something different than what it was hearing via NTP, but maybe the color of the time was telling me something.

With my ESXi time set to 13:00, I rebooted my guest, and sure enough I now have correct UTC on the guest (18:00) Setting the time-sync to on vs. off in the "VMware Tools" section of the properties didn't do anything to affect what was going on during boot. BUT: I have a question:

If the time-sync with the guest is turned on, does that mean the guest OS will receive a time-sync thru VMware-Tools, a la NTP? if so, I don't want that. I do understand that the OS (windows, mac, Linux....) will receive a time-sync upon boot, because the OS will look to the HW clock to set its own. However, once the OS is up, I'd like ESXi to NOT communicate time to the guest; and I'd like it set purely via 'ntpdate' in Linux (run by root's Cron)


exocet_cm
Free at last, free at last
Premium
join:2003-03-23
New Orleans, LA
kudos:3
said by batsona:

OP Here: I think I got it. The way ESXi deals with its time is weird & confusing. The time you see thru the VSphere Client is translated to the local time of that VSphere client. In my case this is eastern time, or GMT-5 (not the 4hr difference I saw earlier in this thread -- I can't count..) So let's say:

eastern time: 13:00
UTC: 18:00 (the time I set for the ESX server via the VSphere client)

My guest OS would boot up & its time would be 23:00

So, I set "13:00" as the current time on my ESXi server, via the VSphere client. (weird, I noticed when I did this, the time turned from red to black). NTP didn't yell at me at all when I set the time to something different than what it was hearing via NTP, but maybe the color of the time was telling me something.

With my ESXi time set to 13:00, I rebooted my guest, and sure enough I now have correct UTC on the guest (18:00) Setting the time-sync to on vs. off in the "VMware Tools" section of the properties didn't do anything to affect what was going on during boot. BUT: I have a question:

If the time-sync with the guest is turned on, does that mean the guest OS will receive a time-sync thru VMware-Tools, a la NTP? if so, I don't want that. I do understand that the OS (windows, mac, Linux....) will receive a time-sync upon boot, because the OS will look to the HW clock to set its own. However, once the OS is up, I'd like ESXi to NOT communicate time to the guest; and I'd like it set purely via 'ntpdate' in Linux (run by root's Cron)

I'm not very familiar with the sync time option in the guest settings. I personally don't use it because all of my guest VMs that require NTP are Windows-based machines and I sync them with my LAN's NTP server. My Linux VMs are for testing various things and time synchronization isn't an issue.

Have a read of the VMware KB article that I posted about Linux distro time synchronization whenever you have a spare hour.

--
"All newspaper editorial writers ever do is come down from the hills after the battle is over and shoot the wounded." - Bruce Anderson
"I have often regretted my speech, never my silence." - Xenocrates

batsona
Maryland

join:2004-04-17
Ellicott City, MD
Reviews:
·Vonage
·Verizon FiOS

1 recommendation

OP: Problem solved.. The documentation should print wording in bold letters to the effect: When setting ESXi time via the VSphere client, make sure you use the local time in your time-zone, even if you want to use UTC throughout your environment. If local time is 13:00 and UTC is 18:00, tell the ESXi server that it's 13:00, and you'll be fine.

gavindcht

join:2013-03-31
reply to exocet_cm
So just to verify, the Server and client must have the same time set?

AsherN
Premium
join:2010-08-23
Thornhill, ON
reply to batsona
The time sync option on the tools is only active while the guest is active. Upon reboot, the tools will sync time with the host. I had one host that did not have NTP configured and whenever I rebooted a guest, the time changed.

ke4pym
Premium
join:2004-07-24
Charlotte, NC
Reviews:
·Northland Cable ..
·Time Warner Cable
·ooma
·VOIPO
·Verizon Broadban..
reply to batsona
I would second the call to not use tools to set the time of your guest.

Firstly, if you have a Windows machine that is on a domain, it is going to get its time from the domain. It is important that the on-domain Windows guest have a time matching domain time. Unless you want things like kerberos to break.

Any other guests not on the domain should either use the built in time sync tools (Windows 7/2008(r2) has very decent time sync tools now and the older OSen can be fin-ag-eled into proper time configs) or a NTP client pointing to your time sources (or the AD controllers at the very least).

One behavior you will see in VMWare on freshly imported guests is their time is off. That'll usually work itself out after a reboot or two. But you may have to manually reset the time on the guest.

Finally, for the record, NTP only talks UTC. It's up to the client to deal with TZ issues.

Source: Me, I'm a corporate time-keeper and manage a handful of GPS based NTP clocks.