Jump to content

Clock one hour behind on VMware ESXi Windows Server VMs

RomHeu

Hi!


I have a VMware ESXi 8.0.0 server on which I have 2 Windows Server 2022 VMs: a domain controller and an RDS.


I noticed that the date and time of my 2 Windows Server VMs were moving forward a few minutes.


So via the ESXi Host Client web interface, I started the ntpd service and configured the NTP client in Host > Manage > System > Time & date.


After some time, the clock of my VMs was updated.


Now the minutes are synchronized.


But the clock of my VMs is one hour behind.


That is to say that when it's 2:00pm in Paris, 12:00pm UTC, my Windows VMs are showing 1:00pm.


These VMs are well configured on the time zone "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris", "Adjust for daylight saving time automatically" is enabled, and the date is right (04/04/2023).

How to make the clock correct?


Thanks in advance! 馃槈

1575090107_1VMwareESXintpd.thumb.png.354eeb629083f87e781d90976235e367.png

190420949_2VMwareESXiTimeanddatesettings.thumb.png.28fe4ac4ce86ab20f47dde5cfe1a428d.png

118032777_3WindowsServerVMDateandtime.thumb.png.c056a13dccf1bca58539df6d6a714a34.png

Link to comment
Share on other sites

Link to post
Share on other sites

Obvious question, but are you sure that the ESXi server also has the same time zone set?

Here's a knowledge base article on how to change it if necessary: https://kb.vmware.com/s/article/1436

CPU: AMD Ryzen 7 5800X3D GPU: AMD Radeon RX 6900 XT 16GB GDDR6 Motherboard: MSI PRESTIGE X570 CREATION
AIO: Corsair H150i Pro RAM: Corsair Dominator Platinum RGB 32GB 3600MHz DDR4 Case: Lian Li PC-O11 Dynamic PSU: Corsair RM850x White

Link to comment
Share on other sites

Link to post
Share on other sites

I recall fighting with this as well with ESXi, but its been awhile.

As I dimly recall VMware tools over-ride guest NTP server settings, and you want to disable this. Let the guests pull their own NTP.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, wseaton said:

I recall fighting with this as well with ESXi, but its been awhile.

As I dimly recall VMware tools over-ride guest NTP server settings, and you want to disable this. Let the guests pull their own NTP.

This

Right click on the VM > Edit Settings > VM Options > VMWare Tools > Uncheck "Synchronize guest time with host"

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, Morgan MLGman said:

Obvious question, but are you sure that the ESXi server also has the same time zone set?

Here's a knowledge base article on how to change it if necessary: https://kb.vmware.com/s/article/1436

The knowledge base article seems outdated, as it mentions ESXi 6.x at best, and as /etc/sysconfig/clock doesn't exist on my system.

My /etc/localtime file looks weird, but it mentions "UTC":

image.thumb.png.4ad6b7abf91492142d909b33e3684c90.png

date returns the right time in UTC:

[root@XXXXXXXX:~] date
Wed Apr  5 18:08:52 UTC 2023

Thank you for your input, does it bring any new hint?

8 hours ago, wseaton said:

I recall fighting with this as well with ESXi, but its been awhile.

As I dimly recall VMware tools over-ride guest NTP server settings, and you want to disable this. Let the guests pull their own NTP.

VMware Tools isn't installed (yet) on the DC VM, which acts as a NTP server for the RDS VM.

Anyway I'm using snapshots, I will use vMotion, so I guess I need that ESXi handles time synchronization.

Usually I don't mind to deviate from the recommended settings, but in this instance I think I understand the rationale behind synchronizing the VMs through ESXi rather than through NTP on the client: when you wake up a suspended VM or move a VM to another ESXi host, ESXi needs to set the date and time instantly, you can't wait for the next NTP sync.

Is it that hard to properly configure the timezone between ESXi and Windows? 馃槵馃

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, RomHeu said:

VMware Tools isn't installed (yet) on the DC VM, which acts as a NTP server for the RDS VM.

Anyway I'm using snapshots, I will use vMotion, so I guess I need that ESXi handles time synchronization.

Usually I don't mind to deviate from the recommended settings, but in this instance I think I understand the rationale behind synchronizing the VMs through ESXi rather than through NTP on the client: when you wake up a suspended VM or move a VM to another ESXi host, ESXi needs to set the date and time instantly, you can't wait for the next NTP sync.

Is it that hard to properly configure the timezone between ESXi and Windows? 馃槵馃

It's worth pointing out that ESXi requires VMTools on the guest for guest time synchronization.

You should also only have one of them enabled. Either VMTools Time Sync or Native time sync (W32Time / NTPD).聽

It depends on your setup as to which way you go, but VMWare's stance is that only one should be enabled.

We typically don't synchronize guests, and let guests sync with the local NTP server

Spoiler

Desktop: Ryzen9 5950X聽| ASUS ROG Crosshair VIII Hero (Wifi)聽| EVGA RTX 3080Ti聽FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU聽| Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G聽Monitor | Roccat Vulcan TKL Pro Keyboard |聽Logitech G Pro X Superlight聽 |聽MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x |聽ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU聽| Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel)聽| 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe聽| LSI 9211-8i HBA

Link to comment
Share on other sites

Link to post
Share on other sites

On 4/5/2023 at 9:44 PM, Jarsky said:

It's worth pointing out that ESXi requires VMTools on the guest for guest time synchronization.

You should also only have one of them enabled. Either VMTools Time Sync or Native time sync (W32Time / NTPD).聽

It depends on your setup as to which way you go, but VMWare's stance is that only one should be enabled.

We typically don't synchronize guests, and let guests sync with the local NTP server

Last night, I've installed VMware Tools on both VMs (contrary to what I thought, they weren't installed on the RDS server either).

My DC server is still on time. But now, in Windows settings > Time & Language > Date & time, "Set time automatically" is enabled (it was previously greyed out), and "Last successful time synchronization" and "Time server" both show "unspecified", instead of "Free-running system clock" for the latter. Is it expected behavior?

image.thumb.png.7ef5813952537cd33a75425926944836.png

Now my RDS server is on time. But then again, things are super weird: the "Time server" is now time.windows.com, instead of dc1.<redacted>.net. I have installed the VMware Tools and rebooted, but I haven't changed anything else myself. What happened?

image.thumb.png.8b45c3334176a3dbae54adab5d9ad07d.png

Last but not least, there are the client computers joined to the domain. Those still have dc1.<redacted>.net as their Time server, but their clock was still one hour behind this morning, although they've been shut down yesterday before my VM updates and been turned on this morning. What's wrong and how do I fix this?

Again, I'd prefer to stick to the default settings, which seems to be synchronizing clients with the domain controller.

Thank you in advance for your precious help!

Link to comment
Share on other sites

Link to post
Share on other sites

On 4/7/2023 at 1:11 PM, RomHeu said:

Last night, I've installed VMware Tools on both VMs (contrary to what I thought, they weren't installed on the RDS server either).

My DC server is still on time. But now, in Windows settings > Time & Language > Date & time, "Set time automatically" is enabled (it was previously greyed out), and "Last successful time synchronization" and "Time server" both show "unspecified", instead of "Free-running system clock" for the latter. Is it expected behavior?

Now my RDS server is on time. But then again, things are super weird: the "Time server" is now time.windows.com, instead of dc1.<redacted>.net. I have installed the VMware Tools and rebooted, but I haven't changed anything else myself. What happened?

Last but not least, there are the client computers joined to the domain. Those still have dc1.<redacted>.net as their Time server, but their clock was still one hour behind this morning, although they've been shut down yesterday before my VM updates and been turned on this morning. What's wrong and how do I fix this?

Again, I'd prefer to stick to the default settings, which seems to be synchronizing clients with the domain controller.

Thank you in advance for your precious help!

I think the unspecified is because its being synced by the VMware Time Service. Make sure you have the 'Periodically syncd' enabled in VMware if youre going to use it this way.聽

As for the other machines, you should have the VMware Time Service disabled, and in Windows you should have them pointing to your DC.聽

Theres more about using W32Time here. For larger implementation you can of course push this config via GPO as well.聽
https://docs.vmware.com/en/VMware-Horizon-DaaS/services/horizondaas.install900/GUID-AEC90E5F-C5B6-447F-B03F-C1060C405E1F.html

Spoiler

Desktop: Ryzen9 5950X聽| ASUS ROG Crosshair VIII Hero (Wifi)聽| EVGA RTX 3080Ti聽FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU聽| Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G聽Monitor | Roccat Vulcan TKL Pro Keyboard |聽Logitech G Pro X Superlight聽 |聽MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x |聽ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU聽| Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel)聽| 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe聽| LSI 9211-8i HBA

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now