Solved

Windows VM Time Issues


Userlevel 1
Badge +12
  • Trailblazer
  • 14 replies
Hi one and all,

We've been battling with VM Time issues mainly on Win 2012R2 Server where time of a VM thats been powered off and restarted is set to GMT time even though TZ etc are correct on hardware, VM and hypervisor machine.

I found this KB https://portal.nutanix.com/#/page/kbs/details?targetId=kA03200000098c9CAA that relates to the problem however I'd consider this a workaround in the short term and to me is not a solution wehre I haev to set a registry item to fix the time issue.

When I logged a support case for this I got refered to the KB article.

Is the problem going to be resolved as a permant fix in any up coming releases?

Can someone explain to me what the actual technical problem is and why VM can't get the correct time from the underlyind hypervisor?

Thanks,

Stephen..




icon

Best answer by Chandru 11 August 2017, 20:33

Hi Adam,
The default timezone is UTC when a user vm is created. We cannot set the time zone to the AHV hosts time zone because the linux VM's will expect the time provided by AHV to be in UTC. If we set the hwclock to your local time zone as default for all the vm's, then linux vm's will come up with a wrong time same as Windows does with UTC. There is an enhancement work in progress to identify the OS type and feed the correct timezone accordingly but for now setting hwclock_timezone or editing the registry is the option for Windows vm's.


Thanks,

View original

6 replies

Userlevel 2
Badge +12
Hi Stephen,
I believe the hypervisor is AHV here. If I'm right, when a windows vm boots up in AHV we provide the time in the UTC time zone but windows due to the registry settings thinks the time is given in its local timezone like PDT,EDT etc.... whatever is configured in the system. To work around the problem you can try the following command from one of the CVM's

acli vm.update hwclock_timezone=America/New_York

Please replace with correct vm name.

This will feed the time in local time zone configured on the Nutanix cluster so, if you are in EDT time zone then Windows VM will get EDT time instead of UTC time when it boots up.

Badge +2
Hi All,

Im interested in this as well. From what I can see this means that each windows vm on creation would need to be altered for the timezone workaround (either the vm itself or the guest os) . I would have thought that if the correct timezone was set on host/AHV that when a vm is created it would be set to the same timezone by default. Hence negating manual intervention.
Would like to know if Im thinking right and if there is any technical reason why it cant be that way.

Best Regards,
Adam
Userlevel 2
Badge +12
Hi Adam,
The default timezone is UTC when a user vm is created. We cannot set the time zone to the AHV hosts time zone because the linux VM's will expect the time provided by AHV to be in UTC. If we set the hwclock to your local time zone as default for all the vm's, then linux vm's will come up with a wrong time same as Windows does with UTC. There is an enhancement work in progress to identify the OS type and feed the correct timezone accordingly but for now setting hwclock_timezone or editing the registry is the option for Windows vm's.


Thanks,
Userlevel 1
Badge +12
Thanks for the explanation Chandru,

Will be looking forward to the enhancement to detect OS type as this is frustrating, but for the time being will use the current work around.

Regards,

Stephen
Badge
This is causing problems for us as well. What's the status on the enhancement to identify the OS type and feed the correct timezone accordingly?
Userlevel 1
Badge +6
when will there be a fix for this?

Reply